In the realm of decentralized finance, the design of smart contracts plays a pivotal role in maintaining market stability and user trust. A crucial aspect of this design is ensuring adequate liquidity, particularly in scenarios where theres a surge in selling activity. Contracts that solely rely on token purchases as their ETH source:
https://github.com/code-423n4/2024-01-curves/blob/main/contracts/Curves.sol#L211
https://github.com/code-423n4/2024-01-curves/blob/main/contracts/Curves.sol#L369
https://github.com/code-423n4/2024-01-curves/blob/main/contracts/Curves.sol#L383
https://github.com/code-423n4/2024-01-curves/blob/main/contracts/Curves.sol#L408
May face challenges in fulfilling sell orders if the demand to sell surpasses the available ETH, leading to potential liquidity crises.
Apparently, the quadratic bonding formula might not guarantee a zero sum game, i.e. the gain of users buying low and selling high exactly matches the loss of users buying high and selling low. This could lead to tapping into ETH reserve belonging to other Curves token subjects which should not be the intended design/purpose.
This situation underscores the importance of incorporating diverse mechanisms such as external ETH funding sources, reserve pools, or dynamic pricing models to safeguard against liquidity shortages. Such proactive measures in smart contract design not only enhance the robustness of the financial ecosystem but also bolster user confidence, ensuring a smoother and more reliable trading experience.
