Closed sherlock-admin3 closed 1 month ago
This is clearly specified in the scope...
"wipeAll and wipe do not drip because it is actually not convenient for the user to do a drip call on wipping. Then, if we force the drip, we are incentivizing users to repay directly to the vat (which is possible) instead of using the engine for that. We are mimicking the old proxy actions behaviour, where we drip for drawing, as otherwise the user can lose money, but not forcing the drip on wiping so users actually use this function."
Random_dude
Medium
wipe function will use stale rate when ilk in the engine is not updated through Jug.drip()
Summary
Missing drip call to the jug, will result of users paying their debt using stale rate.
https://github.com/sherlock-audit/2024-06-makerdao-endgame/blob/main/lockstake/src/LockstakeEngine.sol#L391
, which is cheaper than new rate. which means loss for the protocol.Root Cause
missing drip call to the jug when calling wipe function in the LockstakeEngine.sol
Internal pre-conditions
anyone can call wipe
External pre-conditions
ilk in the lockstakeengine not being called for some period of times
Attack Path
Impact
pay the debt using stale rate, which doesnt reflect the actual rate of the ilk
PoC
modified the test for testDrawWipe()
Mitigation
add jug.drip(ilk) like in the draw(), to use fresh rate when paying the debt.
Duplicate of #66