LockstakeClipper.yank did not process the burned lsmkr token
Summary
LockstakeClipper.yank did not process the burned lsmkr token, resulting in loss of funds.
Root Cause
When the user is liquidated, lsmkr.burn is executed in LockstakeEngine.onKick,
However, when canceling the auction using LockstakeClipper.yank, no processing is done on the lsmkr token.
From the contest readme: "Using yank() in the lockstake clipper is assumed to only happen as part of a shutdown procedure. Since this is out of scope, it is assumed not to happen."
zhoo
Medium
LockstakeClipper.yank did not process the burned lsmkr token
Summary
LockstakeClipper.yank did not process the burned lsmkr token, resulting in loss of funds.
Root Cause
When the user is liquidated,
lsmkr.burn
is executed inLockstakeEngine.onKick
, However, when canceling the auction usingLockstakeClipper.yank
, no processing is done on the lsmkr token.LockstakeClipper.kick -> LockstakeEngine.onKick -> lsmkr.burn
lsmkr token is not processed when yank:
https://github.com/sherlock-audit/2024-06-makerdao-endgame/blob/dba30d7a676c20dfed3bda8c52fd6702e2e85bb1/lockstake/src/LockstakeEngine.sol#L428
https://github.com/sherlock-audit/2024-06-makerdao-endgame/blob/dba30d7a676c20dfed3bda8c52fd6702e2e85bb1/lockstake/src/LockstakeClipper.sol#L476
Internal pre-conditions
External pre-conditions
No response
Attack Path
LockstakeClipper.yank
to cancel the auction.LockstakeEngine.onKick
is not processed, resulting in a loss of funds.Impact
Cause the loss of funds.
PoC
No response
Mitigation
The
yank
function sends the burnedlsmkr token
to themsg.sender
Duplicate of #83