LogoLogo
Block ExplorerDiscordTwitterMirror
  • What Is Canto?
  • Free Public Infrastructure
    • NOTE
    • Canto Lending Market
    • Canto DEX
  • Canto Neofinance
    • Overview
    • Application Specific Dollar
  • User Guides
    • Connecting to Canto
    • Bridging Assets
      • Bridging to Canto
      • Bridging from Canto
      • Synapse Bridge
      • Celer cBridge
    • Providing Liquidity
    • Lending & Borrowing
    • Staking
    • Governance
  • EVM Development
    • Overview
    • Quickstart Guide
    • NOTE, DEX, and Lending Market
    • Contract Secured Revenue (CSR)
    • Verifying Contracts
    • Contract Addresses
    • Testnet
  • Running a Node
    • Validators
      • Quickstart Guide
      • Useful Commands
      • Snapshots
      • FAQ
      • Troubleshooting
      • Uptime
      • Slashing
    • Archive Node
    • Graph Node (Subgraphs)
  • Technical Reference
    • Application Specific Dollar
      • asdOFT
      • asdRouter
      • asdUSDC
    • Liquidity Coordinator
      • VotingEscrow
      • GaugeController
      • LendingLedger
      • LiquidityGauge
    • Architecture & Design
      • Onboarding Module
      • Gravity Bridge
      • NOTE Design
      • Canto Lending Protocol
      • IBC Token Recovery
    • Governance
      • Governance Module
      • GovShuttle Module
      • Lending Market Governance
    • Tokenomics
    • Audits
Powered by GitBook
On this page
  • Depositing
  • Withdrawing
  1. Technical Reference
  2. Liquidity Coordinator

LiquidityGauge

When an LP token is whitelisted on LendingLedger, a LiquidityGauge wrapper is automatically created. This simple wrapper calls sync_ledger in the _afterTokenTransfer hook to ensure eligible LP positions are continuously tracked by the protocol.

Depositing

To deposit LP tokens into a wrapper, call the depositUnderlying(uint256 _amount) method. The wrapper must be approved to spend the underlying token.

ethers.js

await LiquidityGauge.depositUnderlying(10000000000000000000) // Deposit 10 LP tokens

foundry

cast send --ledger 0x... "depositUnderlying(uint256)" 10000000000000000000

Withdrawing

To withdraw LP tokens from a wrapper, call the withdrawUnderlying(uint256 _amount) method.

ethers.js

await LiquidityGauge.withdrawUnderlying(10000000000000000000) // Withdraw 10 LP tokens

foundry

cast send --ledger 0x... "withdrawUnderlying(uint256)" 10000000000000000000
PreviousLendingLedgerNextArchitecture & Design

Last updated 1 year ago