Intents¶
TAO Intents lets your users move value between chains. The user says what they want, for example "100 USDC on Ethereum in, TAO on Subtensor EVM out", and signs two transactions on the origin chain: an approval for USDC, then the order itself, which locks the input in the Intents contract. A solver then delivers the output to the recipient on the destination chain. If nobody fills the intent before its deadline, the input is refunded, always in USDC, on the origin chain.
Recommended: use the SDK¶
The TypeScript SDK is the easiest way to integrate. One call gets a quote, approves USDC, opens the intent, and gives you an order to track:
import { TaoIntents } from "@tao.com/intents-sdk";
const intents = new TaoIntents({ rpcUrls: { 1: "https://YOUR-ETHEREUM-RPC" } });
const { order, quote } = await intents.execute({
wallet: window.ethereum,
originChainId: 1,
destinationChainId: 964,
outputToken: "TAO",
amount: "100", // 100 USDC
});
const result = await order.waitForSettlement(); // "filled" | "refunded"
See the SDK guide for installation, progress events, quotes, order tracking, and error handling.
Under the hood¶
The SDK uses two pieces, and you can also call them directly if you can't use the SDK:
- The Quoter API tells you how much the user will receive for a given input.
- The Intents smart contract is where you submit the intent. Your app calls it directly from the user's wallet. No TAO API sits between your users and the contract.
How it works¶
%%{init: {'theme':'base','themeCSS':'[id$=-sequencenumber]{fill:#9d89ff !important;stroke:#9d89ff !important;}.sequenceNumber{fill:#0a0a0f !important;font-weight:600;font-size:13px;}','themeVariables':{'primaryColor':'#1c1b21','primaryTextColor':'#f5f5f5','primaryBorderColor':'#9d89ff','lineColor':'#a1a1a1','secondaryColor':'#2e2843','tertiaryColor':'#0b080f','noteBkgColor':'#28282d','noteTextColor':'#f5f5f5','noteBorderColor':'#9d89ff','actorBkg':'#1c1b21','actorBorder':'#9d89ff','actorTextColor':'#f5f5f5','actorLineColor':'#a1a1a1','signalColor':'#f5f5f5','signalTextColor':'#f5f5f5','sequenceNumberColor':'#0a0a0f'}}}%%
sequenceDiagram
autonumber
participant App as Your app
participant Quoter as Quoter API
participant Origin as Intents contract<br/>(origin chain)
participant Solver
participant Dest as Intents contract<br/>(destination chain)
App->>Quoter: Request a quote
Quoter-->>App: Output amount
App->>Origin: approve USDC, then open(order)
Note over App,Origin: USDC is escrowed
Origin-->>Solver: Open event
alt Filled before fillDeadline
Solver->>Dest: fill(order)
Dest->>App: Output delivered to the recipient
else Not filled before fillDeadline
Origin-->>App: Refunded event
Note over App,Origin: Input returned to the user, in USDC, on the origin chain
end
- Quote. Call the Quoter API with the route and amount. It returns the output amount a solver is willing to deliver.
- Open. Have the user approve USDC and call
openon the Intents contract, passing the quoted output amount. The contract escrows the USDC and emits anOpenevent with the order ID. - Fill. A solver sees the event and sends the output token to the recipient on the destination chain.
- Refund. If the intent is not filled before its
fillDeadline, the protocol refunds the escrowed USDC to the user on the origin chain. The refund is sent after the deadline passes, the user cannot trigger it, and the order stays pending until theRefundedevent. See order status to tell a refund from an order that is still waiting.
The SDK follows these steps for you. The contract is the source of truth: you can also follow an order using contract events and reads alone.
Start here¶
| Page | Use for |
|---|---|
| SDK (recommended) | Install the TypeScript SDK and open an intent with one call. |
| Integration Guide | Integrating without the SDK: a complete example that calls the Quoter API and the contract directly. |
| Quoter API | Request and response details, deadlines, and error handling for quotes. |
| Smart Contract | Contract addresses, the open function, the order struct, events, refunds, and reverts. |
| Quoter API Reference | The OpenAPI reference for the quote endpoint. |
Supported routes¶
These are the mainnet deployments. Intents are opened on an origin chain and filled on a different destination chain.
| Chain | Chain ID | Intents contract | USDC (input token) |
|---|---|---|---|
| Ethereum | 1 |
0x2831Ea5524f171735aF8FEB2e331821bef176C8A |
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
| Subtensor EVM | 964 |
0x24834012973b6e70997a23C7aAB01481d46CB8E1 |
0x9001dbe4D68d36ab87923A2a9Dfb0c745fd25001 |
Tokens¶
| Chain | Token | Address | Decimals | Use |
|---|---|---|---|---|
| Ethereum | USDC | 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 |
6 | Input and output |
| Ethereum | ETH (native) | 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE |
18 | Output |
| Subtensor EVM | USDC (on-chain symbol USDC.e) |
0x9001dbe4D68d36ab87923A2a9Dfb0c745fd25001 |
6 | Input and output |
| Subtensor EVM | wTAO | 0x134f59E8B8637FD70ae12f263492B1dc73A25D1e |
18 | Output |
| Subtensor EVM | TAO (native) | 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE |
18 | Output |
The USDC on Subtensor EVM is a bridged token whose on-chain symbol is USDC.e, so wallets label it USDC.e. These docs call it USDC. The native-token address is a placeholder that the contract and the Quoter API use for ETH and TAO.
- Input: USDC on the origin chain.
- Output: any token in the table for the destination chain.
- Recipient: an EVM (
0x) address on the destination chain. Native TAO on Subtensor can also be delivered to a Substrate account through the SDK, and subnet alpha can be staked to a Substrate coldkey (Deliver subnet alpha).
If a pair is not supported, the Quoter API returns an error instead of a quote.
Fees¶
The Intents contract charges a protocol fee, currently 0.30% (30 basis points), taken from the USDC the user pays. The quote already accounts for it, and you cap it in the order with maxProtocolFeeBps. Solver costs are reflected in the quoted output amount, so there is nothing else to add on top of the quote.
Authentication¶
Neither the SDK, the Quoter API, nor the smart contract needs an API key or access token.