Overview
Trails is built on a robust set of smart contracts deployed across multiple chains. All contracts are deployed via ERC-2470 Singleton Factory for deterministic addresses, ensuring consistency across the ecosystem.Contracts Repository
The complete source code for all Trails smart contracts is available on GitHub:Trails Contracts
View the full smart contract source code, documentation, and deployment scripts for Trails here
Sequence V3 Wallet Contracts
View the full smart contract source code, documentation, and deployment scripts that powers account abstraction for Trails
Key Contracts
The Trails protocol consists of several core smart contracts:- TrailsRouter - Main routing contract for intent execution and token operations
- TrailsIntentEntrypoint - Entry point for intent deposits with permit support
- TrailsRouterShim - Execution wrapper with sentinel tracking for success/failure states
- HydrateProxy - Runtime value injection for v1.5 intents. Resolves dynamic amounts and addresses (ERC-20 balances, intent wallet address) at execution time, enabling composable actions with
dynamic()without committing exact amounts at quote time - MalleableSapient - Sapient signer that authorizes commitments whose calldata is hydrated on-chain (the signer module behind HydrateProxy)
- RequireUtils - Precondition checks used inside intent execution to fail fast when on-chain state diverges from quote-time assumptions
- TrailsUtils - Convenience contract that bundles
MalleableSapient,HydrateProxy, andRequireUtilsunder a single deployed address. Its address is now returned by the API astrailsUtilsAddressalongside the other Trails contract addresses. - TimedRefundSapient - Sapient signer that authorizes a refund payload after a per-intent unlock timestamp. Combined with the API’s intent recovery endpoints, lets users self-recover funds stranded in a counterfactual intent wallet after the configured timeout.
- PausableSapient / Pausable - Sapient signer wrapping any inner signer with a circuit breaker. A set of designated operators can pause signature acceptance to halt new intent commitments without redeploying contracts; operator changes are emitted as events for observability.
Security Audits
Security is a top priority for Trails. All smart contracts have undergone comprehensive third-party security audits and public code4rena bounty competitions:Trails Security Audits
Review detailed security audit reports from independent security firms for Trails contracts
Sequence V3 Wallet Security Audits
Review detailed security audit reports from independent security firms for Sequence wallet contracts