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
  • Domain logic
  • Actors
  • Data / control flow
  • Restrictions

Was this helpful?

  1. FOR DEVELOPERS
  2. Opium Protocol V2

OpiumPositionToken

Domain logic

It is an erc20-permit contract representing either a LONG or SHORT position associated with a given derivative. It serves the purpose of bookkeeping for a position type of a derivative as much as that of a tokenized asset that can be composed with other financial primitives.

Actors

Users and contracts are expected to be the holders of Opium position tokens. The OpiumPositionToken contract itself also interacts with other contracts within the Opium Protocol such as Core and, especially, the OpiumProxyFactory.

Data / control flow

The stateful operations are expected to have a one way data and control flow where the OpiumPositionToken contract is always the receiver and it is controlled by the OpiumProxyFactory. The OpiumPositionToken can interact with other contracts if, for instance, the recipient of a “mint” operation triggered by the OpiumProxyFactory is itself a contract.

Restrictions

The accessibility of stateful functions of the OpiumPositionToken is restricted to the OpiumProxyFactory.

PreviousOpiumProxyFactoryNextOpium Protocol V1

Last updated 3 years ago

Was this helpful?