Methods
addLiquidity
function addLiquidity(uint256[] amounts, uint256 minToMint, uint256 deadline) external nonpayable returns (uint256)
Parameters
Returns
calculateRemoveLiquidity
function calculateRemoveLiquidity(uint256 amount) external view returns (uint256[])
Parameters
Returns
calculateRemoveLiquidityOneToken
function calculateRemoveLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex) external view returns (uint256 availableTokenAmount)
Parameters
Returns
calculateSwap
function calculateSwap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) external view returns (uint256)
Parameters
Returns
calculateTokenAmount
function calculateTokenAmount(uint256[] amounts, bool deposit) external view returns (uint256)
Parameters
Returns
flashLoan
function flashLoan(address receiver, contract IERC20 token, uint256 amount, bytes params) external nonpayable
Parameters
getA
function getA() external view returns (uint256)
Returns
getToken
function getToken(uint8 index) external view returns (contract IERC20)
Parameters
Returns
getTokenBalance
function getTokenBalance(uint8 index) external view returns (uint256)
Parameters
Returns
getTokenIndex
function getTokenIndex(address tokenAddress) external view returns (uint8)
Parameters
Returns
getVirtualPrice
function getVirtualPrice() external view returns (uint256)
Returns
initialize
function initialize(contract IERC20[] pooledTokens, uint8[] decimals, string lpTokenName, string lpTokenSymbol, uint256 a, uint256 fee, uint256 adminFee, address lpTokenTargetAddress) external nonpayable
Parameters
removeLiquidity
function removeLiquidity(uint256 amount, uint256[] minAmounts, uint256 deadline) external nonpayable returns (uint256[])
Parameters
Returns
removeLiquidityImbalance
function removeLiquidityImbalance(uint256[] amounts, uint256 maxBurnAmount, uint256 deadline) external nonpayable returns (uint256)
Parameters
Returns
removeLiquidityOneToken
function removeLiquidityOneToken(uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount, uint256 deadline) external nonpayable returns (uint256)
Parameters
Returns
swap
function swap(uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy, uint256 deadline) external nonpayable returns (uint256)
Parameters
Returns