General Reputation Rules
Addresses in ERC-4337 have a reputation in the public mempool.
GREP-010 Banned Addresses
Addresses can be banned from the public mempool if it spams the network with requests.
An address is banned if max_seen > opsIncluded + BAN_SLACK
.
max_seen = opsSeen // MIN_INCLUSION_RATE_DENOMINATOR
opsSeen
is a per-entity counter of how many times a unique valid user operation referencing the entity was received by an individual bundler. This includes both user operations received from RPC calls and from user operations received through the public mempool. It is updated every hour asopsSeen = opsSeen * 23 // 24
.MIN_INCLUSION_RATE_DENOMINATOR
is 100 for a client and 10 for a bundler.
opsIncluded
is a per-entity counter of how many times a unique valid UserOperation referencing this entity appeared in an actual included UserOperation. It is only based on user operation events and is only counted for user operations that were counted asopsSeen
.BAN_SLACK
is 50 user operations.
Example
A malicious paymaster tries to spam the network. At most, the bundler network will process only ~20 non-paying user operations per hour (BAN_SLACK * MIN_INCLUSION_RATE_DENOMINATOR / 24
= 50 * 10 / 24
= 20.83
)
GREP-020 Throttled Addresses
A throttled address is limited to:
THROTTLED_ENTITY_MEMPOOL_COUNT
(4) user operations in the mempoolTHROTTLED_ENTITY_BUNDLE_COUNT
(4) user operations in a bundle.- Can remain in the mempool only for
THROTTLED_ENTITY_LIVE_BLOCKS
(10).
Calculation
A throttled address is limited to:
THROTTLED_ENTITY_MEMPOOL_COUNT
(4) user operations in the mempoolTHROTTLED_ENTITY_BUNDLE_COUNT
(4) user operations in a bundle.- Can remain in the mempool only for
THROTTLED_ENTITY_LIVE_BLOCKS
(10).
Calculation
The formula for throttling an address is similar to GREP-10. An address is throttled if max_seen > opsIncluded + THROTTLING_SLACK
.
max_seen = opsSeen // MIN_INCLUSION_RATE_DENOMINATOR
opsSeen
is a per-entity counter of how many times a unique valid user operation referencing the entity was received by an individual bundler. This includes both user operations received from RPC calls and from user operations received through the public mempool. It is updated every hour asopsSeen = opsSeen * 23 // 24
.MIN_INCLUSION_RATE_DENOMINATOR
is 100 for a client and 10 for a bundler.
opsIncluded
is a per-entity counter of how many times a unique valid UserOperation referencing this entity appeared in an actual included UserOperation. It is only based on user operation events and is only counted for user operations that were counted asopsSeen
.THROTTLING_SLACK
is 10 user operations.
GREP-040 Second Validation
If an entity fails the bundle creation after passing second validation, it is banned.
This is done by settings its opsSeen
to BAN_OPS_SEEN_PENALTY
, and opsIncluded
to zero, so that the calculation in GREP-010 Banned Addresses returns true.
Updated 8 months ago