MetaSwapUtils
Functions:
Events:
Function calculateWithdrawOneToken(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256 tokenAmount, uint8 tokenIndex) → uint256 dy
calculateWithdrawOneToken(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256 tokenAmount, uint8 tokenIndex) → uint256 dyParameters:
Return Values:
Function getVirtualPrice(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage) → uint256
getVirtualPrice(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage) → uint256Parameters:
Return Values:
Function calculateSwap(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256 dy
calculateSwap(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256 dyParameters:
Return Values:
Function calculateSwapUnderlying(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256
calculateSwapUnderlying(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256Parameters:
Return Values:
Function calculateTokenAmount(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, bool deposit) → uint256
calculateTokenAmount(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, bool deposit) → uint256Parameters:
Return Values:
Function swap(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256
swap(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256Parameters:
Return Values:
Function swapUnderlying(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256
swapUnderlying(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256Parameters:
Return Values:
Function addLiquidity(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, uint256 minToMint) → uint256
addLiquidity(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, uint256 minToMint) → uint256Parameters:
Return Values:
Function removeLiquidityOneToken(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount) → uint256
removeLiquidityOneToken(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount) → uint256Parameters:
Return Values:
Function removeLiquidityImbalance(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, uint256 maxBurnAmount) → uint256
removeLiquidityImbalance(struct SwapUtils.Swap self, struct MetaSwapUtils.MetaSwap metaSwapStorage, uint256[] amounts, uint256 maxBurnAmount) → uint256Parameters:
Return Values:
Event TokenSwap(address buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)
TokenSwap(address buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)Event TokenSwapUnderlying(address buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)
TokenSwapUnderlying(address buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)Event AddLiquidity(address provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)
AddLiquidity(address provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)Event RemoveLiquidityOne(address provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought)
RemoveLiquidityOne(address provider, uint256 lpTokenAmount, uint256 lpTokenSupply, uint256 boughtId, uint256 tokensBought)Event RemoveLiquidityImbalance(address provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)
RemoveLiquidityImbalance(address provider, uint256[] tokenAmounts, uint256[] fees, uint256 invariant, uint256 lpTokenSupply)Event NewAdminFee(uint256 newAdminFee)
NewAdminFee(uint256 newAdminFee)Event NewSwapFee(uint256 newSwapFee)
NewSwapFee(uint256 newSwapFee)Event NewWithdrawFee(uint256 newWithdrawFee)
NewWithdrawFee(uint256 newWithdrawFee)Last updated
Was this helpful?
