The eosio.wram contract is a pivotal development in the EOS ecosystem, designed to introduce a flexible mechanism for managing system RAM through a tokenization process. This light paper delves into the core functionalities, specifications, and operational nuances of the eosio.wram contract.
- Chain: EOS Native
- Contract Account:
eosio.wram - Token Symbol:
WRAM - Precision: 0
- Token Name: EOS Wrapped RAM
- Max Supply:
418945440768bytes (390 GB) - Conversion Rate: 1 WRAM = 1 byte of RAM
| Date | Security Auditor | URL |
|---|---|---|
| April 9, 2024 | BlockSec | blocksec_eos_wram_v1.1-signed.pdf |
The eosio.wram contract introduces two primary actions: wrap and unwrap. These actions facilitate the conversion of system RAM bytes into WRAM tokens and vice versa, enabling a streamlined tokenization of RAM resources.
- Wrap: Users can send or purchase system RAM bytes and convert them into
WRAMtokens. These tokens are then credited to the sender's account, reflecting the amount of RAM they've tokenized. - Unwrap: Users can convert their
WRAMtokens back into system RAM bytes. This process retires theWRAMtokens and credits the user with the equivalent amount of RAM bytes.
- Transactions using
buyramandbuyrambytesactions to issueWRAMtokens incur a 0.5% fee from the system. - The
ramtransferaction, on the other hand, does not attract any fee when used for issuingWRAM.
eosio.ramsystem account is prohibited from receivingWRAMtokens. This measure is designed to prevent accidental transfers that could result in RAM loss.
The eosio.wram contract is deployed under the eosio.wram account with eosio@active permissions, ensuring robust security and control over the contract's operations.
$ wget https://github.com/AntelopeIO/cdt/releases/download/v4.0.1/cdt_4.0.1_amd64.deb
$ sudo apt install ./cdt_4.0.1_amd64.debTo compile the contract, developers can use the following command:
$ cdt-cpp eosio.wram.cpp -I ./includeThe contract includes a comprehensive testing suite designed to validate its functionality. The tests are executed using the following commands:
$ npm test
> test
> bun testThe testing suite covers various scenarios, including token issuance, RAM wrapping and unwrapping, and error handling, ensuring the contract's reliability and robustness.
The eosio.wram contract represents a significant advancement in the EOS blockchain's functionality, offering users a flexible and efficient mechanism for managing system RAM through tokenization. By enabling the wrapping and unwrapping of RAM bytes, the contract provides an innovative solution for RAM allocation and management within the EOS ecosystem.