minAmount
involves converting the growth token amount into LP and then converting LP into a stablecoin amount. The process varies for PWRD and GVT.usdToLp
from the buoy contract to convert PWRD into LP and then use singleStableFromLp
to convert LP to stablecoin.buoy.address
is a string set to the Buoy address.growthTokenAmount
: the amount of PWRD being withdrawn. This is an integer (uint256
) in the BigNumber format with conversions performed using BN.js. slippage
and withdrawFee
are floats. buoy
contract's usdToLp
method and then converting LP to stablecoin with singleStableFromLp
.buoy.address
is a string set to the Buoy address.growthTokenAmount
: the amount of GVT being withdrawn. This an integer (uint256
) in the BigNumber format with conversions performed using BN.js. To get the USD value of GVT token, you can use call the value from the Vault token contract with getPricePerShare
(under number 17 on Etherscan read contract page).slippage
and withdrawFee
are floats. uint256
) representing the stablecoin index (0 for DAI; 1 for USDC; 2 for USDT)uint256
) that is the LP amount of the growth token to withdrawuint256
) that is the minimum amount of stablecoin to get in return (value denoted in stablecoin tokens)growthTokenAmount
of GVT, the following converts the token amount into a USD value:index
represents the stablecoin index (0 for DAI; 1 for USDC; 2 for USDT).uint256
) representing the stablecoin index (0 for DAI; 1 for USDC; 2 for USDT)uint256
) that is the minimum amount of stablecoin to get in return (value denoted in stablecoin tokens)uint256
) that is the LP amount of the growth token to withdrawuint256[]
). Each element is the minimum amount of a stablecoin to get in return (value denoted in stablecoin tokens). This is returned in the order of DAI, USDC and USDT.uint256[]
). Each element is the minimum amount of a stablecoin to get in return (value denoted in stablecoin tokens). This is returned in the order of DAI, USDC and USDT.