Search…
Finalizing Withdrawal Guide
This is the last step of the withdrawal process, after which, your funds will be back in your wallet.
This can only be done once the cooldown time is completed

1. Approve vBNT

When withdrawing BNT, you need to return amount of vBNT equal to the bnToken you are withdrawing to the protocol.
For any other token, skip to step 2
In order for the contract to interact with the tokens in your wallet and perform the transaction, an Approve must be set first for the contract.
  • Visit the vBNT contract on etherscan
  • Execute the Approve function (this is a Write function)
_spender
The address of the BancorNetwork found here
_value
The amount you would like to approve (it can be identical or more than the amount of bnBNT you wish to withdraw, BUT NOT LESS) in WEI format as explained here

2. Cooldown ID

This step will explain how to identify the cooldown ID needed
  • Visit the PendingWithdrawals contract on etherscan
  • Execute the withdrawalRequestIds function (this is a Read function)
Input variable
Name
Type
Description
provider
address
Your wallet address
Output response
Name
Type
Description
cooldownId
uint256
The ID of the existing cooldown requests you have (can be more than 1)
Save the value as this represent the input amount needed to use in the next steps

3. Identify which cooldown ID to use

This step will explain how to identify which cooldown ID to use.
If you only have a single ID, skip to the next step
  • Visit the PendingWithdrawals contract on etherscan
  • Execute the withdrawalRequest function (this is a Read function)
Input variable
Name
Type
Description
id
uint256
One of the IDs generated in the previous step
Output response
Name
Type
Description
provider
address
The address that can interact with this cooldown request
poolToken
IPoolToken
The locked bnToken
reserveToken
Token
The underlying token
createdAt
uint32
The time when the request was created
poolTokenAmount
uint256
The locked bnToken amount
reserveTokenAmount
uint256
The expected amount of underlying asset to receive
Using the returned values,
  1. 1.
    Identify the reserveToken you would like to withdraw
  2. 2.
    Save the id for the next step

4. Identify if cooldown is over

This step will explain how to know if your cooldown is over and you can safely withdraw your tokens
  • Visit the BancorNetworkInfo contract on etherscan
  • Execute the isReadyForWithdrawal function (this is a Read function)
Input variable
Name
Type
Description
id
uint256
The cooldown ID you wish to finalize
Output response
Name
Type
Description
isReady
bool
True/False indication on the status of the cooldown. (when True, proceed to next step)

5. Complete the withdraw

This step will explain how to complete the withdraw process and call the withdraw function
  • Visit the BancorNetwork contract on etherscan
  • Execute the withdraw function (this is a Write function)
Input variable
Name
Type
Description
id
uint256
The cooldown ID you wish to withdraw
Output
This will complete the withdrawal process and result with the underlying tokens in your wallet