---
title: Decentralized AA Paymaster
description: Compared to the Business, Closed Source, and Central Relay Paymasters, we provides a Community, Open Source, Decentralized Paymaster Framework to Sponsor Every Transaction.
author: Huifeng Jiao(@jhfnetboy), Jaydon Sudo(@cejay)
discussions-to: (https://ethereum-magicians.org/t/eip-xxxx-decentralized-aa-paymaster/xxx)
status: Draft
type: Standards Track
category: ERC
created: 2024-03-04
requires: EIP-4337, EIP-7560 # Only required when you reference an EIP in the `Specification` section. Otherwise, remove this field.
# filename, `eip-draft_title_abbrev.md` befor editro assign an EIP number.
---
[TOC]
## Abstract
An decentralized paymaster proposal based on account abstraction that can sponsor every transaction for account which supports gas abstraction(contract account in ERC4337 or EOA in RIP7560). It comprises three parts and support ERC 4337 `UserOperation` and RIP 7560 `TYPE4 Transaction`.
1. A `contract` to serve as a traditional paymaster and a `router` of all paymaster relays.
2. A permissionless `paymaster relay` with `open source` docker image provided to run the signature service.
3. A pre defined `flow and data structure` support variant transaction sponsorship.
## Motivation
1. **Weak censorship**
Most paymaster services would like to run by a **business** organization with a **relay** and **close source** mode.
It make sense if there are no authorities **censorship**.
It maybe a risk on censorship if there are full of business paymasters, so we need a decentralized paymaster mechanism with Community.
2. **Diverse market**
Ethereum is persuring on Account Abstraction to build human digital future with mass adoption.
And, the diverse sponsorship motivation and targets need a decentralized, permissionless paymaster mechanism to service the users with different payment method and ERC20 tokens on a open and diverse market.
We can help most of the newbies who are blocked cause of no paymaster sponsor their transactions.
3. **Application friendly**
Any wallet or application want to find a suitable gas sponsor provider, can use only `one contract` address on one chain.
Query flow with specific structure:
```
query to contract:
{
userOps,
from,
[payment methos],
[ERC20 token you have]
}
result:
{
paymaster relay API URL,
}
if query API, get
{
{quota1,
signature
},
{quota2,
signature
},
}
```
4. **Sponsor friendly**
Anyone who want run a paymaster service to sponsor any transaction, just clone the source code or run the open source docker image in one-key.
It will be build and maintaince in a open source community for long term service to keep a single lanuage to communicate.
5. **Decentralized staking**
We are thinking about cooperation with the improve the stake balance of validator. More paymasters, more small stakers, it will improve the decentralization of staking.
6. **Keeping evolution with AA**
The group will push forward to multi-chain solution with EVM or ZKEVM adaptable. Support Native AA gas sposor like StarkNet. And support like EIP6551 or EIP5189 and more with evolution.
There will be a open source community to build, run and maintain the tech stack.
7. **Community friendly**
If we build a mechanism which allow small crypto communities to run a paymaster service with one key installation. They will stake individually on Ethereum, and get a stable and sustainable revenue not only 4% staking income, but also a compound benefit on every transaction.
Therefore, we should luanch a proposal, to build a standard interface, data structure and communication rule to guarantee these be happen.
## Specification
### Definitions
+ **Account** - it will be a EOA or a contract account which support gas abstraction.
+ **Entrypoint** - a EIP 4337 conception, a singleton contract to execute bundles of UserOperations. Bundlers/Clients whitelist the supported entrypoint.
+ **Bundler** - a EIP 4337 conception, a node (block builder) that can handle UserOperations,
create a valid an EntryPoint.handleOps() transaction,
and add it to the block while it is still valid.
+ **Builder** - a Ethereum block builder which support RIP 7560(TYPE4 transaction).
+ **Super paymaster contract** - a contract defined by this proposal to act as all the relayted paymaster's contract to pay gas for the transaction. It can connected with every super paymaster contract like stackable toys.
+ **Paymaster Relay**, a relay service which get the gas sponsor payment and sign the UserOps or transactions to guarantee the Entrypoint will get gas fee from the paymaster stake or itself.
### ERC4337
We will be adaptable with ERC 4337 `UserOption` which can help every contract account to complement gas abstraction.
This proposal is consistent with the 4337 protocol concept: Bundler, Entrypoint, Paymaster.
**graph here**
### RIP7560
We will support future RIP7560 gas abstraction on EOA and Native AA.
This proposal is consistent with the 4337 protocol concept: Bundler, Entrypoint, Paymaster.
**graph here**
### More Account Abstraction
All account abstraction should implemeted gas abstraction.
All gas abstractions require a outer role to pay gas for the account transaction, which we call paymaster.
There will be many kinds of applications which want use AA ability to improve their UX experience.
There will be many kinds of ERC20 tokens wants to get a limitied liquidity in their ecosystem.
So we open all the proposal for community to build a evolutionable SDK and more, to service the diverse complicated applications.
We provide a basic SDK and a simple blockchain game application scenario extension SDK for community.
**graph here**
**interface here**
### Summary
So, we provide a open standard:
1. Super Paymaster Contract which be Stackable.
2. Open Paymaster Relay Interfaces.
3. Open Source four kinds of Paymaster Relay Golang implemetations.
4. Open Paymaster Interfaces for Applications.
## Rationale
## Backwards Compatibility
## Test Cases
## Reference Implementation
## Security Considerations
1. Permit
## Copyright
Copyright and related rights waived via CC0.
## Citation
Please cite this document as:
Huifeng Jiao (@jhfnetboy), Jaydon Sudo (@cejay), "EIP-xxxx: Decentralized AA Paymaster [DRAFT]," Ethereum Improvement Proposals, no. xxxx, March 2024. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-xxxx.
### related
https://hackmd.io/@jhfnetboy/HkXy55iKa
###### tags: `paymaster` `AA` `EIP` `ETHPaymaster`