In the QuantAMMWeightedPoolFactory contract, constructor is used to setup prominent parameter for security, attack response mechanisms etc. The parameters however, not santized due to which some severe consequences could occur like, Liquidity Lock-In, Market dynamics impact, Reputation damage, exploitations, no time to response to issues, etc.
QuantAMMWeightedPoolFactory::constructor:
Inadequate Time to Respond to Issues:
Admins or automation scripts might not have enough time to diagnose and fix the problem before the pause window expires.
Exploits or errors might persist after the short pause ends.
Operational Disruptions:
Frequent pauses and unpauses due to repeated issues could disrupt pool functionality and user trust.
Automation Ineffectiveness:
Automated mechanisms (e.g., Chainlink Keepers) may not react quickly enough to manage the situation within the short window.
Exacerbated Losses:
If a bug or exploit is not resolved quickly, malicious actors can continue taking advantage of the system after the pause expires.
Example Problem:
A stale oracle price triggers the pause mechanism. If the window is only 10 seconds, the issue remains unresolved, and swaps resume with incorrect pricing, leading to arbitrage exploits or LP losses.
Liquidity Lock-In:
LPs' funds remain inaccessible for an extended period, reducing trust in the protocol and discouraging participation.
Users needing liquidity may experience financial strain if they cannot withdraw their assets.
Market Dynamics Impact:
A prolonged pause might cause the pool's token prices to diverge significantly from the external market.
Arbitrage opportunities could be missed, or traders may avoid the pool entirely.
Protocol Reputation Damage:
Extended downtime can be seen as a failure, reducing user confidence and affecting adoption.
Governance Challenges:
A long pause could lead to contentious governance debates about whether and when to resume the pool, creating uncertainty.
Economic Inefficiency:
The protocol would miss out on swap fees and other revenue during the prolonged pause, affecting its sustainability.
Exploitation Risk:
If malicious actors trigger the pause intentionally (e.g., by exploiting a vulnerability), they could lock the pool indefinitely, harming LPs and users.
Example Problem:
An attacker uses a governance loophole to trigger a year-long pause. LPs cannot withdraw, and users avoid the protocol, leading to loss of liquidity and trust.
Manual Review
Chat GPT
Please add proper checks to mitigate pointed issues. One possible solution is given below:
QuantAMMWeightedPoolFactory::constructor:
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.