LogoLogo
HomeApp
  • 👋Introduction to Perennial
  • 🌸Perennial Petals
    • 💰Trading Competition - Flight School
  • ⛓️Perennial Chain
    • 🌺Mainnet
    • 🌼Testnet
  • 📚Guides
    • Bridging to Perennial
    • Create an Account
    • Place a limit order
    • Bridging from Perennial
  • 🏗️Protocol
    • 🏛️Markets
      • 📝Market Design
      • 🔮Oracles & Settlement
      • 📈Payoff & Positions
      • 💰Trading Fees & Price Impact
      • ⚖️Funding & Interest Rate
      • 🌊Leverage & Liquidations
      • 👩‍🌾Liquidity Provisioning
      • 📝Advanced Order Types
      • 💵Collateral
    • 📬Intents
      • 📑Mechanism
      • 🔗Offchain Infrastructure
      • 🏦Intent Solvers (Makers)
      • 📑Specification
    • 🛄Collateral Accounts
    • 🏦Vaults
    • 💽Codebase
    • 🛑Protocol Risks
  • 🏗️Building on Perennial
    • Why Perennial?
    • Before Integrating
    • Frontend & Client Integrations
    • Smart Contract Integrations
    • Offchain Infrastructure
    • Guides
      • ✏️Creating a New Market
      • 👂Subscribe to Market Updates
  • ⁉️Frequently Asked Questions
    • Perennial
    • Trading
    • Markets
    • Fees
  • 📡Protocol Info
    • Markets & Vaults
    • Protocol Contracts
  • 🔐Security
    • Audits & Bug Bounty
  • 🎉Perp.Fun
    • Introduction
    • Autopilot
      • Weekly Autopilot Rewards
Powered by GitBook
On this page
  • Market Orders
  • Key Concepts
  • Trigger Orders
  • Key Concepts
  1. Protocol
  2. Intents

Offchain Infrastructure

PreviousMechanismNextIntent Solvers (Makers)

Last updated 6 months ago

Perennial's Intent specification focuses on the onchain mechanism that make intents possible. Interfaces, Makers and/or Infrastructure provides are welcome to implement their own offchain system that efficiently handles & distributes Perennial's Intents. However when designing the Intent system, an example Solver API used:

Market Orders

The above diagram describes a centralized Solver API for:

  1. Accepting, aggregating & distributing information about the pricing of Maker liquidity

  2. Accepting a signed Intent from a Taker & returning it to the originating Maker

  3. The execution of the Intent order by the Maker

Key Concepts

Continuous Pricing

Makers within the system continuously post arrays of order sizes and their corresponding prices to the Solver API. The quotes they post are valid for 30 seconds. These prices include all fees accrued by the Maker when executing this order to ensure the user gets guaranteed execution at the quoted price.

These prices are then aggregated by the Solver API and pushed out to all subscribed Takers. The Taker will input the size of their transaction, the price for that order size will be shown, they then sign and return the order to Solver API which relays it to the maker for execution.

Fill Rate

Not pictured in the diagram, but crucial for the operation of the Solver API is a "fill rate". Where Makers must maintain a minimum fill rate (filled intents / signed intents returned) when participating in the Solving system. This grants some flexibility in cases of extreme price movement, while ensuring a good trading experience to the Takers.

Trigger Orders

The above diagram describes a flow for a Solver API to handle trigger Intents:

  1. Taker publishes signed intent with direction, size, and desired execution price to the Solver API

  2. Makers poll the Solver API periodically, and when they find an intent with a desirable price, they execute the transaction.

Key Concepts

Competitive Fills

In order to ensure reasonable execution for Takers, its key that the trigger orders are shared amongst all Makers within the Solving system. In a scenario where there is a single Maker in the Solving system, a Takers intent may be neglected for the benefit of the Maker.

Culling Invalid Orders

Periodically the Solver API should review the submitted trigger orders for validity. This includes things like the expiry of the order but also the collateral balance of the Taker which has submitted the Intent order.

🏗️
📬
🔗
An example offchain flow for Intents describing market orders
An example offchain flow for Intents describing trigger orders