/Docs

XToken

XToken is crucial to Helix's Bridge as a Service (BaaS) by offering a framework and service for custodian dapps or token owners to create bridges across different chains. It utilizes the Cryptocurrency Backed Asset (CBA) model to map tokens, ensuring a reliable issuance and redemption process during bridging.

Terms #

CBA Model #

The CBA Model involves deploying the Backing module on the source chain and the Issuing module on the target chain. The asset registration and issuance process is completed through underlying calls to the generic cross-chain messaging channel.

CBA Model

Protocol #

Protocol

Transaction Atomicity #

The issuance or redemption process can be treated as a transaction. For example, when a user initiates a lockAndXIssue operation on the source chain, the protocol generates an global unique ID to track this transaction. Similarly, on the target chain, a status tracks the transaction's state, including TRANSFER_UNFILLED, TRANSFER_DELIVERED, or TRANSFER_REFUNDED. This procedure is analogous for the burnAndXUnlock operation, but we will focus on lockAndXIssue to illustrate how transactions are resolved under various circumstances.

If the issuance of mapped tokens on the target chain is successful, the transaction status updates to TRANSFER_DELIVERED and the process concludes.

However, if there are issues in the messaging layer such as undelivered messages, delivery failures, or significant delays, leaving the status at TRANSFER_UNFILLED, the user can initiate a rollback through the xRollbackLockAndXIssue operation on the target chain. This marks the status as TRANSFER_REFUNDED and triggers a message to the source chain to process an asset rollback and finalize the transaction.

This streamlined approach reduces our dependency on the responsiveness of the cross-chain messaging service, enables compatibility with more messaging services, and lowers operational costs. It does, however, require an additional refund operation in cases of failure, ensuring transaction integrity and user confidence.

© 2024 Developed by Helixbox Team