Withdraw
withdraw
/// @param assets The amount of assets to withdraw
/// @param receiver The address that will receive the withdrawn assets
/// @param owner The address that owns the shares being withdrawn
/// @param minimumReceive The minimum amount of assets to be received by the receiver
/// @param checkSlippage When burning liquidity from Ambient Pool, Tempest's Vault checks the slippage of the pool price vs oracle price to prevent attacker from manipulating pool price and arbitrage burned liquidity.
/// However, in some cases, user is too panic and want to withdraw regardless of the price. Checking slippage may cause the withdrawing failed, especially if the price moves rapidly.
/// So that checkSlippage indicates that the vault should check slippage when burning liquidity or not.
/// Be careful when withdrawing with checkSlippage = false because of the chance to be arbitraged.
/// @return shares The amount of shares burned for the withdrawal
function withdraw(
uint256 assets,
address receiver,
address owner,
uint256 minimumReceive,
bool checkSlippage
) external returns (uint256 shares)redeem
redeemWithoutSwap
Last updated