|
| 1 | +--- |
| 2 | +title: "ERC-2771 Meta-Transactions Integration" |
| 3 | +description: "Release notes for the SettleMint ERC-2771 meta-transactions integration" |
| 4 | +date: "2025-04-07" |
| 5 | +author: "SettleMint" |
| 6 | +--- |
| 7 | + |
| 8 | +# ERC-2771 Meta-Transactions Integration |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +## Overview |
| 13 | + |
| 14 | +The SettleMint platform now supports ERC-2771 meta-transactions, enabling gas-less transactions for end users. With this integration, transaction fees can be covered by a designated relayer instead of the end user, significantly improving the user experience for blockchain applications. This implementation is based on [OpenZeppelin's ERC2771Forwarder contract](https://docs.openzeppelin.com/contracts/5.x/api/metatx), providing a secure and standardized approach to meta-transactions. |
| 15 | + |
| 16 | +## Key Features |
| 17 | + |
| 18 | +### Gas-less Transactions |
| 19 | + |
| 20 | +- **Fee Abstraction**: End users can interact with blockchain applications without holding native tokens for gas |
| 21 | +- **Improved Onboarding**: Remove the friction of acquiring tokens before using your application |
| 22 | +- **Enterprise-ready**: Ideal for business applications where users shouldn't be concerned with blockchain mechanics |
| 23 | + |
| 24 | +### Secure Implementation |
| 25 | + |
| 26 | +- **OpenZeppelin Standard**: Built on the battle-tested ERC2771Forwarder implementation |
| 27 | +- **EIP-712 Signatures**: Uses cryptographically secure typed data signatures |
| 28 | +- **Request Validation**: Comprehensive validation including deadline checks and nonce management |
| 29 | + |
| 30 | +### Seamless Integration |
| 31 | + |
| 32 | +- **Automatic Handling**: Our signer manages the complexity of meta-transactions behind the scenes |
| 33 | +- **Simple Configuration**: Easy setup process when creating private keys |
| 34 | +- **Cross-Contract Support**: Works with any contract that implements the ERC-2771 standard |
| 35 | + |
| 36 | +## Getting Started |
| 37 | + |
| 38 | +To enable meta-transactions for your private keys: |
| 39 | + |
| 40 | +1. When creating a new private key, enable the meta-transactions option |
| 41 | +2. Enter the Forwarder contract address |
| 42 | +3. Provide the name of the Forwarder contract |
| 43 | +4. Assign a relayer key that will pay the gas costs |
| 44 | + |
| 45 | +## How Meta-Transactions Work |
| 46 | + |
| 47 | +Meta-transactions allow users to interact with the blockchain without paying for gas. While the user experience remains simple, here's what happens behind the scenes in the SettleMint platform: |
| 48 | + |
| 49 | +1. The user sends a regular transaction to our transaction signer |
| 50 | +2. Our system detects that the private key is configured for meta-transactions |
| 51 | +3. A structured message is created and signed (using EIP-712) with the key of the user |
| 52 | +4. This message is wrapped inside a normal transaction that is signed by the relayer |
| 53 | +5. The transaction is sent to the Forwarder contract with the user's signed message as payload |
| 54 | +6. The Forwarder contract thoroughly validates the message, verifies the signature, prevents replay attacks through nonce tracking, |
| 55 | +7. If everything checks out it then forwards the call to the destination contract |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +All this complexity is managed by the SettleMint platform - you only need to enable the feature and assign a relayer. From the user's perspective, transactions work as normal but don't require gas. |
| 60 | + |
| 61 | +## Use Cases |
| 62 | + |
| 63 | +- **Consumer Applications**: Eliminate the need for users to purchase crypto before using your dApp |
| 64 | +- **Enterprise Solutions**: Allow employees to interact with blockchain applications without managing tokens |
| 65 | +- **Gaming & NFTs**: Enable in-game purchases and NFT minting without interrupting gameplay |
| 66 | +- **Identity & Governance**: Facilitate voting and credential management without gas concerns |
| 67 | +- **Web2-like UX**: Create familiar user experiences that hide blockchain complexity |
| 68 | + |
0 commit comments