The removeLiquidity function in the DIVA protocol allows users to withdraw collateral by returning both long and short tokens. However, the protocol does not enforce an immediate lockup after an outcome is submitted but before it is finalized. This creates a time window where a user can observe the reported outcome and, if unfavorable, withdraw liquidity before finalization. This effectively allows liquidity providers to escape losses, leaving only remaining participants (who didn’t withdraw) to bear the risk.
An attacker can wait until the oracle submits an unfavorable outcome (e.g., long tokens are about to lose value), then remove liquidity before finalization, avoiding loss while still paying only a 0.3% fee.
Users who do not actively monitor or withdraw liquidity are unfairly disadvantaged. This undermines the integrity of the protocol, allowing sophisticated users to game the system while regular users bear disproportionate risks.
Introduce a lockup period where liquidity cannot be removed once an outcome is submitted but not yet finalized, ensuring fair risk distribution.
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.