For the complete documentation index, see llms.txt. This page is also available as Markdown.

Setting up a Frontend with SYMMIO

To integrate a frontend with Symmio, follow the steps below. This is a general outline that assumes familiarity with the Symmio ecosystem, smart contract interaction, and frontend development.

1. Clone or build the frontend application

Start by cloning the official Symmio Frontend SDK repository, or build your own frontend using the SDK and docs. The SDK handles most of the work of talking to Symmio's APIs and smart contracts. See the Frontend SDK setup guide for how to clone and configure it, or to roll your own.

2. Register as an affiliate

In v0.8.5 every frontend trades through the shared AccountLayer, and you register as an affiliate so users can create accounts under you and your trades earn fees. Registration is two steps:

  1. Request registration with your frontend name, brand color, admin address, fee stakeholder configuration, and the Symmio core instance(s) you'll use.

  2. A protocol APPROVER_ROLE holder approves it. On approval, an AccountManager proxy is deployed for you (deterministic CREATE2), a fee distributor address is generated, and your affiliate is registered on each allowed core.

Once your affiliate is ACTIVE, users can create SubAccounts under it, and your affiliate address is what tracks volume and routes platform fees on trades that go through you:

  • User volume tracking: the affiliate fee system tracks trading volume per affiliate, giving you insight into activity and engagement.

  • SubAccounts and VirtualAccounts: users create SubAccounts to organize their trades, with per-position isolation handled by the AccountLayer.

  • Automated fee claiming: trades carry your affiliate address, so collected fees route to your fee distributor automatically.

The auto-deployed AccountManager also exposes the old MultiAccount-style API (addAccount, _call, and so on) as a backward-compatible entry point. See Building a New Frontend for the account model, and Upgrading from MultiAccount (0.8.4) if you're moving an existing deployment.

3. Provide frontend URLs for whitelisting

When your frontend is ready to deploy, share its URL(s) with the team for whitelisting. Provide the production address so it's added to the CORS whitelist; if you have test or staging environments, share those too and the team will whitelist them for development. Whitelisting is required for features like Instant Execution, where a session key signs trades through the Instant Layer for near-instant confirmations.

Last updated