3.8.5 Token Bridge

The Token Bridge pattern in the DGT ecosystem is a key component designed to facilitate the transfer of assets, like tokens, to other networks, for instance, the Ethereum network. These solutions, often referred to as bridges to other networks or cross-chain atomic operations, play a significant role in enhancing the reach and flexibility of a blockchain network.

One of the most popular methods supporting this cross-chain asset transfer is the Hash Time Lock Contract (HTLC). It employs a suite of cryptographic protocols, which ensures a secure and trustless environment for executing these asset transfers. The protocol follows the ensuing principles:

  • Initiation: User A generates a random number (s) and calculates its hash (h = hash(s)). This hash (h) is then sent to User B. This initialization step creates the hash-locked contract between User A and User B.

  • Asset Locking: User A and User B lock their respective assets using a smart contract. This is done sequentially, providing an additional layer of security and trust between the parties.

  • Execution or Refund: If User A fails to present the original number (s) within a specified time, the assets locked in the smart contract will be automatically refunded to both parties. This ensures fairness and prevents assets from being indefinitely locked.

While this method is reliable and secure, it does come with a few caveats. The execution time can be significant, and it requires a unique implementation for each type of asset being transferred. Moreover, to ensure the accurate tracking of activities on the target blockchain network, a set of Relay nodes act as observers. These nodes monitor the state of the target blockchain, capturing events and providing information back to the DGT network.

Last updated