Recently, XION, an L1 blockchain that uses universal abstraction as its main narrative and is aimed at mainstream audiences, released its white paper on universal abstraction, which explores the core infrastructure of universal abstraction in depth, including meta accounts, signature abstraction, gas fee abstraction, dynamic token minting mechanism, interoperability abstraction, etc., to achieve a safe, intuitive, simple and seamless user experience. Compiled by XION World with slight deletions.

XION is the first modular universal abstraction layer that improves the user experience (UX) at the protocol level by abstracting accounts, signatures, gas fees, and interoperability. In the process, XION removes barriers to entry for new users while circumventing the fragmentation challenges that developers encounter in other ecosystems. By abstracting interoperability, XION can also extend a seamless user experience to all integrated public chains and support many novel use cases.

1 Introduction

New users often encounter confusing technical complexities involving wallet setup, managing assets, cross-device usage, purchasing native tokens, paying gas fees, multi-chain interactions, etc. While blockchain has great potential, its widespread adoption is hindered by these complexities. This convoluted user experience leads to high user churn and waning user interest, indicating that Web3 requires a user-friendly blockchain infrastructure.

Although there are many solutions (such as introducing account abstraction) that attempt to alleviate these problems. However, avoiding changes to the consensus layer leads to fragmentation issues, huge deployment and execution costs, centralization risks, miner extractable value (MEV) capture, and censorship risks. Currently, there is no overall solution for Web3 to attract mainstream users.

This whitepaper explores the novel architecture of XION. XION is a universal abstraction layer because it removes complex blockchain features (such as accounts, signatures, fee management, and interoperability) at the protocol level. XION removes a huge barrier to entry for new users while circumventing the fragmentation challenges faced by developers. In addition, XION transaction signatures support a variety of existing cryptographic curves and are easily adaptable to future developments, which not only expands its market reach but also ensures long-term interoperability between XION and different blockchain protocols.

Table of contents:

2. XION development background

3. XION’s general abstraction: meta-account, signature abstraction, device abstraction, gas abstraction, and dynamic token minting mechanism

4. XION’s Interoperability Abstraction

5. Novel use cases that XION can support

6 Conclusion

2. Background

2.1 Externally Owned Accounts

Generally speaking, there are two types of accounts in blockchain:

a. Externally Owned Accounts (EOA)

b. Smart Contract Accounts (SCA)

Typically, users interact with the blockchain through EOAs, which involve asymmetric cryptography. These EOAs consist of a set of public and private keys, with the public key stored on the blockchain and the private key stored off-chain by the user. The private key, known only to the user, is used to sign transactions, while the public key is used to verify the authenticity of the signature.

However, EOAs have many disadvantages: they lack the ability to implement additional authentication mechanisms, they cannot perform autonomous actions or execute smart contracts, and public/private key pairs cannot be changed. As a result, EOAs are a central point of failure for users. If a user loses control of their private key, then they lose access to their account entirely. Likewise, if a user's private key is compromised, their account is compromised and their assets are at risk.

2.2 Smart Contract Account

Another type of account is the SCA, which is managed by code on the blockchain. Their creation involves deployment to the blockchain via a transaction initiated by an EOA. Once deployed, these smart contracts reside at a specific address on the blockchain, and their code determines the rules and conditions under which they operate. Traditionally, they cannot initiate transactions due to the lack of private keys.

As a solution to the above-mentioned shortcomings of EOA, account abstraction has been proposed to enable SCA to initiate transactions. Instead of determining transaction authentication by a set of predefined rules at the state machine level, account abstraction delegates this task to SCA. SCA can then implement customized authentication logic based on the needs of the user, such as private key rotation, performing custom tasks, integrating multi-factor authentication, and so on.

2.3 Signature

Cryptographic signatures are created using a digital signature algorithm, which involves a set of mathematical operations. The most commonly used signature schemes in Web3 are the Elliptic Curve Digital Signature Algorithm (ECDSA) and the Edwards Curve Digital Signature Algorithm (EdDSA). Ethereum and Bitcoin use ECDSA, specifically the Secp256k1 curve, while Solana uses EdDSA, specifically the Ed25519 curve. Another widely adopted cryptographic curve, Secp256r, is used by most popular devices, such as the Secure Enclave of Android and iPhone.

