Digital Currency News >ZIL > Parsing the data layer of ZIL tokens

Related Articles

ViewZILAll Articles
0
ZIL
0
Step 1: Enter the ZIL/USDT spot trading page
0
Step 2: Enter the order unit and quantity, then click Buy/Sell

Parsing the data layer of ZIL tokens

2024-09-20 22:02:48

Today, as blockchain technology continues to develop, ZIL tokens, as part of the Zilliqa platform, are leading the innovation of smart contracts and decentralized applications. This article will delve into the data layer of the ZIL token, especially its state model and transaction mechanism, and analyze how these features improve user experience and security.


Data layer overview

The data maintained by x-shard running on the full node includes status, transactions that modify the status, and blocks in the total order of transactions determined by consensus. The design of these data layers not only promotes efficient processing of transactions, but also ensures the security and stability of the system.

State model: Zilliqa’s protocol adopts an account-based state model. The ZQ1 version distinguishes between externally owned accounts (EOA) and smart contracts. EOA only holds the ZIL balance and nonce, while the smart contract's state contains the code hash and storage root hash. To maintain backward compatibility with ZQ1’s API, smart contract state in ZQ2 contains both EVM code hashes and optional Scilla code hashes.


Native account abstraction

ZQ2 implements native account abstraction and converts EOA into smart accounts. This innovation not only improves security but also improves user experience. User accounts can enjoy support for multi-factor authentication, daily limit-based transaction authorization, whitelisted recipients and other rules, in addition to multi-dimensional nonces, sponsored gas fees or gas fees paid in ERC-20 tokens, etc. Function.

The native account abstraction in ZQ2 is ERC-4337 compliant, enabling it to leverage emerging third parties to implement the above functionality. ZQ2 uses its validators as packagers and implements entry points as precompiled, allowing packaged user actions to be executed in parallel.


trading mechanism

In ZQ2, the EOA imported from ZQ1 is automatically converted into a smart account. Other EOAs also convert when they first appear in a transaction. The protocol sets the code hash of the relevant EOA to point to the default smart account implementation and fills its storage with the initial value.

Submitted transactions are converted into user actions for further processing. Transactions that access data from the contract's storage incur gas fees. However, once the data is stored, it must remain on the full node for ever-growing persistence even if transactions no longer access it. To prevent contracts from being misused as cheap data storage, x-shard can choose to charge rent for the storage space used by the contract. The contract owner needs to register a rent sponsor for each contract, which can be the contract itself or another account, and the rent will be deducted for each defined period.

If the sponsor's balance is too low, x-shard can choose to reject transactions involving that contract or charge the transaction sender a higher gas fee. For contracts that x-shard wishes to subsidize, rent can be waived.


ZQ2 transaction types

ZQ2 supports traditional transactions, Type 1 transactions specified in EIP-2930, and Type 2 transactions. Support for these transaction types enables Zilliqa to interoperate with other blockchain platforms and provides developers with more flexibility.

Security and transparency: Zilliqa’s design not only considers the efficiency of transactions, but also pays full attention to security. By using smart accounts, ZQ2 is able to provide higher security and prevent unauthorized transactions and loss of funds. In addition, the transparency of smart contracts allows users to check the status and transaction history of the contract at any time, further enhancing users' trust in the platform.


Improvement of user experience

Zilliqa's native account abstraction and smart account design enable users to enjoy a smoother experience when conducting transactions. Users no longer need to remember complex private keys or go through tedious authorization steps, which is especially important for novice users. By streamlining the process, Zilliqa hopes to attract more users to participate in the blockchain ecosystem.


in conclusion

The data layer design of ZIL token demonstrates Zilliqa’s innovation and foresight in blockchain technology. Through native account abstraction, the introduction of smart accounts, and flexible transaction mechanisms, Zilliqa not only improves user security and experience, but also lays a solid foundation for future development. As blockchain technology further matures, Zilliqa will continue to play an important role in the field of smart contracts and decentralized applications.

Disclaimer:

1. The information does not constitute investment advice, and investors should make independent decisions and bear the risks themselves

2. The copyright of this article belongs to the original author, and it only represents the author's own views, not the views or positions of HiBT