Frontend & Client Integrations

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.

Integrating Perennial as the underlying markets infrastructure for a new product can reduce the technical burden for developers & improve time to market.

While the Perennial team initially created the first markets and user interface, we welcome projects to integrate with the Perennial protocol to tap into its liquidity & leverage it's robust design.

Software Development Kits

Perennial has two SDKs available to help developers get started quicker. The most fully featured SDK written in Typescript an is utilized across most of the client integrations.

Additionally, a Python based SDK has been created to assist Makers & Algorithmic traders with their workflows.

These SDKs will abstract away a large portion of the complexity when integrating Perennial into a client application. However if you'd prefer to interact directly with markets you can look at the MultiInvoker.sol section.

Adding Application Fees

Applications utilizing Perennial's MultiInvoker.sol contract 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.

See the MultiInvoker.sol section to learn more

MultiInvoker.sol

In order to reduce the amount of transactions required to interact with the protocol & simplify the user experience, the MultiInvoker.sol was 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:

  1. approve() market #1 to transfer collateral

  2. Request latest oracle price by calling commitPrice()

  3. Make a trade on market #1 by calling update()

  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:

  1. approve() MultiInvoker to transfer collateral (only required once)

  2. Call invoke():

    1. Request oracle via commitPrice()

    2. Make trade via update()

    3. Transfer fee to UI developer

Example:

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.

Please email info@perennial.finance to be added to the repo.

Last updated