-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,31 @@ | ||
--- | ||
eip: 7849 | ||
title: Fungible Token with gas rebates | ||
description: Built-in gas rebates, secure signature validation, and optimized transfer mechanisms. | ||
author: Amitesh Gautam (@blockchainDevAmitesh) <[email protected]> | ||
discussions-to: https://ethereum-magicians.org/t/erc-7849-fungible-token-with-gas-rebates/22356 | ||
status: Draft | ||
type: Standards Track | ||
category: ERC | ||
created: 2025-01-01 | ||
description: A new fungible token standard with built-in gas rebates, secure signature validation using [EIP-712](https://eips.ethereum.org/EIPS/eip-712), and optimized transfer mechanisms. | ||
--- | ||
|
||
## Abstract | ||
|
||
EIP7849 introduces a new fungible token standard focused on security, efficiency, and interoperability. It extends traditional [ERC-20](https://eips.ethereum.org/EIPS/eip-20) functionality with built-in gas rebates, secure signature validation using [EIP-712](https://eips.ethereum.org/EIPS/eip-712), and optimized transfer mechanisms. The standard includes protections against common attack vectors while maintaining full compatibility with existing token interfaces. | ||
EIP-7849 introduces a new fungible token standard focused on security, efficiency, and interoperability. It extends traditional [ERC-20](./erc-20.md) functionality with built-in gas rebates, secure signature validation using [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md), and optimized transfer mechanisms. The standard includes protections against common attack vectors while maintaining full compatibility with existing token interfaces. | ||
Check failure on line 15 in ERCS/erc-7849.md GitHub Actions / EIP Walidatorthe first match of the given pattern must be a link
Check failure on line 15 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
|
||
## Motivation | ||
|
||
Current fungible token standards lack built-in security features and gas optimization mechanisms. EIP7849 addresses these limitations by incorporating: | ||
Current fungible token standards lack built-in security features and gas optimization mechanisms. EIP-7849 addresses these limitations by incorporating: | ||
Check failure on line 19 in ERCS/erc-7849.md GitHub Actions / EIP Walidatorthe first match of the given pattern must be a link
|
||
- Native gas rebate system to reduce transaction costs | ||
- [EIP-712](https://eips.ethereum.org/EIPS/eip-712) compliant signatures for gasless approvals | ||
- [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) compliant signatures for gasless approvals | ||
Check failure on line 21 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
- Strong security measures against common vulnerabilities | ||
- Efficient state management and error handling | ||
|
||
## Specification | ||
|
||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174. | ||
|
||
## Token Details | ||
|
||
### Core Variables | ||
- `name`: Token name | ||
- `symbol`: Token symbol | ||
|
@@ -38,7 +36,7 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S | |
|
||
### Features | ||
- Gas rebate system | ||
- [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signature validation | ||
- [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) signature validation | ||
Check failure on line 39 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
- Nonce tracking for replay protection | ||
|
||
### Functions | ||
|
@@ -86,7 +84,7 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S | |
- Returns: `bool` | ||
|
||
**`permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)`** | ||
- Processes gasless approvals using [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures | ||
- Processes gasless approvals using [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) signatures | ||
Check failure on line 87 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
- Validates signature and deadline | ||
- No return value | ||
|
||
|
@@ -128,23 +126,23 @@ Custom errors for common failure cases: | |
|
||
## Rationale | ||
|
||
The design choices in EIP7849 prioritize: | ||
The design choices in EIP-7849 prioritize: | ||
Check failure on line 129 in ERCS/erc-7849.md GitHub Actions / EIP Walidatorthe first match of the given pattern must be a link
|
||
1. Security through custom error handling and signature validation | ||
2. Gas efficiency via rebate mechanisms | ||
3. Interoperability through standard [EIP-712](https://eips.ethereum.org/EIPS/eip-712) implementation | ||
3. Interoperability through standard [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) implementation | ||
Check failure on line 132 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
4. User experience through gasless approvals | ||
|
||
## Backwards Compatibility | ||
|
||
EIP7849 maintains full backwards compatibility with [ERC-20](https://eips.ethereum.org/EIPS/eip-20) while adding enhanced functionality. | ||
EIP-7849 maintains full backwards compatibility with [ERC-20](./erc-20.md) while adding enhanced functionality. | ||
Check failure on line 137 in ERCS/erc-7849.md GitHub Actions / EIP Walidatorthe first match of the given pattern must be a link
|
||
|
||
## Security Considerations | ||
|
||
- Implements nonce tracking for signature validation | ||
- Uses custom errors for efficient error handling | ||
- Includes checks against zero-address transfers | ||
- Limits gas rebates to prevent abuse | ||
- Validates [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signatures for permit operations | ||
- Validates [EIP-712](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md) signatures for permit operations | ||
Check failure on line 145 in ERCS/erc-7849.md GitHub Actions / EIP Walidatornon-relative link or image
|
||
|
||
## Copyright | ||
|
||
|