ISwapPool

Public functions of the SwapPool.

Burn

event Burn(address sender, uint256 poolSharesBurned, uint256 amountPrincipleWithdrawn)

emitted on every withdrawal special case withdrawal using backstop liquidiity: amountPrincipleWithdrawn = 0

ChargedSwapFees

event ChargedSwapFees(uint256 lpFees, uint256 backstopFees, uint256 protocolFees)

Tracks the exact amounts of individual fees paid during a swap

Mint

event Mint(address sender, uint256 poolSharesMinted, uint256 amountPrincipleDeposited)

emitted on every deposit

ProtocolTreasuryChanged

event ProtocolTreasuryChanged(address sender, address newProtocolTreasury)

emitted when the protocol treasury address is changed

coverage

function coverage() external view returns (uint256 reserves, uint256 liabilities)

deposit

function deposit(uint256 amount) external returns (uint256 poolShares, int256 fee)

totalLiabilities

function totalLiabilities() external view returns (uint256 totalLiabilities)

reserve

function reserve() external view returns (uint256 reserve)

reserveWithSlippage

function reserveWithSlippage() external view returns (uint256 reserveWithSlippage)

slippageCurve

function slippageCurve() external view returns (contract ISlippageCurve slippageCurve)

backstop

function backstop() external view returns (contract IBackstopPool _pool)

protocolTreasury

function protocolTreasury() external view returns (address)

quoteSwapInto

function quoteSwapInto(uint256 _amount) external view returns (uint256 _effectiveAmount)

quoteSwapOut

function quoteSwapOut(uint256 _amount) external view returns (uint256 _effectiveAmount, uint256 _protocolFeeWithSlippage, uint256 _effectiveLpFee, uint256 _backstopFee)

router

function router() external view returns (contract IRouter _router)

sharesTargetWorth

function sharesTargetWorth(uint256 _shares) external view returns (uint256 _amount)

swapFees

function swapFees() external view returns (uint256 _lpFee, uint256 _backstopFee, uint256 _protocolFee)

get swap fees (applied when swapping liquidity out), in 0.0001%

getExcessLiquidity

function getExcessLiquidity() external view returns (int256 _excessLiquidity)

Last updated