Symphony is on Testnet
We introduced symphony finance limit orders less than a week ago here:
We are excited to announce that symphony limit orders are now live on the Kovan testnet. In this post, we’ll try to elaborate on the design of our protocol and also explain how anyone can use our application to create and execute limit orders.
Our protocol allows anyone to create limit orders by depositing the “sell” asset into the core contracts. At the time of creating orders the “buy” asset, amount, and stop-loss are required inputs. Once the order is created the keccak256 hash of the abi encoded order is stored in the contract storage. This serves as a checksum at the time of order execution, updation, and cancellation. Other than this nothing is stored in the contract storage. The deposited funds are initially stored in the core contracts. If there is a strategy associated with the asset and if the contract has sufficient buffer funds then the remaining funds will be deposited into the strategy. Having a buffer allows us to save approximately 2x gas costs for order creation, cancellation, and execution.
In the current testnet version we use Aave as a strategy. In the future, we will have multiple strategies as shown in the architecture diagram.
The orders that are eligible to be filled can be executed by running a relayer service. The relayer service indexes open orders that can be executed and sends a transaction to execute those orders. The current testnet version uses Uniswap to execute orders. The executor will also be able to fill orders with its own liquidity in the future. The executor receives a fee for executing orders as an incentive. We further want to incentivize both order creators and executors with governance tokens in the future.
We use the graph protocol in our user interface to fetch the orders and their details.
How to create order
- Open the app on https://app.symphony.finance
- Connect to Kovan Test Network
- Get some Kovan Testnet Ether from Faucet
- Do steps shown in the video
Anyone can be an order executor in the current design. To run an executor you can follow the steps below.
Steps to run Relayer:
- Clone the Symphony Relayer repo here.
- Install Postgres on your system.
- Create a database inside Postgres with the name
symphony_kovan
. - Now, create a
.env
file and, complete as perexample.env
. - Now you are ready to run the relayer service. Run the below commands in the separate terminals.
npm run indexer:kovan
&npm run executor:kovan
Join the community
We’d love to hear your feedback and answer any questions that you have.
Join our community on Discord
Follow us on Twitter to get the latest updates about Symphony Finance.