Setting up a Frontend with SYMMIO
To integrate a frontend with SYMMIO, follow the steps below. This serves as a general outline assuming familiarity with the SYMMIO ecosystem, smart contract interaction, and frontend development.
1. Clone or Build the Frontend Application
The first step is to either clone the official SYMMIO Frontend SDK repository or create your own custom frontend application using the provided SDK and documentation. The SDK simplifies the process of interacting with SYMMIO's APIs and smart contracts. Refer to the Frontend SDK Setup Guide for detailed instructions on cloning and configuring the SDK or creating your own implementation.
2. Deploy a MultiAccount Contract
To support user-specific functionality and delegation of access, you’ll need to deploy a MultiAccount contract following the standards set by SYMMIO. The MultiAccount contract plays a vital role in managing user interactions with SYMMIO’s smart contracts:
User Volume Tracking: MultiAccount helps track trading volume at a user level, providing insights into user activity and engagement.
Sub-Accounts for Trading: Users can create sub-accounts under their primary account for better organization and management of their trades.
Automated Fee Claiming: Users interact with the sendQuoteWithAffiliate() function by passing the MultiAccount address of the frontend. This enables frontends to automatically claim fees for trades routed through them, streamlining the process for both users and the platform.
Refer to the MultiAccount Deployment Guide for detailed instructions on deploying and configuring the contract.
3. Provide Frontend URLs for Whitelisting
Once your frontend is ready for deployment, you’ll need to share the URL(s) with the team for whitelisting. Provide the production frontend address to ensure it is added to the CORS whitelist (Rasa). If you have test environments or staging frontends, you can provide their URLs as well, and the team will include them in the whitelist to facilitate development and testing.
Whitelisting your frontend is a critical step for enabling features like Instant Execution, where user requests are processed rapidly via delegated access.
Last updated