2.4 Transactions

In the standard Cosmos SDK, each transaction consists of a message. Once a transaction is included in a block, it passes through a unique component called AnteHandler. AnteHandler is used to perform a series of validation steps, such as checking if the transaction has enough fees and verifying signatures. If the checks are valid, the transaction is added to the memory pool and forwarded to the validator.

2.5 Transaction Fees

Transaction fees on blockchains are often referred to as "Gas," a measure of the amount of computational work required to execute a transaction. Traditionally, each transaction consumes a certain amount of Gas, depending on the complexity of the transaction and the computational resources required. Validators are responsible for confirming transactions and adding them to the blockchain, and set a minimum Gas fee (calculated by multiplying the Gas amount by the Gas price). Users who want their transactions to be processed must pay at least this minimum Gas fee in the blockchain's native token.

3. Common Abstraction

Universal abstraction is a unique and all-encompassing infrastructure solution proposed by XION, which aims to eliminate the cryptographic complexity that users need to face when using blockchain. XION implements universal abstraction directly at the protocol level, abstracting cryptographic terms such as accounts, signatures, Gas, interoperability, pricing, devices, payments, etc.

1. XION’s protocol-level account abstraction: meta-account

XION introduces meta accounts through smart contract accounts (SCA) and changing state machines. These meta accounts simplify the user experience by decoupling the traditional private/public key model and creating a more intuitive user interface similar to traditional Web2 login systems. Users can interact with their meta accounts in familiar ways (such as through email or biometric authentication methods), eliminating the need for private key management while still remaining completely non-custodial.

In addition, XION's meta account introduces a highly adaptable and secure permission management system that provides advanced features such as private key weights, private key rotation, custom rules, and various authentication methods.

• Private key rotation: Users can change the private key of the meta account, or enable multiple private keys, thereby reducing the risk of private keys being leaked.

• Custom Rules: Users can set any number of custom rules to manage meta accounts and assets, such as transaction amount limits and recurring payments.

• Private key weight: Enable different levels of permissions for each private key, for example, certain operations can only be performed with a high-privilege private key.

• Diverse authentication methods: Meta-account login supports a range of authentication methods, which can achieve interoperability across different devices and platforms and ensure strong protection of user accounts and assets.

3.1.1 Implementation of SCA

In order for SCA to be able to sign, the responsibility for transaction verification must be transferred from the state machine to the SCA. This is achieved by integrating two key methods into SCA: before_tx and after_tx.

Before a transaction is executed, the state machine calls before_tx to provide the SCA with detailed transaction information and its signing credentials, allowing signature verification and other programmatic operations.

After the transaction is executed, if before_tx and all transaction messages have been successfully executed, after_tx will be activated, enabling SCA to perform other programmed operations.

3.1.2 State Machine Implementation

The changes to the state machine involve two decorator changes in order to trigger the SCA’s before_tx and after_tx. SigverificationDecorator uses the new decorator to trigger the before_tx when SCA is signed, or simply continues to use the default sigverification-decorator logic. See Figure 1 for details.

Then, an additional decorator is added to the PostHandler to trigger after_tx.

wSpQk6YiDEum9IROZmyvIHrBuRO6W0AjsisXLkMi.jpeg

3.2 Signature Abstraction

XION's SCA also abstracts signatures, providing significant advantages over existing SCA solutions. Users can add up to 256 different authenticators to a meta-account. When a user creates an account or logs in within a decentralized application, signature verification is not hard-coded into the XION protocol but is implemented through dynamic requests transmitted to the user’s account. This enables transaction verification with arbitrary logic and state, so XION is not limited to any specific verification mode. XION seamlessly supports various cryptographic curves without specific adaptation or modifications.

The cryptographic curves supported by XION include mature curves such as Ethereum's Secp256K1 and Solana's Ed25519, as well as widely adopted standards such as Secp256R1 and RS256 used by JSON Web Token (JWT). In addition, XION is able to support any new cryptographic curves and adapt to emerging trends and developments. As cryptography continues to develop rapidly, users' SCA meta accounts will remain compatible and adaptable.

