Xai logoXai

Xai is an Ethereum Layer-3 that leverages Arbitrum AnyTrust to enable open trade in the next generation of video games.
Value Locked

$1.48 M

38.12%

Canonically Bridged
$1.48 M
Externally Bridged
$0.00
Natively Minted
$0.00
  • Tokens
  • Daily TPS
    1.76102.45%
  • 30D tx count
    1.88 M
  • Type
    Optimium
  • Purpose
    Gaming
  • Host Chain
    Arbitrum One
  • ...

    Tokens

    Choose token

    Canonically Bridged Tokens (Top 15)

    Xai (XAI)
    USD Coin (USDC)
    Arbitrum (ARB)
    Camelot token (GRAIL)
    Boop (BOOP)

    ...

    Risk summary
    Fraud proof system is fully deployed but is not yet permissionless as it requires Validators to be whitelisted.
    Risk analysis
    Fraud proof system is fully deployed but is not yet permissionless as it requires Validators to be whitelisted.
    Sequencer failureState validationData availabilityExit windowProposer failure

    State validation

    Fraud proofs (INT)

    No actor outside of the single Proposer can submit fraud proofs. Interactive proofs (INT) require multiple transactions over time to resolve. The challenge protocol can be subject to delay attacks.

    Data availability

    External (DAC)

    Proof construction relies fully on data that is NOT published on chain. There exists a Data Availability Committee (DAC) with a threshold of 5/6 that is tasked with protecting and supplying the data.

    Exit window

    0s

    Users have 0s to exit funds in case of an unwanted regular upgrade. There is a 0s delay before a regular upgrade is applied since contracts are instantly upgradable, and withdrawals can take up to 0s to be processed.

    Sequencer failure

    Self sequence

    In the event of a sequencer failure, users can force transactions to be included in the project’s chain by sending them to L1.

    Proposer failure

    Self propose

    Anyone can become a Proposer after 6d 8h of inactivity from the currently whitelisted Proposers.

    Technology

    Fraud proofs ensure state correctness

    After some period of time, the published state root is assumed to be correct. For a certain time period, one of the whitelisted actors can submit a fraud proof that shows that the state was incorrect. The challenge protocol can be subject to delay attacks. After the state root is published, there is also a trusted entity, called Challenger, that signs it and submits the signature to a Referee smart contract. The signatures submitted to the referee are used then verified by sentry nodes. The role of sentry nodes is to verify (assert) the submitted state root after it has been submitted. There is no integrated way to flag an invalid state root, sentry nodes will have to raise the alarm by external means, making them just observation nodes.

    • Funds can be stolen if none of the whitelisted verifiers checks the published state. Fraud proofs assume at least one honest and able validator (CRITICAL).

    1. How is fraud proven - Arbitrum documentation FAQ
    2. Arbitrum Glossary: Challenge Period
    3. RollupUser.sol - Etherscan source code, onlyValidator modifier
    4. Referee.sol - Etherscan source code, submitChallenge function
    5. Referee.sol - Etherscan source code, submitAssertionToChallenge function
    6. Solutions to Delay Attacks on Rollups

    Data is not stored on chain

    Users transactions are not published on-chain, but rather sent to external trusted parties, also known as committee members (DAC). Members of the DAC collectively produce a Data Availability Certificate (comprising BLS signatures from a quorum) guaranteeing that the data behind the new transaction batch will be available until the expiry period elapses (currently a minimum of two weeks). This signature is not verified by L1, however external Validators will skip the batch if BLS signature is not valid resulting. This will result in a fraud proof challenge if this batch is included in a consecutive state update. It is assumed that at least one honest DAC member that signed the batch will reveal tx data to the Validators if Sequencer decides to act maliciously and withhold the data. If the Sequencer cannot gather enough signatures from the DAC, it will “fall back to rollup” mode and by posting the full data directly to the L1 chain. The current DAC threshold is 5 out of 6.

    • Funds can be lost if the external data becomes unavailable (CRITICAL).

    • Users can be censored if the committee restricts their access to the external data.

    1. Inside AnyTrust - Arbitrum documentation
    Operator

    The system has a centralized sequencer

    While forcing transaction is open to anyone the system employs a privileged sequencer that has priority for submitting transaction batches and ordering transactions.

    • MEV can be extracted if the operator exploits their centralized position and frontruns user transactions.

    1. Sequencer - Arbitrum documentation

    Users can force any transaction

    Because the state of the system is based on transactions submitted on-chain and anyone can submit their transactions there it allows the users to circumvent censorship by interacting with the smart contract directly. Anyone can become a Proposer after approximately 6d 8h (45818 blocks) of inactivity from the currently whitelisted Proposers.

    1. SequencerInbox.sol - Etherscan source code, forceInclusion function
    2. Sequencer Isn’t Doing Its Job - Arbitrum documentation
    Withdrawals

    Regular exit

    The user initiates the withdrawal by submitting a regular transaction on this chain. When the block containing that transaction is finalized the funds become available for withdrawal on L1. The process of block finalization usually takes several days to complete. Finally the user submits an L1 transaction to claim the funds. This transaction requires a merkle proof.

    1. Transaction lifecycle - Arbitrum documentation
    2. L2 to L1 Messages - Arbitrum documentation
    3. Mainnet for everyone - Arbitrum Blog

    Tradeable Bridge Exit

    When a user initiates a regular withdrawal a third party verifying the chain can offer to buy this withdrawal by paying the user on L1. The user will get the funds immediately, however the third party has to wait for the block to be finalized. This is implemented as a first party functionality inside Arbitrum’s token bridge.

    1. Tradeable Bridge Exits - Arbitrum documentation

    Autonomous exit

    Users can (eventually) exit the system by pushing the transaction on L1 and providing the corresponding state root. The only way to prevent such withdrawal is via an upgrade.

    Other considerations

    EVM compatible smart contracts are supported

    Arbitrum One uses Nitro technology that allows running fraud proofs by executing EVM code on top of WASM.

    • Funds can be lost if there are mistakes in the highly complex Nitro and WASM one-step prover implementation.

    1. Inside Arbitrum Nitro
    Permissions

    The system uses the following set of permissioned addresses:

    ProxyAdmin 0x041F…8485

    Admin of UpgradeExecutor, ChallengeManager, Outbox, L1ERC20Gateway, Bridge, L1GatewayRouter, Inbox.

    Validators/Proposers 0x25EA…C6b8

    They can submit new state roots and challenge state roots. Some of the operators perform their duties through special purpose smart contracts.

    Sequencers 0x7F68…aBa9

    Central actors allowed to submit transaction batches to L1.

    RollupOwner 0x4972…495E

    Multisig that can execute upgrades via the UpgradeExecutor.

    Xai Deployer (StakingProxyAdmin owner) 0x7C94…9dC7

    The Xai Deployer EOA can upgrade all staking v2 related contracts (NodeLicenseRegistry, PoolFactory, SentryReferee, StakingPool) instantly and potentially steal all funds.

    Smart contracts

    The system consists of the following smart contracts on the host chain (Arbitrum One):

    Router managing token <–> gateway mapping.

    Can be upgraded by: ProxyAdmin (through UpgradeExecutor)

    Upgrade delay: No delay

    The referree contract allows to create new challenges (state root reports) from the permissioned challenger, collects assertions from sentry nodes, and distributes esXAI rewards for operating a sentry node. The referee contract is also a whitelisted address in the esXAI token contract, which allows it to initiate arbitrary esXAI token transfers. Additional staking through this contract is disabled. Stakers can continue to get staking rewards here or withdraw their assets.

    Can be upgraded by: StakingProxyAdmin

    Upgrade delay: No delay

    The PoolFactory allows creating and managing staking pools for V2 staking. Users can stake esXAI (and / or Sentry Keys) in pools. This contract’s address is whitelisted in the esXAI token contract, which allows it to initiate arbitrary esXAI token transfers. V2 staking through this contract is currently enabled.

    Can be upgraded by: StakingProxyAdmin

    Upgrade delay: No delay

    This is the contract where Xai Sentry Keys to run a node are minted.

    Can be upgraded by: StakingProxyAdmin

    Upgrade delay: No delay

    Main contract implementing Arbitrum One Rollup. Manages other Rollup components, list of Stakers and Validators. Entry point for Validators creating new Rollup Nodes (state commits) and Challengers submitting fraud proofs.

    Implementation used in:

    Project icon
    Project icon

    Contract managing Inboxes and Outboxes. It escrows the native token used for gas on the chain. This contract stores the following tokens: XAI.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    Main entry point for the Sequencer submitting transaction batches.

    Implementation used in:

    Project icon
    Project icon

    Entry point for users depositing ETH and sending L1 -> L2 messages.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    Contract that allows L2->L1 calls, i.e. messages initiated on L2 which eventually resolve in execution on L1.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    Contract allowed to upgrade the system.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    Implementation used in:

    Project icon
    Project icon

    Contract that allows challenging invalid state roots. Can be called through the RollupProxy.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    Implementation used in:

    Project icon
    Project icon
    OneStepProofEntry 0x99a2…F878

    Contract used to perform the last step of a fraud proof.

    Implementation used in:

    Project icon
    Project icon
    OneStepProverMemory 0xDf94…0622

    Contract used to perform the last step of a fraud proof.

    Implementation used in:

    Project icon
    Project icon
    OneStepProverMath 0x4811…A7f1

    Contract used to perform the last step of a fraud proof.

    Implementation used in:

    Project icon
    Project icon
    OneStepProverHostIo 0x89AF…3e06

    Contract used to perform the last step of a fraud proof.

    Implementation used in:

    Project icon
    Project icon
    OneStepProver0 0x1135…eAEb

    Contract used to perform the last step of a fraud proof.

    Implementation used in:

    Project icon
    Project icon

    Value Locked is calculated based on these smart contracts and tokens:

    Main entry point for users depositing ERC20 tokens. Upon depositing, on L2 a generic, “wrapped” token will be minted.

    Contract managing Inboxes and Outboxes. It escrows XAI sent to L2.

    Can be upgraded by: ProxyAdmin

    Upgrade delay: No delay

    The current deployment carries some associated risks:

    • Funds can be stolen if a contract receives a malicious code upgrade. There is no delay on code upgrades (CRITICAL).