SwapUtilsGuarded
Functions:
Events:
Function getA(struct SwapUtilsGuarded.Swap self) → uint256
getA(struct SwapUtilsGuarded.Swap self) → uint256Parameters:
Return Values:
Function getAPrecise(struct SwapUtilsGuarded.Swap self) → uint256
getAPrecise(struct SwapUtilsGuarded.Swap self) → uint256Parameters:
Return Values:
Function getDepositTimestamp(struct SwapUtilsGuarded.Swap self, address user) → uint256
getDepositTimestamp(struct SwapUtilsGuarded.Swap self, address user) → uint256Parameters:
Return Values:
Function calculateWithdrawOneToken(struct SwapUtilsGuarded.Swap self, address account, uint256 tokenAmount, uint8 tokenIndex) → uint256, uint256
calculateWithdrawOneToken(struct SwapUtilsGuarded.Swap self, address account, uint256 tokenAmount, uint8 tokenIndex) → uint256, uint256Parameters:
Return Values:
Function getVirtualPrice(struct SwapUtilsGuarded.Swap self) → uint256
getVirtualPrice(struct SwapUtilsGuarded.Swap self) → uint256Parameters:
Return Values:
Function calculateSwap(struct SwapUtilsGuarded.Swap self, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256 dy
calculateSwap(struct SwapUtilsGuarded.Swap self, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx) → uint256 dyParameters:
Return Values:
Function calculateRemoveLiquidity(struct SwapUtilsGuarded.Swap self, address account, uint256 amount) → uint256[]
calculateRemoveLiquidity(struct SwapUtilsGuarded.Swap self, address account, uint256 amount) → uint256[]Parameters:
Return Values:
Function calculateCurrentWithdrawFee(struct SwapUtilsGuarded.Swap self, address user) → uint256
calculateCurrentWithdrawFee(struct SwapUtilsGuarded.Swap self, address user) → uint256Parameters:
Return Values:
Function calculateTokenAmount(struct SwapUtilsGuarded.Swap self, address account, uint256[] amounts, bool deposit) → uint256
calculateTokenAmount(struct SwapUtilsGuarded.Swap self, address account, uint256[] amounts, bool deposit) → uint256Parameters:
Return Values:
Function getAdminBalance(struct SwapUtilsGuarded.Swap self, uint256 index) → uint256
getAdminBalance(struct SwapUtilsGuarded.Swap self, uint256 index) → uint256Parameters:
Return Values:
Function swap(struct SwapUtilsGuarded.Swap self, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256
swap(struct SwapUtilsGuarded.Swap self, uint8 tokenIndexFrom, uint8 tokenIndexTo, uint256 dx, uint256 minDy) → uint256Parameters:
Return Values:
Function addLiquidity(struct SwapUtilsGuarded.Swap self, uint256[] amounts, uint256 minToMint, bytes32[] merkleProof) → uint256
addLiquidity(struct SwapUtilsGuarded.Swap self, uint256[] amounts, uint256 minToMint, bytes32[] merkleProof) → uint256Parameters:
Return Values:
Function updateUserWithdrawFee(struct SwapUtilsGuarded.Swap self, address user, uint256 toMint)
updateUserWithdrawFee(struct SwapUtilsGuarded.Swap self, address user, uint256 toMint)Parameters:
Function removeLiquidity(struct SwapUtilsGuarded.Swap self, uint256 amount, uint256[] minAmounts) → uint256[]
removeLiquidity(struct SwapUtilsGuarded.Swap self, uint256 amount, uint256[] minAmounts) → uint256[]Parameters:
Return Values:
Function removeLiquidityOneToken(struct SwapUtilsGuarded.Swap self, uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount) → uint256
removeLiquidityOneToken(struct SwapUtilsGuarded.Swap self, uint256 tokenAmount, uint8 tokenIndex, uint256 minAmount) → uint256Parameters:
Return Values:
Function removeLiquidityImbalance(struct SwapUtilsGuarded.Swap self, uint256[] amounts, uint256 maxBurnAmount) → uint256
removeLiquidityImbalance(struct SwapUtilsGuarded.Swap self, uint256[] amounts, uint256 maxBurnAmount) → uint256Parameters:
Return Values:
Function withdrawAdminFees(struct SwapUtilsGuarded.Swap self, address to)
withdrawAdminFees(struct SwapUtilsGuarded.Swap self, address to)Parameters:
Function setAdminFee(struct SwapUtilsGuarded.Swap self, uint256 newAdminFee)
setAdminFee(struct SwapUtilsGuarded.Swap self, uint256 newAdminFee)Parameters:
Function setSwapFee(struct SwapUtilsGuarded.Swap self, uint256 newSwapFee)
setSwapFee(struct SwapUtilsGuarded.Swap self, uint256 newSwapFee)Parameters:
Function setDefaultWithdrawFee(struct SwapUtilsGuarded.Swap self, uint256 newWithdrawFee)
setDefaultWithdrawFee(struct SwapUtilsGuarded.Swap self, uint256 newWithdrawFee)Parameters:
Function rampA(struct SwapUtilsGuarded.Swap self, uint256 futureA_, uint256 futureTime_)
rampA(struct SwapUtilsGuarded.Swap self, uint256 futureA_, uint256 futureTime_)Parameters:
Function stopRampA(struct SwapUtilsGuarded.Swap self)
stopRampA(struct SwapUtilsGuarded.Swap self)Parameters:
Event TokenSwap(address buyer, uint256 tokensSold, uint256 tokensBought, uint128 soldId, uint128 boughtId)
TokenSwap(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 RemoveLiquidity(address provider, uint256[] tokenAmounts, uint256 lpTokenSupply)
RemoveLiquidity(address provider, uint256[] tokenAmounts, 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)Event RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime)
RampA(uint256 oldA, uint256 newA, uint256 initialTime, uint256 futureTime)Event StopRampA(uint256 currentA, uint256 time)
StopRampA(uint256 currentA, uint256 time)Last updated
Was this helpful?
