---
title: Periphery contracts
description: 'Find the contracts around the core protocol: affiliate fee routing, the TRUST bridge, swap-and-bridge and emissions automation.'
url: https://docs.intuition.systems/docs/contracts/periphery
markdown_url: https://docs.intuition.systems/docs/contracts/periphery.md
version: V2
llms_index: https://docs.intuition.systems/llms.txt
kind: reference
reader:
  - app
  - agent
  - operator
packages:
  - '@0xintuition/periphery@0.1.1'
  - '@0xintuition/deployments@0.1.1'
---

Periphery contracts sit around MultiVault and the emissions system. Most of them let you build on the protocol without changing it. FeeProxy is the one most integrators will use. It lets anyone who routes deposits and creations into Intuition **earn an affiliate fee** on that flow.

| Contract | Chain | Status | What it does |
| --- | --- | --- | --- |
| [FeeProxy](https://docs.intuition.systems/docs/contracts/fee-proxy) | Intuition mainnet and testnet | Live | Charges a registered affiliate's fee on deposits and creations, then forwards the rest to MultiVault |
| Metalayer hubs and spokes | Base and Intuition mainnet | Live | Bridge TRUST, USDC and WETH between Base and Intuition |
| TrustSwapAndBridgeRouter | Base | Redeployment pending | Swaps ETH or an ERC-20 for TRUST and bridges it to Intuition |
| EmissionsAutomationAdapter | Base | Live | Lets a keeper trigger each epoch's mint and bridge |

FeeProxy ships in the core contracts repository. The router and the automation adapter live in the separate periphery repository, which has no testnet deployments. [Periphery repository](https://github.com/0xIntuition/intuition-contracts-v2-periphery/tree/1d951b225d30f578667f4247e031df86a5ba7996)

## Earn affiliate fees with FeeProxy

A wallet, app or agent that sends users to Intuition can register as an affiliate and set its own fee, within protocol caps. Users route their MultiVault calls through FeeProxy with the affiliate's address. FeeProxy takes the fee, pays it to the affiliate in the same transaction, and forwards the rest to MultiVault. The user's shares and atoms are the same as with a direct call.

On mainnet, registration costs 100 TRUST. Fees are capped at 20% plus a fixed fee of up to 50 TRUST. See [FeeProxy](https://docs.intuition.systems/docs/contracts/fee-proxy) for registration, the fee formula and the approvals users need. To route users through an existing affiliate from an app, follow [Route writes through the FeeProxy](https://docs.intuition.systems/docs/build/fee-proxy).

## Bridge with Metalayer

Hubs on Base lock assets and spokes on Intuition release them. TRUST arrives on Intuition as native gas through `MetaNativeSpoke`. The USDC and WETH hubs on Base use the same addresses as their spokes on Intuition. The emissions controllers use the TRUST hub to deliver each epoch's rewards. [TRUST token](https://docs.intuition.systems/docs/contracts/trust-token) lists the TRUST bridge addresses, and [Deployments](https://docs.intuition.systems/docs/contracts/deployments) lists all of them.

## Swap and bridge in one step

`TrustSwapAndBridgeRouter` buys TRUST on Base through Aerodrome Slipstream pools and bridges it to a recipient on Intuition. Every entry point is payable, because the bridge fee is paid in ETH. Excess ETH is refunded.

| Function | Use |
| --- | --- |
| `swapAndBridgeWithETH(path, minTrustOut, recipient, deadline)` | Swap ETH for TRUST. The path must start with WETH and end with TRUST. |
| `swapAndBridgeWithERC20(tokenIn, amountIn, path, minTrustOut, recipient, deadline)` | Swap an approved ERC-20 for TRUST. |
| `bridgeTrust(trustAmount, recipient)` | Bridge TRUST you already hold, after approving the router. |
| `quoteBridgeFee(trustAmount, recipient)`, `quoteExactInput(path, amountIn)` | Quote the bridge fee and the swap output. |

The contract hardcodes its Base addresses. The current version adds the `deadline` parameter, so the older router deployed on Base does not match its ABI. **No router address is published for this release.** The `@0xintuition/contracts-v2-periphery@1.1.0-alpha.0` package ships the router's ABI and bytecode for the redeployment. [TrustSwapAndBridgeRouter](https://github.com/0xIntuition/intuition-contracts-v2-periphery/blob/1d951b225d30f578667f4247e031df86a5ba7996/contracts/TrustSwapAndBridgeRouter.sol)

## Automate emissions

`EmissionsAutomationAdapter` holds `CONTROLLER_ROLE` on the BaseEmissionsController. `checkUpkeep` returns true when the current epoch has not been minted. An account with the adapter's `UPKEEP_ROLE` then calls `performUpkeep`, which mints and bridges that epoch. The admin can pause the adapter. See [Emissions](https://docs.intuition.systems/docs/contracts/emissions) for the full flow. [EmissionsAutomationAdapter](https://github.com/0xIntuition/intuition-contracts-v2-periphery/blob/1d951b225d30f578667f4247e031df86a5ba7996/contracts/EmissionsAutomationAdapter.sol)

## Shared infrastructure

Intuition mainnet also runs standard utility contracts at their usual addresses: ERC-4337 EntryPoint v0.8 at `0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108`, Multicall3 at `0xcA11bde05977b3631167028862bE2a173976CA11` and the Safe singleton factory at `0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7`. Atom wallets use the EntryPoint.

## Related

- [FeeProxy](https://docs.intuition.systems/docs/contracts/fee-proxy) is the full reference for the affiliate contract.
- [Deployments](https://docs.intuition.systems/docs/contracts/deployments) lists every address by chain.
- [Audits](https://docs.intuition.systems/docs/contracts/audits) lists the review that covered the periphery repository.

Applies to V2 · `@0xintuition/periphery` 0.1.1 · `@0xintuition/deployments` 0.1.1
