Withdrawals
Only
liquidityProvider
can withdraw fromHOT
, which then calls thewithdrawLiquidity
function inpool
The
withdrawLiquidity
function offers some degree of protection against spot price manipulation attacks:liquidityProvider
can pass the expected lower and upper bounds of sqrt spot price. If sqrt spot price is beyond these, the transaction reverts.
WARNING: It assumes that
liquidityProvider
is a contract that takes sufficient precautions to correctly tokenise liquidity shares (if applicable), prevent sandwich attacks and/or protections against AMM spot price manipulation, or other applicable protections such as timelocks.
Setting Price Bounds
The liquidityProvider
role can manage the lower and upper bound of the liquidity position using the setPriceBounds
function, to provide a concentrated liquidity experience for its users.
Note: Although we assume that the LPs trust the liquidityProvider
when they deposit their funds, the liquidity provider can additionally add a small timelock to the setPriceBounds function call, to prevent attack vectors, where a malicious liquidityProvider concentrates liquidity at a bad spot price.
WARNING: liquidityProvider
is expected to have appropriate internal protections against any kind of spot price manipulation attack, or other common attack vectors. ( More on this in the threats and roles document )
Last updated