Threats in v0.6
Many services are still using v0.6 of EntryPoint. This page explains the potential threats that may arise from v0.6.
postOp with postOpReverted mode
In v0.6 of EntryPoint, the postOp
function can be executed twice. If the first postOp
function results in a revert, the second postOp
function is executed with PostOpMode.postOpReverted
as an argument. This can lead to gas griefing for the paymaster.
Example Case:
If the TokenPaymaster
immediately returns when the mode is PostOpMode.postOpReverted
, the refillEntryPointDeposit
function will not be called, and the paymaster’s gas will not be refilled. As a result, a malicious user can intentionally trigger a revert in the first postOp
function to set the mode to PostOpMode.postOpReverted
and attempt to gas grief the paymaster.
Mitigation : The function to refill the paymaster's funds must be executed regardless of the mode to ensure the paymaster's gas is replenished properly.
Last updated