3.3 Device Abstraction

Combining 3.1 and 3.2, XION eliminates the need for users to store and manage private keys. It also eliminates the security risks and complexities that traditionally arise when users use their accounts across multiple devices. XION users can seamlessly interact with their meta-accounts across a variety of devices including PC, smartphone or tablet. This device-diversified architecture significantly simplifies the user experience, driving mass adoption by new users by reducing barriers to entry and improving ease of use for all applications accessed from XION.

When interacting with an application through XION, users are presented with multiple login methods, including email, social accounts, Face Id, or can use a Web3 wallet such as Keplr or MetaMask to log in. XION is thus able to cater to all audiences while retaining a very simple user experience for non-crypto users.

In addition, as mentioned earlier, meta accounts can also provide additional security, flexibility, and ease of use, such as multi-factor authentication, private key rotation, custom rules, etc.

In short, XION’s protocol-level account abstraction combined with signature abstraction enables users to seamlessly access their meta accounts across multiple devices in a secure and frictionless manner.

3.4. Abstract Gas Fees

To enable the many features required for a seamless user experience, XION employs a new approach to network fees, including:

a. Completely abstract gas fees

b. Building PlatformSend (a new fee mechanism)

c. Combine a and b with the use of FeeGrant.

3.4.1 Completely Abstracting Gas Fees

XION allows users to pay transaction fees in any token. This is achieved by collecting transaction fees paid by users into a "fee collector", exchanging these non-native tokens for XION tokens, and distributing XION tokens back to the fee collector.

There are multiple ways to redeem the collected fees for XION tokens, such as by periodically retrieving data from the desired decentralized exchange (DEX) and using the time-weighted average price (TWAP) to determine the exchange rate. We demonstrate this using the Asynchronous Interchain Query module (Async-ICQ) in Figure 2.

F5EQ4gTYsNPG9eFhPrEhaYct6CbCiftkBDpn8mZg.jpeg

3.4.2 PlatformSend and FeeGrant

Transactions on the XION network can be divided into two categories, value exchange and non-value exchange. When the first type of transaction occurs, PlatformSend will take effect. Since tokens are exchanged between participants (users, dApps), charging a small portion of the tokens as a handling fee can prevent Sybil attacks (similar to how Gas fees prevent Sybil attacks). As shown in Figure 3, users directly trade in any currency, and the handling fee is collected by PlatformSend and converted into XION tokens to pay (compensate) to network validators. No Gas fees are involved in this process.

TEttH9ZneDVU0bq4lwVhQ1PQxaZoKrzTNlWnLoin.jpeg

When the second type of transaction occurs, XION charges regular gas fees to prevent Sybil attacks. However, in line with the principle of abstracting gas, XION implements FeeGrant for this type of transaction. As shown in Figure 4, developers can sponsor users' transactions to provide a gas-free experience. Sponsorship can be achieved in a variety of ways, such as leveraging staking rewards, adopting minimum transaction thresholds, or other configurable parameters.

bLgKKHLNrab89L82KgvqD6w9w6hvoHOFRVr2RfPg.jpeg

3.4.3 Results: Pricing and Payment Abstraction

With the aforementioned abstraction of gas fees, XION is the first blockchain that is able to use USDC as its primary transaction currency. Figure 5 introduces the process of automatically exchanging USDC fees for XION tokens in the fee collector, so that all products built on XION can allow users to simply pay with USDC. This eliminates the traditional friction of acquiring XION tokens, allowing users to use blockchain applications with familiar pricing while reducing unnecessary volatility and speculation in XION tokens.

gfs4AzrC47gRUJXVUBBKKy5xd4zeTkwGDijaYOFp.jpeg

In addition, XION itself is interoperable with every integrated blockchain ecosystem, as users can pay with any token. Combined with the gas fee abstraction, XION can stand out for its ability to simplify the user experience and drive mainstream adoption of Web3.

3.5 Dynamic Token Minting

