NablaBackstopPool
The backstop pool takes most of the risk of a set of swap pools backed by it. Whenever a swap pool is low on reserves and a LPer wants to withdraw some liquidity, they can conduct an insurance withdrawal (burn swap pool shares, reimbursed in backstop liquidity) to avoid paying a high slippage. The backstop pool owns all excess liquidity in its swap pools, but is also liable for potential liquidity gaps. In return, the backstop pool receives a cut of the swap fees.
Withdrawal
SwapPoolConfig
router
router instance for this backstop pool
getBackedPool
enumerate swap pools backed by this backstop pool
Parameters
Return Values
getBackedPoolCount
get swap pool count backed by this backstop pool
Return Values
getInsuranceFee
get insurance withdrawal fee for a given swap pool
Parameters
Return Values
deposit
Deposits amount of tokens into pool Will change cov ratio of pool, will increase delta to 0
By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)
Parameters
Return Values
initiateWithdraw
Starts the withdrawal process or overrides an existing one The user must finalize the withdrawal after the delay period has passed but before the claim period ends through finalizeWithdrawBackstopLiquidity()
or finalizeWithdrawExcessSwapLiquidity()
Parameters
Return Values
cancelWithdraw
Cancels an initiated withdrawal
Return Values
finalizeWithdrawBackstopLiquidity
Finalizes the withdrawal process after the delay period has passed but before the claim period ends Withdraws backstop liquidity amount of asset ensuring minimum amount required
By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)
Parameters
Return Values
redeemSwapPoolShares
Withdraw from a swap pool using backstop liquidity without slippage (backstop burn) only possible if swap pool's coverage ratio < 100%
By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)
Parameters
Return Values
finalizeWithdrawExcessSwapLiquidity
Finalizes the withdrawal process after the delay period has passed but before the claim period ends Withdraw from backstop pool, but receive excess liquidity of a swap pool instead of backstop liquidity
By calling this function the price feeds get updated (IPriceOracleAdapter.updatePriceFeeds)
Parameters
Return Values
redeemCrossSwapPoolShares
getTotalPoolWorth
return worth of the whole backstop pool in asset()
, incl. all swap pools' excess liquidity and the backstop pool's liabilities this is a fixed point number, using the backstop pool decimals
ignoring if pools are paused or not, since liabilities still apply and we don't want the backstop pool worth to jump
Parameters
Return Values
sharesTargetWorth
Returns the worth of an amount of pool shares (LP tokens) in underlying principle
Parameters
Return Values
getPoolState
returns the backstop pool state
Parameters
Return Values
getWithdrawal
Get information about a user's initiated withdrawal
Parameters
Return Values
getWithdrawalDelayAndClaimPeriod
Get the delay and claim period for withdrawals
Return Values
Last updated