Deposit
Last updated
Last updated
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
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 step 3.
Connect your wallet as explained in "Using Etherscan"
Fill in the fields in the Approve
function, then click Write
and complete the transaction.
_spender | The address of the |
_value | The amount you would like to approve (it can be identical or larger than the amount you wish to deposit, BUT NOT LESS) in |
Some pools might be in deficit which might effect the ability to withdraw the full amount you have deposited (more info).
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.
Visit the BancorNetwork
contract on etherscan
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 | The token (i.e BNT, ETH, DAI, LINK) amount you would like to deposit (using |
Once executed successfully, the following will happen:
Your tokens will be deposited into the Bancor pool
The protocol will generate bnTokens that represent your position in the pool, and will transfer them to your wallet