Precision loss in the invariant function can lead to loss of funds
The invariant function in the Pair contract performs division before multiplication, causing precision loss that can make the invariant check pass even when it should fail. An attacker can exploit this to withdraw funds from the pool without affecting the invariant, as demonstrated by a test where 0.5 USDC was stolen.
Numoen contest
High