Open hats-bug-reporter[bot] opened 11 months ago
The validator will be marked as BEING_SLASHED much earlier their exit & withdrawal from Beacon is processed. So, there is no practical risk here. TY!
Hey @seongyun-ko,
Whenever the validator will be marked BEING_SLASHED
the beneficiaries can immediately withdraw their rewards. I don't see how being marked earlier than their exit & withdrawal would prevent this. It's highly likely that the node accumulated profits before they were marked.
Thanks!
Github username: @0xfuje Twitter username: 0xfuje Submission hash (on-chain): 0x55f643f3d2b3a8cbccec64be6e17f9eea232383f4d4d95db86d8ad37eb4ef46e Severity: medium
Description:
Description
The admin can mark an
EtherFiNode
as slashed viaEtherFiNodeManager
-markBeingSlashed()
. When a validator is slashed, they are not supposed to withdraw their node rewards: however a beneficiary of rewards can still withdraw (if the node's balance is below 8 ether) via front-runningmarkBeingSlashed()
and callingpartialWithdraw()
.src/EtherFiNodeManager.sol
-markBeingSlashed()
When
markBeingSlashed()
is front-runned the actual phase will still beVALIDATOR_PHASE.LIVE
instead ofVALIDATOR_PHASE.BEING_SLASHED
.src/EtherFiNodeManager.sol
-partialWithdraw()
Proof of Concept
test/EtherFiNode.t.sol
run
forge test --match-test test_WithdrawBeforeSlash_0xfuje -vvvv