Completing the Withdrawal
This is the last step of the withdrawal process, after which, your funds will be returned to your wallet.
This can only be done once the cooldown time is completed
1. (BNT withdrawals only) Approve vBNT
The BancorNetwork contract requires approval to perform the transaction with your vBNT tokens.
Visit the
vBNT
contract on etherscanExecute 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 to complete the withdrawal.
Visit the
PendingWithdrawals
contract on etherscanExecute the
withdrawalRequestIds
function (this is a Read function)
Input variable
provider
address
Your wallet address
Output response
cooldownId
uint256
The ID of the existing cooldown requests you have (can be more than 1)
Save the cooldownIds as these represent the inputs needed for the next steps.
3. Identify which cooldown ID to use
This step will explain how to identify which cooldown ID to use.
Visit the
PendingWithdrawals
contract on etherscanExecute the
withdrawalRequest
function (this is a Read function)
Input variable
id
uint256
One of the IDs generated from the previous step
Output response
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,
Identify the
reserveToken
you would like to withdrawSave the
id
for the next step
4. Identify if the cooldown period is over
This step will explain how to check if your cooldown is over and you can safely withdraw your tokens.
Visit the
BancorNetworkInfo
contract on etherscanExecute the
isReadyForWithdrawal
function (this is a Read function)
Input variable
id
uint256
The cooldown ID you wish to finalize
Output response
5. Complete the withdraw
This step will explain how to complete the withdrawal process and call the withdraw
function.
Visit the
BancorNetwork
contract on etherscanExecute the
withdraw
function (this is a Write function)
Input variable
id
uint256
The cooldown ID you wish to withdraw
Output
This will complete the withdrawal process and return the underlying tokens to your wallet.
Last updated