Phoenix-Protocol-Group / phoenix-contracts

Source code of the smart contracts of the Phoenix DeFi hub DEX protocol
GNU General Public License v3.0
10 stars 6 forks source link

PHOAM-004: Default slippage for volatile pairs could trigger excessive reverts when providing liquidity #319

Closed gangov closed 2 weeks ago

gangov commented 2 weeks ago

Description Liquidity provision of volatile pairs using the default slippage will likely always revert. This could happen since volatile pairs have a higher slippage on average than less volatile ones. As a consequence, the process of providing liquidity could be disrupted by users using the default value. When users don't provide a slippage while providing liquidity, a default of 100 BPS is set regardless the pair. For volatile pairs, this represents a small value that will likely trigger a revert and therefore waste user's resources.

Recommendation Set the default slippage when deploying each pair. Since both tokens are known before the deployment, the volatility could be estimated allowing to set more precise default values for each case.