> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trails.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Trails Contracts

> Trails protocol smart contracts and security audits

## 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:

<div className="not-prose grid gap-x-4 gap-y-2 sm:grid-cols-2 md:grid-cols-2">
  <Card title="Trails Contracts" icon="github" href="https://github.com/0xsequence/trails-contracts">
    View the full smart contract source code, documentation, and deployment scripts for Trails here
  </Card>

  <Card
    title="Sequence V3 Wallet Contracts"
    icon="github"
    href="https://github.com/0xsequence/wallet-contracts-v3
"
  >
    View the full smart contract source code, documentation, and deployment scripts that powers account abstraction for Trails
  </Card>
</div>

### 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

All contracts leverage Sequence v3 account abstraction for flexible, secure cross-chain operations.

See [Protocol v1.5](/architecture/v1-5) for more detail on how HydrateProxy enables malleable calldata.

## Security Audits

Security is a top priority for Trails. All smart contracts have undergone comprehensive third-party security audits and public code4rena bounty competitions:

<div className="not-prose grid gap-x-4 gap-y-2 sm:grid-cols-2 md:grid-cols-2">
  <Card title="Trails Security Audits" icon="shield-check" href="https://github.com/0xsequence/trails-contracts/tree/master/audits">
    Review detailed security audit reports from independent security firms for Trails contracts
  </Card>

  <Card title="Sequence V3 Wallet Security Audits" icon="shield-check" href="https://github.com/0xsequence/wallet-contracts-v3/tree/master/audits">
    Review detailed security audit reports from independent security firms for Sequence wallet contracts
  </Card>
</div>

For a technical overview, see the [Protocol Architecture](/architecture/protocol) documentation.
