Search…
depositFor()
Deposit tokens on behalf of a different address

Function depositFor()

1
function depositFor(
2
address provider,
3
Token pool,
4
uint256 tokenAmount
5
)
6
external
7
payable
Copied!
depositFor is a function that allows you to deposit tokens into a Bancor pool on behalf of a different address and make sure that the received pool tokens will be sent to that address (and not the transaction initiator).

Function Arguments

Name
Type
Description
provider
address
Indicating the address that will receive the pool tokens at the end of the transaction
pool
Token
The address of the token deposited into the pool
tokenAmount
uint256
The amount to deposit
All pools on Bancor are initiated at 1:1 ratio between reserve to pool token. Once fees are collected, this ratio will change to represent the increased value of pool tokens to reserve. For example, if the ratio is 1 pool token : 2 reserve, it means that the pool token value has doubled since initiation.
See Errors and Troubleshooting for a list of common errors and how to resolve them.