Skip to content

Add quota-controlled ERC-20 fee paymaster - #127

Merged
aliXsed merged 1 commit into
mainfrom
feat/erc20-fee-paymaster
Jul 31, 2026
Merged

Add quota-controlled ERC-20 fee paymaster#127
aliXsed merged 1 commit into
mainfrom
feat/erc20-fee-paymaster

Conversation

@aliXsed

@aliXsed aliXsed commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds ERC20FeePaymaster: ApprovalBased-only paymaster so users can pay zkSync gas in a single ERC-20 fee token (NODL)
  • Off-chain erc20-fee-signer EIP-712-signs fee approvals; inner input shape matches ZyFi (expirationTime, signature)
  • Caps periodic ETH spend to the bootloader via existing QuotaControl (plus 15-minute max approval TTL)

Companion backend: NodleCode/erc20-fee-signer · Tracking: meta#193

Test plan

  • forge test --match-contract ERC20FeePaymasterTest
  • Review EIP-712 domain / FeeApproval typehash against what erc20-fee-signer will implement
  • Confirm initial ETH quota / period values for staging deploy (out of scope here)

Made with Cursor

ApprovalBased paymaster verified by EIP-712 fee-signer signatures, with
periodic ETH spend capped via QuotaControl for erc20-fee-signer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

LCOV of commit 356c735 during checks #757

Summary coverage rate:
  lines......: 26.5% (939 of 3550 lines)
  functions..: 27.0% (150 of 555 functions)
  branches...: 27.1% (164 of 605 branches)

Files changed coverage rate:
                                                    |Lines       |Functions  |Branches    
  Filename                                          |Rate     Num|Rate    Num|Rate     Num
  ========================================================================================
  src/paymasters/ERC20FeePaymaster.sol              | 0.0%     54| 0.0%     7| 0.0%     13
  test/paymasters/ERC20FeePaymaster.t.sol           | 0.0%      2| 0.0%     1|    -      0

@aliXsed
aliXsed merged commit 5caa74b into main Jul 31, 2026
3 checks passed
@aliXsed
aliXsed deleted the feat/erc20-fee-paymaster branch July 31, 2026 01:41
Douglasacost added a commit that referenced this pull request Aug 24, 2026
…tive

Factual corrections found while verifying every citation against source:

- OpenZeppelin removed Escrow/ConditionalEscrow/RefundEscrow in 5.0.0, not
  4.0 (vendored CHANGELOG; the contracts survived through 4.9). Corrected in
  three places plus the Sources entry.
- Juicebox has not wound down. V4 shipped April 2025 and the protocol is live
  with active TVL. Its model is rejected on its own merits, not for lack of a
  maintainer. Party Protocol, Gitcoin Allo and Mirror had wound down as stated.
- Party Protocol's review history is a 0xMacro audit plus several Code4rena
  engagements, not two; "the only serious audit history in this space" was
  overstated and is now scoped to this contract shape.
- The Code4rena finalization finding locks funds until expiry rather than
  permanently, and is now cited as M-06 to avoid colliding with this repo's
  PR #127.
- Solidity by Example's CrowdFund is MIT-licensed; say so instead of leaving
  it as an open question.

Consistency and fitness:

- minContribution/maxTotalContributions were listed as backend-only policy
  while also being on-chain fields signed into the creation authorization.
  They are contract-enforced on deposit and never on finalize.
- Dropped IGroupFundraisingGaslessValidator from the file layout, which
  contradicted the conclusion that no validator hook is needed.
- Fixed the stale docs/ path in the file layout.
- Removed version banners, decision-log lines and references to earlier
  drafts so the document reads as a standalone specification.
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