withdrawalAmounts()

This function is in the BancorNetworkInfo.sol contract.

Function withdrawalAmounts()

BancorNetworkInfo.sol
function withdrawalAmounts(Token pool, uint256 poolTokenAmount) external view        validAddress(address(pool))
        greaterThanZero(poolTokenAmount)
        returns (WithdrawalAmounts memory)

This function returns details about a potential withdrawal, including the number of tokens that would be received, and the number of BNT tokens the user would receive in an instance in which impermanent loss is being covered in part by BNT tokens.

Function Arguments

NameTypeDescription

pool

Token

The contract address of a token. For example, Link: 0x514910771AF9Ca656af840dff83E8264EcF986CA

poolTokenAmount

uint256

The number of pool tokens for which to check the results of a withdrawal.

Return Variables

This function returns the results of the potential withdrawal.

Variable TypeReturns

list

The return values include the number of expected tokens, the amount returned in the original token, and the amount returned in BNT.

Example response:

    tuple :  9975,9975,0

Last updated