Rewards: Leaving the Rewards Contract
Removing tokens from the StandardRewards
contract requires the user to indicate the program ID and the token amount. The following steps explain how to collect the data necessary to call the leave
function that returns the bnTokens to your wallet. Once the bnTokens are back in your wallet, you can reclaim your deposit by following the instructions in the Withdraw Tokens guide.
1. Program ID
This step will explain how to identify the ID of the rewards program you are staked in:
Visit
StandardRewards
contract on etherscanExecute the
providerProgramIds
function (this is a Read function) with your Ethereum address:
Input variable
_provider
address
User wallet address
Output response
List of 1+ IDs to represent the different programs you are staked in
2. Identify which ID to use
If you are actively staked in more than 1 program, this step will explain how to identify the program ID for the rewards program you would like to unstake from
Visit
StandardRewards
contract on etherscanExecute the
programs
function (this is a Read function)
Input variable
ids
uint256
An array of 1 or more reward program IDs
Output response
id
uint256
The unique identifier of the rewards program
pool
Token
The deposited token (i.e BNT, ETH, DAI, LINK) address
poolToken
IPoolToken
The relevant bnToken address
rewardsToken
Token
The address of the rewards token that is given in this program
isEnabled
bool
True/False indication if the program is active
startTime
uint32
The start time of the program
endTime
uint32
The end time of the program
rewardRate
uint256
The amount of tokens per second that are distributed
Using the output data,
Identify the program with the
pool
token you would like to withdrawIdentify the program
id
to use in the following step
3. Available amount
This step will explain how to identify the number of available tokens to unstake from the contract
Visit
StandardRewards
contract on etherscanExecute the
providerStake
function (this is a Read function)
Input variable
provider
address
Your wallet address
id
uint256
The unique identifier of the rewards program
Output response
Amount
uint256
The bnToken amount staked into the rewards program
4. Leaving the StandardRewards Contract
This step will explain how to call theleave
function, removing your tokens from the rewards program.
Visit
StandardRewards
contract on etherscanExecute the
leave
function (this is a Write function)
Input variable
Output
The bnTokens will return to your wallet.
Last updated