The XION network's token minting is dynamic and determined by nuanced minting parameters to balance network participant incentives and long-term sustainability, which is critical to the long-term viability of the ecosystem. XION has made two major changes to the token minting module:

• If possible, accumulated transaction fees can be used to offset inflation caused by the minting of new tokens.

• New token minting is calculated only based on staked tokens.

3.5.1 Overview of Token Minting Module

The goal of the Token Minting module is to maintain a preset ratio of staked tokens to liquid tokens in the ecosystem. This is achieved by setting three values: inflation cap, inflation floor, and target staking ratio. Once the inflation rate is determined, the module calculates how many tokens need to be minted in a block to meet the inflation rate.

There is an important balance to be struck between staked tokens and liquid tokens (market liquidity) as it impacts the long-term security and growth of the network, and the formula below demonstrates this balance.

Note: IR represents the current inflation rate; Pbonded represents the current percentage of staked tokens; Pgoal represents the target percentage of staked tokens; IRmax represents the upper limit of inflation rate; IRmin represents the lower limit of inflation rate.

If Pbonded < Pgoal : IR = min(IR + ΔIR, IRmax) . In this case, ΔIR is the rate at which inflation increases when Pbonded is below Pgoal.

If Pbonded = Pgoal : IR = Constant. In this case, when Pbonded reaches the target, the inflation rate does not change.

If Pbonded > Pgoal: IR = max(IR − ΔIR, IRmin). In this case, ΔIR is the rate at which inflation falls when Pbonded exceeds Pgoal.

These formulas effectively capture the dynamic adjustment of the inflation rate based on the relationship between the current staked token percentage and the target staked token percentage, as well as constraints on the maximum and minimum inflation rates.

3.5.2 Offsetting inflation through transaction fees

In addition to the new tokens minted per block, the default token minting module of the Cosmos SDK currently also collects the transaction fees accumulated in the block and distributes them to the validators. This can be expressed as:

Tnet = Tminted + Fcollected

Among them, Tminted represents the newly minted tokens in a certain block, Tminted = Ttotal × IR; Ttotal is the current total supply of tokens; Fcollected represents the transaction fees collected in a certain block.

The first change that XION implemented was to use the fees collected in a block and offset them against the amount of new tokens that needed to be minted in that block. This can be expressed as:

Tnet = Tminted − Fcollected

If Fcollected is large enough, it can actually reduce Tnet, effectively reducing inflation by using the fees collected to offset newly minted tokens. As usage on the chain increases, inflation will drop significantly as the accumulation of fees continues to offset newly minted tokens. When the fees collected for a block exceed the new tokens that need to be minted for that block, the excess tokens are destroyed, the token supply is reduced, and deflation naturally occurs.

3.5.3 Token Inflation of Stake Tokens

Regarding token inflation, the default token minting module of the Cosmos SDK calculates inflation based on all tokens. This can be expressed as:

Tminted = IR × Ttotal

Therefore, the staker's annual percentage yield (APY) can be expressed as:

APY = IR ÷ Pbonded

If APY ≥ IR, this will typically result in a realized staked annual yield (APY) that is higher than the inflation rate, since not all tokens are staked.

XION’s token minting module implements a significant change. Instead of calculating for all tokens, it only calculates for staked tokens. This can be expressed as:

Tmintedx = IR × Tbonded

Since Tbonded ≤ Ttotal, for the same IR, the total inflation impact of Tmintedx will be ≤ Tminted.

The result is that the impact of inflation will be reduced, and stakers and validators will always see APY = IR. XION creates a more stable environment by changing the token minting module, which can attract long-term validators to ensure the security of the network.

4. Abstract Interoperability

XION's abstraction of interoperability is a key aspect of universal abstraction that can significantly enhance the cross-chain user experience. This is achieved by using "Package Forwarding Middleware" which enables users to perform operations from the control chain (such as XION) to any other public chain. By integrating this middleware with an existing common abstraction framework, a simplified protocol-level interface is created. As shown in Figure 6, XION allows users to perform operations on any chain integrated with XION while still enjoying XION’s seamless user experience.

