Search…
Deposit and Join
This section outlines the process to make a deposit and join the pool rewards program in the same transaction.
When joining the Beta, this process reduces gas costs and ensures your token deposit is receiving the maximum available yield.

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 step 3.
  • Visit the relevant token contract: BNT | DAI | LINK
  • Connect your wallet as explained in "Using Etherscan"
  • Execute the Approve function (this is a Write function)
_spender
The address of the StandardRewards found here
_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 WEI format as explained here
  • Click Write to sign the Approve in your wallet

2. Function latestProgramId()

In order to join the latest program for the token you wish to deposit and maximize your yields, you first need to identify the program ID.
  • Visit the StandardRewards contract on etherscan
  • Execute the latestProgramId function (this is a Read function)
Input variable
Name
Type
Description
pool
Token
The address of the token you wish to deposit
For ETH use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
Output response
Name
Type
Description
id
uint256
The unique identifier for the latest program available for the input token
You will require the id value for the depositAndJoin function.

3. Function depositAndJoin()

Now that you know the program ID and have the approval in place, you are ready to deposit your tokens into the Bancor pool and rewards contracts.
Execute the depositAndJoin function, with the id you received from the first step, and the number of tokens you wish to deposit.
  • Visit the StandardRewards contract on etherscan
  • Execute the depositAndJoin function (this is a Write function)
Name
Type
Description
depositAndJoin
uint256
Note: IF ETH, indicate the ETH amount in full units (10.5 ETH should be indicated as 10.5) Else (any other token), this should be set to 0
id
uint256
The unique identifier for the latest program available for the input token (extracted in step 2)
tokenAmount
uint256
The token (i.e BNT, ETH, DAI, LINK) amount you would like to deposit (using WEI format explained here)
Once executed successfully, the following will happen:
  1. 1.
    Your tokens will be deposited into the Bancor Beta pool
  2. 2.
    The protocol will generate bnTokens that represent your position in the pool, and automatically stake them into the Beta rewards contract
  3. 3.
    Congrats! You have now joined the Beta program!