
### Warning
Please read below thoroughly and know that esc-20 (Ethscription Smart Creation) is an experimental protocol. We are not responsible for any hiccups that may come from using it.
By reading you agree that you understand everything before testing.
Use at your own risk.
---
📜 [Documentation Website](docs.esc20.xyz)
## Abstract
The Ethscription Smart Creation (ESC-20) Protocol is an open and experimental token standard specifically designed for Ethscriptions. Ethscriptions are digital artifacts created using transaction calldata on the Ethereum blockchain. The ESC-20 protocol aims to provide a simple and distinct token standard for Ethscriptions, differentiating them from ERC-20 tokens. It enhances the adaptability and scalability of Ethscriptions by introducing a standardized format for deploying, minting, and transferring ESC-20 tokens.
## Motivation
The motivation behind the ESC-20 protocol is to improve the functionality and flexibility of tokens used for Ethscriptions. By creating a dedicated token standard, it becomes easier to handle the unique characteristics of Ethscriptions and ensure compatibility with existing protocols and applications. While the ESC-20 protocol is experimental and offers no guarantee of protection against double-spending or inherent value, it provides a foundation for further exploration and development in the realm of Ethscriptions.
## Specification
### Concept of ESC-20
The ESC-20 protocol introduces the following key concepts:
- **ASCII Characters**: Only ASCII characters are accepted for Ethscriptions to prevent the use of homoglyphs and ensure validity.
- **Deploy Event**: The deploy event is used to deploy a new ESC-20 token. It includes parameters such as the ticker symbol (tick), maximum supply (max), and mint limit (lim).
- **Mint Event**: The mint event is used to initialize the balance of a specific address for an ESC-20 token. It includes parameters such as the ticker symbol (tick), mint amount (amt), and identifier (id) for uniqueness.
- **Transfer Event**: The transfer event enables the transfer of ESC-20 tokens between Ethereum addresses. It includes parameters such as the ticker symbol (tick), sender address (from), recipient address (to), and amount (amt).
### Operations
#### Deploy Event
To deploy an ESC-20 token, an inscription with the deploy event must be created. The deploy event includes the following permissible keys:
- p (Protocol): Set to "esc-20" to specify the ESC-20 token standard.
- op (Operation): Set to "deploy" to indicate a deploy event.
- tick (Ticker): The ticker symbol of the ESC-20 token, limited to 1-12 ASCII characters.
- max (Max Supply): The maximum supply of the token, specified as a uint256 value and has to be a string.
- lim (Mint Limit): The maximum amount that can be minted per Ethscription, specified as a uint256 value.
Example of a deploy event inscription:
```
data:application/json,{"p":"esc-20","op":"deploy","tick":"tom","max":"21000000","lim":"1000"}
```
### Mint Event
To mint ESC-20 tokens, an inscription with the mint event must be created. The mint event includes the following permissible keys:
- p (Protocol): Set to "esc-20" to specify the ESC-20 token standard.
- op (Operation): Set to "mint" to indicate a mint event.
- tick (Ticker): The ticker symbol of the ESC-20 token.
- amt (Amount): The amount to mint, not exceeding the mint limit set in the token's deploy event.
- id (Identifier): The unique identifier for the mint event, derived from the deploy event.
Example of a mint event inscription:
```
data:application/json,{"p":"esc-20","op":"mint","tick":"tom","amt":"1000","id":"1"}
```
### Transfer Event
To transfer ESC-20 tokens, an inscription with the transfer event must be created. The transfer event includes the following permissible keys:
- p (Protocol): Set to "esc-20" to specify the ESC-20 token standard.
- op (Operation): Set to "transfer" to indicate a transfer event.
- tick (Ticker): The ticker symbol of the ESC-20 token being transferred.
- from (Sender): The Ethereum address of the sender.
- to (Recipient): The Ethereum address of the recipient.
- amt (Amount): The number of ESC-20 tokens being transferred.
Example of a transfer event inscription:
```
data:application/json,{"p":"esc-20","op":"transfer","tick":"tom","from":"<sender_address>","to":"<recipient_address>","amt":"500"}
```
**Step 1: Inscribe Transfer Event to Sender's Address**
Inscribe the transfer event as a transaction calldata and submit it to the sender's Ethereum address.
`data:application/json,{"p":"esc-20","op":"transfer","tick":"<ticker>","from":"<sender_address>","to":"<recipient_address>","amt":"<amount>"}`
Replace <ticker> with the ticker symbol of the ESC-20 token, <sender_address> with the Ethereum address of the sender, <recipient_address> with the Ethereum address of the recipient, and <amount> with the number of ESC-20 tokens being transferred.
once the sender inscribes the transfer event, the transfer/split is considered valid.
### Rationale
The ESC-20 protocol introduces a dedicated token standard for Ethscriptions, providing a distinct and standardized format for creating and managing ESC-20 tokens. By adhering to the ESC-20 standard, Ethscriptions can be easily recognized and integrated into existing protocols and applications. The use of ASCII characters and the defined event structure ensure consistency and prevent the misuse of homoglyphs in Ethscriptions.
### Implementations
The implementations for the ESC-20 protocol are currently under development and will be released soon. Please refer to the relevant documentation, standards, and community guidelines for updates and future implementations.
### Security Considerations
When implementing the ESC-20 protocol, it is crucial to consider the following security considerations:
- **Replay Attacks & Frontrunning Attacks**: Mechanisms should be implemented to prevent the reuse of identical signatures, mitigating the risk of replay attacks.
- **Double Spending**: Smart contracts should be designed to handle double-spending scenarios where multiple transactions attempt to transfer the same ESC-20 token simultaneously. The first transaction that appears in the latest confirmed block should be acknowledged, while subsequent transactions should be disregarded.
- **Cool-down Period**: Introducing a cool-down period at the application level can help mitigate the risk of double spending and ensure a smooth trading experience.
It is essential for users to exercise caution, conduct their own research, and understand the potential risks before using ESC-20. The experimental nature of the protocol means that there are no guarantees of protection or inherent value associated with tokens created using this standard.
## Conclusion
The ESC-20 protocol provides a dedicated token standard for Ethscriptions, offering a standardized format for deploying, minting, and transferring ESC-20 tokens. While the protocol is experimental and carries associated risks, it aims to enhance the adaptability and scalability of Ethscriptions within the Ethereum ecosystem. Users should exercise caution and stay informed about updates and developments in the ESC-20 ecosystem.