LogoLogo
  • About Bancor Network
    • Bancor V3
    • Bancor Basics
      • About Bancor
      • What Can I Do With Bancor?
      • Liquidity Pools
      • Single-Side Liquidity
      • Why Use Bancor?
      • Resources
    • Resources for DAOs
      • Token Whitelisting Requirements
      • Liquidity Mining
        • Auto Compounding Rewards
          • How Auto Compounding Rewards work
          • How to Create an Auto Compounding Rewards Program
          • Custom Rewards Programs
        • Dual Liquidity Mining
        • Standard (External) Rewards
    • Security & Audits
      • Multisig Rights
      • Oracles
      • DAO MSIG Intervention Policy
  • Contracts & Functions
    • Contracts
    • Write Functions
      • Transaction Prerequisites
        • approve() / allowance()
      • Trading
        • tradeBySourceAmount()
        • tradeByTargetAmount()
        • Trading Troubleshooting
      • Adding Liquidity
        • deposit()
        • depositFor()
        • Deposit Troubleshooting
        • depositAndJoin()
      • Removing Liquidity
        • Initiating Cooldown
          • initWithdrawal()
        • withdraw()
        • cancelWithdrawal()
        • Withdraw Troubleshooting
      • Flashloan
        • flashLoan()
        • Flashloan Troubleshooting
      • Migrating Liquidity to v3
        • Migrating Bancor positions to v3
          • migratePositions()
          • migratePoolTokens()
          • Errors and Troubleshooting
        • Migrating from Uniswap v2
          • migrateUniswapV2Position()
        • Migrating from Sushiswap
          • migrateSushiSwapV1Position()
      • Rewards
        • join()
        • stakeRewards()
        • autoProcessRewards()
        • claimRewards()
        • leave()
      • Surplus migration
        • withdrawPOL()
      • Network Fees
        • burnNetworkFees()
    • Read Functions
      • Rewards
        • Standard rewards
          • Identify if a program exists
            • Auto Compounding
            • Standard Rewards
          • programIds()
          • programs()
          • providerProgramIds()
          • pendingRewards()
          • latestProgramId()
          • isProgramActive()
          • isProgramEnabled()
          • providerStake()
          • programStake()
          • providerRewards()
        • Auto compounding rewards
          • bnToken balance
          • isProgramActive()
          • isProgramPaused()
          • pools()
          • program()
          • programs()
      • Liquidity Pool Details
        • liquidityPools()
        • isPoolValid()
        • isPoolStable()
        • tradingLiquidity()
        • depositingEnabled()
        • poolFundingLimit()
      • Trades
        • tradeOutputBySourceAmount()
        • tradeInputByTargetAmount()
        • tradingEnabled()
        • tradingFeePMM()
      • Withdrawals
        • isReadyForWithdrawal()
        • withdrawalRequest()
        • withdrawalAmounts()
        • withdrawalRequestIds()
        • withdrawalRequestCount()
        • lockDuration()
      • Pool Token Information
        • poolToken()
        • collectionByPool()
        • poolTokenToUnderlying()
        • underlyingToPoolToken()
      • Vortex
        • pendingNetworkFeeAmount()
        • minNetworkFeeBurn()
      • Surplus whitelist
        • protectedTokenWhitelist()
    • Data & Events
      • General Data
        • contextId
      • Trading Data
        • event TokensTraded()
      • Liquidity Data
        • TotalLiquidityUpdated()
        • TradingLiquidityUpdated()
        • TokensDeposited()
        • TokensWithdrawn()
        • WithdrawalInitiated()
        • WithdrawalCancelled()
        • WithdrawalCompleted()
        • LockDurationUpdated()
        • Cross AMM Migration Data
          • UniswapV2PositionMigrated()
          • SushiswapV1PositionMigrated()
      • Flashloan Data
        • FlashLoanCompleted()
        • FlashLoanFeePPMUpdated()
      • Rewards
        • Staking and Unstaking
          • Event ProviderJoined()
          • Event ProviderLeft()
        • Claiming and Restaking Rewards
          • Event RewardsClaimed()
          • Event RewardsStaked()
  • Developer Guides
    • Bancor Vortex Burner
    • Bancor Etherscan Guide
      • Etherscan Basics
      • Deposit
      • Deposit and Join
      • Rewards: Joining Standard Rewards
      • Rewards: Stake & Claim
      • Rewards: Leaving the Rewards Contract
      • Withdrawing Tokens
        • Initiating the Withdrawal
        • Completing the Withdrawal
      • Migrating V2.1 Positions
      • Rewards: Auto Compounding Rewards Distribution
    • REST API
      • API Reference
      • DLT Identifier
Powered by GitBook
On this page
  • 1. Approve
  • 2. Deposit
  1. Developer Guides
  2. Bancor Etherscan Guide

Deposit

PreviousEtherscan BasicsNextDeposit and Join

Last updated 2 years ago

This section outlines the process to deposit tokens into a Bancor liquidity pool.

Before submitting any transaction, make sure the estimated gas cost looks reasonable! If it seems high, it’s very possible that your transaction will fail. If this happens, check the following and try again:

  • That you approved the correct number of tokens for the correct contract

  • The number of tokens has the right amount of zeros

  • The contract address you entered is correct

1. Approve

In order for the contract to interact with the tokens in your wallet and perform the transaction, an Approval must be set first for the contract.

If you wish to deposit ETH or have already set approval for a very large amount for the token, skip to .

  1. Visit the relevant token contract. This can be found on Etherscan by searching for the token ticker, or by clicking the Etherscan link on Coingecko token pages. For example: | |

  2. Connect your wallet as explained in "Using Etherscan"

  3. Fill in the fields in the Approve function, then click Write and complete the transaction.

_spender

_value

2. Deposit

Some pools might be in deficit which might effect the ability to withdraw the full amount you have deposited ().

Now that you have the approval in place, you are ready to deposit your tokens into the Bancor pool.

Execute the deposit function, with the token address, and the number of tokens you wish to deposit.

  1. Execute the deposit function (this is a Write function)

Name
Type
Description

deposit

uint256

ETH deposits ONLY:

Indicate the ETH amount in full units (10.5 ETH should be indicated as 10.5) For any other token, this should be set to 0

pool

uint256

The address of the token you wish to deposit

tokenAmount

uint256

Once executed successfully, the following will happen:

  1. Your tokens will be deposited into the Bancor pool

  2. The protocol will generate bnTokens that represent your position in the pool, and will transfer them to your wallet

The address of the BancorNetwork

The amount you would like to approve (it can be identical or larger than the amount you wish to deposit, BUT NOT LESS) in WEI format as

Visit the BancorNetwork contract

The token (i.e BNT, ETH, DAI, LINK) amount you would like to deposit (using WEI format )

on etherscan
explained here
explained here
BNT
DAI
LINK
more info
step 3
found here