An on-chain module verifies the validity and integrity of transactions using blockchain cryptography.
An off-chain module comprising two independent entities for transmitting data (payload) on the Client server side and transaction proofs on the Relayer server side.
The client implements a smart contract using an abstract class from Asterizm 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 transaction can contain arbitrary information and one or multiple actions (instructions) to be performed on the destination networks.
The client smart contract 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. Note: 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.
The Client off-chain module receives the cross-chain transaction payload and calls initAsterizmTransfer() on the client’s smart contract in the source network to continue the cross-chain transaction.
Before sending transaction proofs (hash and xID) to the Initializer contract, the Сlient’s smart contract performs a validity and integrity check of the transaction by comparing the hash, which is calculated based on the payload. Note: This effectively mitigates the risk of spam and counterfeit transactions in the event of a compromise of the Client server.
The Initializer smart contract verifies the transaction nonce to maintain the sequence of cross-chain transaction execution and sends the transaction proofs (hash and xID) along with unique parameters to the Translator smart contract. Note: When a data packet is received on the Initializer smart contract, 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. After the client (sender) of the cross-chain transaction is determined, the nonce value is incremented for it.
Asterizm Relayer servers pull the proofs with the parameters from the Translator contract and send them to the Translator smart contract in the destination network for further processing.
The Translator smart contract on the destination network receives the encrypted data along with the parameters from the Relayers and then transfers it to the Initializer smart contract for validation.
Upon receipt of the proofs and parameters, the Initializer smart contract verifies the nonce to maintain the transaction sequence, records the transaction xID for validation at step 10, and sends the proofs to the Client's smart contract.
The client's smart contract in the destination network receives the proofs along with the parameters and emits an event to notify the delivery of proofs, which is anticipated by the Client's off-chain module. Note: 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 relay server compromise.
Once confirmation of the cross-chain transaction's validity and integrity is received, the client's smart contract proceeds to execute the payload that was included in the cross-chain transaction, calling methods of other contracts or performing calculations on the client’s contract. The logic of this step depends entirely on the client's business logic, which is implemented as part of the cross-chain transaction.
Cross-chain distribution of the token accumulated in the protocol to several networks with a single transaction at claim.
Distribute the emission across different networks depending on the demand for tokens in each network.
Top up your gas token balance in multiple chains with a single transaction.