1-Click Confirmations
Trails enables the following experience for users:- Execute any arbitrary logic such as a swap, mint, deposit, buy on an app or chain.
- Action or asset can be priced in any token on any chain.
- Users can select any desired token from any chain from their balance to execute the payment.
- Any bridges, swaps, and execution logic necessary to execute the payment are handled automatically.
How It Works
Trails enables 1-click payments through an intent-based architecture that is able to execute multiple transactions across multiple chains from a single user wallet confirmation with only a few lines of code. Here’s how it works:-
User Initiates Payment
The user clicks “Buy” or initiates any action requiring payment on a dapp, triggering the Trails flow. -
Intent Address Generation
A unique intent contract address is computed based on the full transaction orchestration across multiple chains. The intent address encodes the details of both transactions on both the origin and destination chains. -
Origin Deposit
The user sends a single transaction to deposit their tokens (from any chain they hold funds on) into the intent address on the origin chain. Importantly, the user’s wallet has full control over this intent address. -
Origin Chain Execution
Relayer automatically executes an operation on the origin intent address by submitting a merkle proof to execute the encoded origin transaction. The Relayer is unable to modify the transaction contents, it simply is able to trigger the execution of the encoded origin transaction. In fact, any party is able to safely trigger the intent transaction to move it forward. - Destination Chain Arrival The bridged funds arrive at the corresponding intent address on the destination chain, ready for the final execution.
-
Final Settlement
Relayer executes the final wallet operation on the destination intent address by submitting a merkle proof to execute the encoded destination transaction, completing the payment by sending funds to the recipient, executing any required contract calls, or performing other specified actions.
calldata
to execute if desired.