Comment on page
Integrating a Front End
Anyone is able to create a UI for Perennial. The markets are open for all to interact with & the platform has a method to charge extra fees on flow originating from a particular UI.
While the Perennial team initially created the first markets and user interface, Perennial would prefer to support teams in their efforts to build new & exciting experiences on top of the protocol rather than directly compete.
By integrating Perennial as the underlying markets infrastructure you can reduce the technical burden for developers & improve time to market for new products.
Applications utilizing Perennial's
MultiInvoker.solcontract are able to add fees to their order bundles. This allows application developers to focus on creating a great experience for traders/LPs on the front end without having to write Solidity to collect fees on order flow.
In order to reduce the amount of transactions required to interact with the protocol & simplify the user experience, the
MultiInvoker.solwas developed to batch market actions & liquidity provisioning actions into a single transaction.
For example, a new user wants to create a trade on one of Perennial's markets & pay a fee to the UI. Without the MultiInvoker following 4 transactions would be required:
approve()market #1 to transfer collateral
- 2.Request latest oracle price by calling
- 3.Make a trade on market #1 by calling
- 4.Transfer fee to UI developer
Furthermore, every new market the user would interact with they'd need to
approve()the collateral for that market. Now compare this with the MultiInvoker:
approve()MultiInvoker to transfer collateral (only required once)
- 1.Request oracle via
- 2.Make trade via
- 3.Transfer fee to UI developer
In order to your to improve development speed we’ve created an example repo which covers the basic calls you’ll need to populate a UI & submit trades.