Asterizm
  • What is Asterizm
    • Overview
    • Architecture
    • Benefits
    • Supported chains
      • Non-EVM chains integration plan
    • Frequently asked questions
    • White paper
    • GitHub
  • Infrastructure
    • Overview
    • Asterizm Connector
      • Client smart contract abstraction
      • Initializer smart contract
      • Translator smart contract
    • Client off-chain module
    • Asterizm Relayer
    • Asterizm Interfaces
      • IAsterizmConfigEnv
      • IConfig
      • IAsterizmEnv
      • IClientReceiverContract
      • IInitializerReceiver
      • IInitializerSender
      • IMultiChainToken
      • INonce
      • ITranslator
  • Guides
    • Transaction flow
    • Getting started
      • 1. Deploy your smart contracts
        • AsterizmDemo contract
        • Client contracts implementation logic
        • Solana integration logic
      • 2. Implement off-chain module
        • Simple implementation (shell script)
        • Default implementation (manual)
      • 3. Important! One final pre-flight check
    • External relays
      • Relay deployment and configuration
      • List of external relays
        • Chainlink
          • Mainnet
          • Testnet
    • Source chain notifications
    • Refund Logic
    • Error messages
      • EVM
        • Source chain
        • Destination chain
      • TVM and TON
      • Solana
    • Fee management
    • Code examples
    • Multi-Owner (Sender) System
  • Advanced
    • Best practices
    • Asset transfer
    • Debugging
  • Technical reference
    • Mainnet
    • Testnet
    • Smart contract audits
    • SDK
Powered by GitBook
On this page
  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5
  • Step 6
  • Step 7
  • Step 8
  • Step 9
  • Step 10
  • Step 11
  1. Guides

Transaction flow

Learn how Asterizm Protocol operates

PreviousITranslatorNextGetting started

Last updated 6 months ago

packet - data packet containing cross-chain transaction content and related parameters;

payload - message/data transmitted as part of a cross-chain transaction;

dst - destination network ID;

xID - a unique cross-chain transaction ID generated when the cross-chain transaction is initialized
 in the _initAsterizmTransferEvent() method;

p - additional parameters of the transaction: address of the source contract, destination contract, timestamp, and other data.

Step 1

The transaction can contain arbitrary information and one or more actions (instructions) to be performed on the destination networks.

Step 2

At this step, the key parameters are formed, which will further ensure the security of the cross-chain transaction, namely to confirm its validity and integrity in the destination chain.

Step 3

Step 4

Step 5

After the client (sender) of the cross-chain transaction is determined, the nonce value is incremented for it.

Step 6

Step 7

Step 8

Step 9

Step 10

Step 11

Complete information can be found in Section 2 of the

The client implements a smart contract using an and deploys it to the required networks. The _initAsterizmTransferEvent() method is used to initiate a cross-chain transaction on the contract. The data and parameters of the cross-chain transaction are transmitted to it.

The sends the received data and hash based on the payload generated at that moment xID, source chain id, destination chain id, client smart contract address in the source and destination chains.

The receives the cross-chain transaction payload and initiates the cross-chain transaction by calling initAsterizmTransfer() on the client's smart contract in the source network.

Before sending transaction proofs (hash and xID) to the , the performs a validity and integrity check of the transaction by comparing the hash, calculated based on the payload. This effectively mitigates the risk of spam and counterfeit transactions in case of compromise of the .

This step verifies that this exact transaction was initiated on the , which eliminates the possibility of spam from the .

The checks the transaction nonce to preserve the cross-chain transaction execution sequence and transmits the transaction proofs (hash and xID) with the unique parameters to the .

When a data packet is received on the , the client is identified based on the destination
 chain id, the Client smart contract address in the destination chain, and the client smart contract address in the source chain.

pull the proofs with the parameters from the and send them to the in the destination network for further processing.

The on the destination network accepts the encrypted data with the parameters from the and passes it to the for validation.

After receiving the proofs and the parameters, the checks the nonce to comply with the transaction sequence, stores the transaction xID to validate the transaction at step 10, and transmits the proofs to the .

The in the destination network receives the proofs with the parameters and emits an event to notify the delivery of proofs, which is awaited by the .

At this stage, the first but not the main step of transaction validity check occurs - the hash from the payload and the transaction's xID are compared, mitigating the risk of compromise.

After the first step of cross-chain transaction validation, the initiates the transaction on the by calling the asterizmClReceive() method in the destination network, sending the payload (data) and xID to the contract, and validating the transaction on the by calculating the hash from received payload and checking the xID.

At this step, the integrity of the data and the trusted addresses is checked before the transaction is executed. This check eliminates the risk of hacking the .

The verification is performed by calculating and matching the hash from the payload with the hash received from and the xID that was previously stored on the . If the verification succeeds, it means that the executes exactly the transaction it sent, and does so for the first time. This algorithm eliminates the possibility of spamming transactions and spoofing data on the (if, for example, the server is compromised).

After receiving the confirmation of the validity and integrity of the cross-chain transaction, the executes the payload or data sent in the cross-chain transaction, calling methods of other contracts or performing calculations on the client’s contract. The logic of this step depends solely on the client’s business logic implemented in the cross-chain transaction.

White paper
abstract class from Asterizm
client smart contract
Client off-chain module
Initializer contract
Сlient s smart contract
Client server
client's smart contract
client's off-chain module
Initializer smart contract
Translator smart contract
Initializer smart contract
Asterizm Relayer servers
Translator contract
Translator smart contract
Translator smart contract
Relayers
Initializer smart contract
Initializer smart contract
Client’s smart contract
Client's smart contract
Client's off-chain module
relay server
client’s server
Client’s smart contract
Initializer smart contract
client’s server
Relayers
Initializer contract
client’s contract
client’s server
client’s smart contract
Asterizm architecture