Skip to content

refactor: remove bounty system from PaymasterHub#118

Merged
hudsonhrh merged 1 commit intomainfrom
hudsonhrh/remove-bounty-system
Mar 8, 2026
Merged

refactor: remove bounty system from PaymasterHub#118
hudsonhrh merged 1 commit intomainfrom
hudsonhrh/remove-bounty-system

Conversation

@hudsonhrh
Copy link
Member

Summary

Remove the bundler-tipping bounty system and simplify PaymasterHub for launch by eliminating unnecessary complexity and attack surface. The bounty feature was not essential for standard ERC-4337 payments and added unwanted mental model.

Changes:

  • Delete bounty struct, storage, and functions (setBounty, fundBounty, sweepBounty, _processBounty)
  • Remove bounty events and InvalidBountyConfig error
  • Shrink paymaster data payload from 130 to 122 bytes (remove mailboxCommit8 field)
  • Simplify postOp context from 7 to 4 fields (remove userOpHash, mailboxCommit8, tx.origin)
  • Remove postUserOp function and dead UserOpPosted event
  • Streamline postOp to only do accounting (budget updates + org financials)

Test Coverage

Added 7 comprehensive tests covering critical gaps:

  • Payload boundary tests (121 bytes rejects, 122 accepts, 130 backward compat)
  • Context round-trip validation through validate+postOp
  • postOp accounting verification

All 144 paymaster tests pass. Full backward compatibility maintained for longer payloads.

🤖 Generated with Claude Code

Remove the bundler-tipping bounty system and simplify paymaster for launch:
- Delete bounty struct, storage, functions (setBounty, fundBounty, sweepBounty, _processBounty)
- Remove receive() function (bounty funding only)
- Simplify payload format: 130 -> 122 bytes (remove mailboxCommit8 field)
- Simplify context: 7 -> 4 fields (remove userOpHash, mailboxCommit8, tx.origin)
- Remove postUserOp function and UserOpPosted event
- Streamline postOp to only do accounting (budget + org financials)
- Update all tests with 7 new tests covering payload boundaries and context round-trips
- Clean up documentation (remove bounty section, update payload format docs)

All 144 paymaster tests pass. Backward compatible: 130-byte payloads still accepted.

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Coverage Report

Metric Coverage
Lines 100.00% (0/0)
Statements 100.00% (0/0)
Branches 100.00% (0/0)
Functions 100.00% (0/0)
Coverage by file
File Lines Statements Branches Functions

@hudsonhrh hudsonhrh merged commit e7037be into main Mar 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant