Smart Accounts
Smart Accounts extend the functionality of the Sourdough's modules by enabling it to manage accounts on both Cosmos chains and EVM chains. This is made possible through Axelar’s General Message Passing (GMP) protocol, which allows the a Cosmos chain to interact with EVM contracts. By sending messages via IBC transfers to the Axelar network, the Cosmos chain can create and control EVM-based contract accounts that are linked to a Cosmos chain account.
How Cosmos and EVM Interact Using Axelar GMP
Axelar’s General Message Passing (GMP) protocol enables seamless and secure communication between Cosmos-based chains (e.g., Cosmos SDK chains) and Ethereum Virtual Machine (EVM)-compatible chains (e.g., Ethereum, Binance Smart Chain, Avalanche). By using Axelar, different blockchain ecosystems can interact without relying on centralized intermediaries, providing a foundation for decentralized applications (dApps) that operate across multiple chains.
GMP Transaction Flow
The process begins when a Cosmos-based chain (e.g., Cosmos Chain) initiates a transaction, which is packaged into a GMP message containing critical information such as the destination chain, transaction payload, and cryptographic signature of the sender. This GMP message is then transmitted through IBC (Inter-Blockchain Communication) to the Axelar Gateway.
Once received by the Axelar Gateway, the GMP message undergoes validation by Axelar’s network of relayers and validators, ensuring it is correctly formatted and tamper-proof. The message is then forwarded to the destination EVM chain (e.g., Ethereum). On the EVM side, a Gateway Contract is responsible for validating the message’s integrity, confirming the sender's signature, and executing the requested operation, such as transferring tokens or invoking a smart contract.
- Transaction Initiation: The user on a Cosmos-based chain (e.g., Cosmos Chain) initiates a transaction (such as creating a new account or sending tokens). The Cosmos Chain constructs the GMP payload, which includes the details of the transaction, such as the destination chain, the transaction details (e.g., token transfer or contract call), and the sender’s cryptographic signature.
- Message Passing: The GMP message is then sent through IBC to the Axelar Gateway. Axelar ensures the message’s integrity, forwarding it to the EVM destination chain.
- Validation and Execution: The Gateway Contract on the EVM chain receives the GMP message and performs necessary validation checks, including confirming the signature and ensuring the transaction is valid for execution. Once validated, the contract will execute the requested operation, such as transferring tokens or interacting with smart contracts.
- Finality: Axelar validators ensure atomic execution of the transaction, confirming that the operation is fully executed across both chains or reverted if any error occurs. This guarantees that there is no inconsistency or partial execution across chains.
Smart Accounts serve as tools for managing cross-chain operations, enabling users to perform complex transactions seamlessly between Cosmos-based and EVM-compatible chains. These accounts provide essential functionality, including transaction validation, account creation, and smart contract execution. With the help of Axelar’s GMP protocol, users can perform secure, trustless, and efficient operations across multiple blockchain ecosystems, whether for basic asset transfers or complex dApp interactions