Opium Network
  • Opium Documentation
  • Introduction to Opium
    • What is Opium
    • FAQs
  • Restrictions
    • Restrictions
  • Security and Audits
    • Disclaimer
    • Audits
    • Bounty program
  • Governance
    • Decentralized setup
    • Governance flow
      • Proposal creating
      • Process of voting – technical description
    • $Opium governance token
  • For users
    • Opium.Finance
    • opium.exchange
  • FOR DEVELOPERS
    • Deployment Addresses
      • Opium Protocol v2
      • Opium Protocol v1
    • High-level overview
    • Opium Protocol V2
      • Core
      • Registry
      • SyntheticAggregator
      • OracleAggregator
      • OpiumProxyFactory
      • OpiumPositionToken
    • Opium Protocol V1
      • Core
      • Registry
      • TokenMinter
      • TokenSpender
      • SyntheticAggregator
      • OracleAggregator
      • Helpers
      • Interfaces
      • Common Errors
        • OracleAggregator Errors
        • Core Errors
      • oID - Oracle recipe
      • sID - Derivative recipe
      • EIP-2547: Composable Multiclass Token
    • Tutorials
      • OracleId examples
      • SyntheticId examples
      • End-to-end tutorial
    • Opium API
      • Subgraph V2
      • Subgraph V1
    • SDK
      • Opium V2 SDK
      • Opium Finance Pools SDK
      • Swap Rate SDK/API
  • Complex description
    • Glossary
    • Opium derivatives
    • Oracle and derivative recipes
    • Oracle and derivative registers
    • Opium margin
    • Opium swaps (TMtm)
    • Opium order books
Powered by GitBook
On this page

Was this helpful?

  1. Complex description

Opium order books

The Opium Network transfers the clearing, settlement and trading functions from centralized agents to the blockchain, with support of relayers. Core and sensitive functions are stored on-chain and all computational intense processes are run on the overlay of relayers but verified on-chain. Relayers are motivated by commission fees and can also carry out arbitrage functions between different orders, markets, and ecosystems.

The Opium Protocol is unbiased towards how matched orders are broadcasted to the blockchain and how order books are presented to users. What matters for the protocol is that TMtm interfaces are used and orders are matched correctly.

Orders can be broadcasted to the blockchain by anyone. Though, relayers might require the user to state ‘senderAddress’ - the only Ethereum address that is allowed to broadcast the orders to the blockchain. This prevents frontrunning and order collision and enhances the trading experience.

Relayers can set up order books that are quoted in any base margin currency and are free to benefit from arbitrage opportunities by matching orders in different order books, making a free profit whilst providing liquidity to the system. TMtm order models can be used for simple trades, but also allow users to set up complex orders.

PreviousOpium swaps (TMtm)

Last updated 5 years ago

Was this helpful?