Submitted by leastwood
The provide function does not take a _steps argument and will instead calculate addingLiquidity by truncating amounts under step. As a result, if there is an excess of usdm such that the truncated amount exceeds the contracts pool3 truncated balance, then the function will revert due to insufficient pool3 collateral.
This will prevent guardians from effectively providing liquidity whenever tokens are available. Consider the following example:
USDMPegRecovery.sol#L73-L82
Manual code review.
Discussions with Taek.
Consider modifying the provide function such that a _steps argument can be supplied. This will allow guardians to maximise the amount of liquidity provided to the Curve pool.
leekt (Concur) confirmed
Alex the Entreprenerd (judge) commented:
