You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue was that safeApprove() was used in addLiquidity() and addLiquidityOnlyStETH() which reverts if there is still some remaining allowance.
Mitigation review
The instances of safeApprove() have simply been replaced by approve(), which does not revert. The (arguably false sense of) security provided by safeApprove() by prohibiting the allowance to be set from non-zero to non-zero is not needed in addLiquidity() and addLiquidityOnlyStETH() since these functions are access restricted to the admin.
The text was updated successfully, but these errors were encountered:
Lines of code
Vulnerability details
Mitigation of M-04: Issue mitigated
Mitigated issue
M-04: Unspent allowance may break functionality in AMO
Fix: code-423n4/2023-05-xeth@793dade
The issue was that
safeApprove()
was used inaddLiquidity()
andaddLiquidityOnlyStETH()
which reverts if there is still some remaining allowance.Mitigation review
The instances of
safeApprove()
have simply been replaced byapprove()
, which does not revert. The (arguably false sense of) security provided bysafeApprove()
by prohibiting the allowance to be set from non-zero to non-zero is not needed inaddLiquidity()
andaddLiquidityOnlyStETH()
since these functions are access restricted to the admin.The text was updated successfully, but these errors were encountered: