Skip to content
Request an audit

‹ All findings

Attackers can include other users nullifiers to make their funds stuck when adding liquidity to curve

Crit/HighSingularity·Three Sigma · Private DeFi access · 26th February, 20243S-SG-H07

Description

CurveLiquidityAssetManager::curveAddLiquidity() always spends the nullifiers, even if the amounts used are 0.

In the circuit, if the amount is 0, it does not validate the nullifier against the user signature, making it possible to include nullifiers from other users in the same transaction and losing their funds forever.

Here is the poc.

Recommendation

In CurveAddLiquidityAssetManager::_addLiquidity() skip _postWithdraw() if the amount is 0.

Status

Addressed in #8b300f0.