Background
In the x402 payment protocol, we aim for:- Gasless users: the Facilitator pays all on-chain transaction fees
- Minimal trust: the user only needs to trust the seller, not the Facilitator
- Simplicity: the seller does not need to deploy complex smart contracts
Trust issues with traditional Permit approaches
Approach A: authorize the Facilitator
If the user authorizes the Facilitator (spender = facilitator), there are trust risks:
- The user must trust the Facilitator not to act maliciously
- The Facilitator can theoretically move funds to any address
- Violates x402’s “minimal trust” principle
Approach B: authorize the seller — who pays gas?
If the user authorizes the seller directly (spender = seller):
- The seller must submit the transaction and pay gas
- Or the seller must deploy a smart contract to handle the payment
- Raises the seller’s technical barrier and cost
EIP-7702 to the rescue
What is EIP-7702?
EIP-7702 allows EOA (regular wallet addresses) to temporarily gain smart contract capabilities:- Via an off-chain signature, an EOA can “delegate” smart contract code
- During the delegation, the EOA behaves like a smart contract
- The delegation can be revoked anytime to restore a normal EOA
How the seller wallet contract works
After the seller upgrades their EOA into a “seller wallet” via EIP-7702, it can implement:- Receive the user’s Permit authorization (authorized to the seller EOA)
- Automatically execute transfers (from the user wallet to the seller EOA)
- Automatically split:
- 99% to the seller’s beneficiary address
- 1% as the Facilitator fee
Full payment flow
Key benefits
1. Zero-custody risk
- Facilitator only: submits tx + pays gas
- Funds go directly from user to seller-designated address
- No third-party custody involved
2. Minimal-trust model
- The user only needs to trust the seller (natural buyer-seller trust)
- No need to trust the Facilitator or any third party
- Matches user expectations
3. Fully gasless for users
- All on-chain fees are paid by the Facilitator
- The user only signs (off-chain, free)
- Facilitator is incentivized via fee share (e.g., 1%)
4. Zero barrier for sellers
- One-time setup cost: ~$1–3 (EIP-7702 authorization gas)
- All subsequent payments: zero cost
- Much lower than deploying a contract (~$50–200)
5. Flexible configuration
Each seller can configure:- Beneficiary address: where funds finally arrive
- Fee rate: the Facilitator’s share (e.g., 0–5%)
- Trusted Facilitators: whitelist mechanism
6. Keep EOA identity
Comparison to other approaches
| Approach | Gasless user | Minimal-trust | Seller barrier | Cost |
|---|---|---|---|---|
| Authorize Facilitator | ✅ | ❌ | Low | None |
| Seller submits tx | ❌ | ✅ | Medium | None |
| Seller deploys contract | ✅ | ✅ | High | Medium |
| EIP-7702 seller wallet | ✅ | ✅ | Low | Low (~$0.05) |
Suitable scenarios
✅ Recommended for:
- Support for more tokens/chains/use cases
- Minimal-trust principle (buyer only trusts the seller)
- Desire to incentivize Facilitators (fee sharing)