6DfQZ5D1PLq2X87QIRsdablbRKpiHYiRw2eyuYyj.jpeg

XION's abstraction of interoperability solves the common problem of account fragmentation that users currently have in a multi-chain environment. Users can link accounts they have on multiple chains to their XION meta account, providing them with a way to manage all chain assets from a "central account".

XION achieves this goal by leveraging symmetric communication through multiple implementation methods. XION establishes reliable, ordered, and authenticated communication channels between different blockchains, as shown in Figure 7. XION's abstraction of interoperability promotes the emergence of new cross-chain innovative use cases and seamless multi-chain user experiences that were previously unattainable.

xRDRUf2NwsJgLeFYZiBQF3KiT4ZGLaDbjv7dRZ2V.jpeg

5. Innovative Application of Universal Abstractions

XION's universal abstraction can greatly enhance the user experience of existing applications and enable a range of novel applications. Next, we explore some innovative use cases and cross-chain use cases that can be achieved through XION's universal abstraction.

5.1. Innovative use cases that XION can achieve

5.1.1 Digital Banking

Using the common abstraction, digital banking applications can allow customers to set temporary private keys for time-limited access, ensuring greater transaction security while allowing users to customize their own transaction limits and conditions. In addition, customers can also set multiple authentication requirements for large transactions, as well as the ability to recover their accounts if certain authentication methods are lost.

5.1.2 Decentralized Chat Application

Using universal abstractions, decentralized chat services enable users to securely send messages using the same account, whether they are using a smartphone, tablet, or PC. Users can transfer money globally, sending tokens to friends across borders using familiar fiat denominations directly in the chat using gas-free transactions.

5.1.3 Creator Economy Application

Leveraging common abstractions, decentralized content services can enable users to create subscription-based accounts that are automatically billed monthly via smart contract triggers without the need for manual renewals.

5.1.4 Enhanced gaming experience

Leveraging common abstractions, on-chain games allow players to batch transactions and perform gas-free transactions, enabling a smooth and secure gaming experience without risking users’ assets.

5.1.5 User-friendly DAO

Leveraging common abstractions, online collaborative platforms can establish DAOs (decentralized autonomous organizations) with members having varying levels of permissions, enabling non-technical users to participate in the governance or decision-making process through an intuitive and familiar Web2 interface.

5.2 Multi-chain use cases

5.2.1 All Chains Unified

XION can be plugged into all existing Web3 applications. For example, a user holds funds on the Base network by using the social application FriendTech. This user now wants to use the fitness app StepN on the Solana network and buy digital shoes using the FriendTech funds. The user can do this by using only one XION meta account. He can connect his Base and Solana accounts to the XION meta account. In the background, his Base funds are transferred, converted, and used to buy digital shoes on the Solana marketplace.

5.2.2 Global decentralized trading market

A great use case is a decentralized marketplace across multiple blockchains where users can buy and sell goods or services using a variety of cryptocurrencies. This is possible using just one XION meta account.

5.2.3 Cross-chain games

Gamers can participate in cross-chain gaming experiences where assets and achievements in one blockchain game can be used or traded in games on other chains. This is possible by using only one XION meta account.

5.3 DAOs

DAOs can run seamlessly across multiple blockchains, which enables it to effectively leverage different applications, a wider user base, and more flexible and efficient governance.

5.4 Global Identity Unification

Cross-chain identity verification systems can be built where users can use the same credentials and reputation across multiple blockchains. This opens up countless possibilities, as identifiable reputation allows users to access a wide range of services with one verifiable identity, bringing all ecosystems closer together.

6. Conclusion

XION solves key challenges that hinder Web3 adoption by mainstream users through its universal abstractions.

XION simplifies the user experience, making blockchain technology more accessible to mainstream audiences. It removes the complexity associated with account creation, interactions, gas fees, and interoperability, replacing it with a more familiar Web2 interaction method for mainstream audiences. In addition, it further extends this seamless user experience to cover cross-chain interactions.

Through multifaceted general abstractions, XION provides a sustainable, flexible, and user-centric blockchain infrastructure paradigm that can drive Web3 and the Crypto industry into a new era of widespread adoption.