Skip to content

Commit

Permalink
fix: backticks
Browse files Browse the repository at this point in the history
Signed-off-by: MASDXI <[email protected]>
  • Loading branch information
MASDXI committed Nov 15, 2024
1 parent 756a3d6 commit 9a71fda
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ERCS/erc-7818.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ requires: 20

## Abstract

Introduces an extension for `ERC-20` tokens , which facilitates the implementation of an expiration mechanism. Through this extension, tokens are designated a predetermined validity period, after which they become invalid and can no longer be transferred or used. This functionality proves beneficial in scenarios such as time-limited bond, loyalty reward , or game token necessitating automatic invalidation after a specific duration. The extension is meticulously crafted to seamlessly align with the existing `ERC-20` standard, ensuring smooth integration with prevailing token contracts, while concurrently introducing the capability to govern and enforce token expiration at the contract level.
Introduces an extension for `ERC20` tokens , which facilitates the implementation of an expiration mechanism. Through this extension, tokens are designated a predetermined validity period, after which they become invalid and can no longer be transferred or used. This functionality proves beneficial in scenarios such as time-limited bond, loyalty reward , or game token necessitating automatic invalidation after a specific duration. The extension is meticulously crafted to seamlessly align with the existing `ERC20` standard, ensuring smooth integration with prevailing token contracts, while concurrently introducing the capability to govern and enforce token expiration at the contract level.

## Motivation

This extension standard facilitates the development of `ERC-20` standard compatible tokens featuring expiration dates. This capability broadens the scope of potential applications, particularly those involving time-sensitive assets. Expirable tokens are well-suited for scenarios necessitating temporary validity, including:
This extension standard facilitates the development of `ERC20` standard compatible tokens featuring expiration dates. This capability broadens the scope of potential applications, particularly those involving time-sensitive assets. Expirable tokens are well-suited for scenarios necessitating temporary validity, including:

- Bonds or financial instruments with defined maturity dates
- Time-constrained assets within gaming ecosystems
Expand All @@ -28,9 +28,9 @@ This extension standard facilitates the development of `ERC-20` standard compati

## Rationale

Check failure on line 29 in ERCS/erc-7818.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

section `Rationale` is out of order

error[markdown-order-section]: section `Rationale` is out of order --> ERCS/erc-7818.md | 29 | ## Rationale | = help: `Rationale` should come after `Specification`

Check failure on line 29 in ERCS/erc-7818.md

View workflow job for this annotation

GitHub Actions / EIP Walidator

section `Rationale` is out of order

error[markdown-order-section]: section `Rationale` is out of order --> ERCS/erc-7818.md | 29 | ## Rationale | = help: `Rationale` should come after `Specification`

The rationale for developing an expirable `ERC-20` token extension is based on several key requirements that ensure its practicality and adaptability for various applications to
The rationale for developing an expirable `ERC20` token extension is based on several key requirements that ensure its practicality and adaptability for various applications to

- Compatibility with the existing `ERC-20` standard. The extension should integrate smoothly with the `ERC-20` interface, This ensures compatibility with existing token ecosystems and third-party tools like wallets and blockchain explorers.
- Compatibility with the existing `ERC20` standard. The extension should integrate smoothly with the `ERC20` interface, This ensures compatibility with existing token ecosystems and third-party tools like wallets and blockchain explorers.
- Flexible design for business use cases. The smart contract should be extensible, allowing businesses to tailor the expiration functionality to their specific needs, whether it’s dynamic reward systems or time-sensitive applications.
- Configurable expiration period. After deployment, users should have the flexibility to define and modify the expiration period of tokens according to their business requirements, supporting various use cases.
- Configurable block time after network upgrades. Following a blockchain network upgrade, block times may fluctuate upward or downward. The smart contract must support configurable block times to allow dynamic adjustments to the block times, ensuring expiration calculations remain accurate as transaction speeds evolve.
Expand Down Expand Up @@ -70,7 +70,7 @@ In this design, the buffering slot is the critical element that requires careful

#### First-In-First-Out (FIFO) priority to enforce token expiration rules

Enforcing `FIFO` priority ensures that tokens nearing expiration are processed before newer ones, aligning with the token lifecycle and expiration rules. This method eliminates the need for additional off-chain computation and ensures that all token processing occurs efficiently on-chain, fully compliant with the ERC-20 interface.
Enforcing `FIFO` priority ensures that tokens nearing expiration are processed before newer ones, aligning with the token lifecycle and expiration rules. This method eliminates the need for additional off-chain computation and ensures that all token processing occurs efficiently on-chain, fully compliant with the `ERC20` interface.
A **Sorted List** is integral to this approach. Each slot maintains its own list, sorted by token creation which can be `block.number` or `block.timestamp`, This separation ensures that tokens in one slot do not interfere with the balance handling in another. The contract can independently manage token expirations within each slot to maintain accuracy and predictability in processing account balances.

#### Sliding Window
Expand Down Expand Up @@ -367,7 +367,7 @@ function balanceOfBlock(uint256 blocknumber) returns (uint256);
function transfer(address to, uint256 fromEra, uint8 fromSlot, uint256 toEra, uint8 toSlot) external returns (bool);
```

- Purpose: This function works similarly to `ERC-20` transfer but allows to move tokens within specific eras and slots.
- Purpose: This function works similarly to `ERC20` transfer but allows to move tokens within specific eras and slots.
- Parameters:
- `to`: The address of the account to which tokens are being transferred.
- `fromEra`: The era from which the tokens are being transferred.
Expand All @@ -380,7 +380,7 @@ function transfer(address to, uint256 fromEra, uint8 fromSlot, uint256 toEra, ui
function transferFrom(address form, address to, uint256 fromEra,uint8 fromSlot,uint256 toEra,uint8 toSlot) external returns (bool);
```

- Purpose: This function works similarly to `ERC-20` transferFrom but allows to move tokens within specific eras and slots.
- Purpose: This function works similarly to `ERC20` transferFrom but allows to move tokens within specific eras and slots.
- Parameters:
- `from`: The address of the account from which tokens are being transferred.
- `to`: The address of the account to which tokens are being transferred.
Expand Down

0 comments on commit 9a71fda

Please sign in to comment.