LogoLogo
WebsiteGithubCommunity Docs
  • Developer Docs
  • Smart Contracts
    • Bond System
      • Auctioneer
        • Auctioneer Interfaces
        • Sequential Dutch Auctioneer (SDA)
          • Auction Pricing
          • Fixed-Term SDA
          • Fixed-Expiry SDA
        • Fixed Price Auctioneer (FPA)
          • Fixed-Term FPA
          • Fixed-Expiry FPA
        • Oracle-based Auctioneers
          • Oracle Interface
        • Oracle Fixed Discount Auctioneer (OFDA)
          • Fixed-Term OFDA
          • Fixed-Expiry OFDA
        • Oracle Sequential Dutch Auctioneer (OSDA)
          • Fixed-Term OSDA
          • Fixed-Expiry OSDA
      • Teller
        • Teller Interfaces
        • Base Teller
        • Fixed-Expiry Teller
        • Fixed-Term Teller
      • Callback
        • Callback Interface
        • Base Callback
        • Sample Callback Contract
      • Aggregator
        • Aggregator Interface
        • Aggregator Contract
      • Intended User Actions
      • Limit Orders
    • Option System
      • Fixed Strike oTokens
      • Fixed Strike Option Teller
      • Options Liquidity Mining (OLM)
        • Manual Strike OLM
        • Oracle Strike OLM
      • OLM Factories
  • Developers
    • Subgraph
    • Market Calculations
    • Purchases & Redemptions
    • User Balances
    • Options Library
      • Helper Functions
      • Types
  • References
    • Technical Resources
      • Audits
    • Community Resources
    • Brand Assets
    • Contact Us
Powered by GitBook
On this page
  • IBondOracle
  • Methods
  1. Smart Contracts
  2. Bond System
  3. Auctioneer
  4. Oracle-based Auctioneers

Oracle Interface

IBondOracle

Methods

currentPrice

function currentPrice(uint256 id_) external view returns (uint256)

Returns the price as a ratio of quote tokens to base tokens for the provided market id scaled by 10^decimals

Parameters

Name
Type
Description

id_

uint256

undefined

Returns

Name
Type
Description

_0

uint256

undefined

currentPrice

function currentPrice(contract ERC20 quoteToken_, contract ERC20 payoutToken_) external view returns (uint256)

Returns the price as a ratio of quote tokens to base tokens for the provided token pair scaled by 10^decimals

Parameters

Name
Type
Description

quoteToken_

contract ERC20

undefined

payoutToken_

contract ERC20

undefined

Returns

Name
Type
Description

_0

uint256

undefined

decimals

function decimals(uint256 id_) external view returns (uint8)

Returns the number of configured decimals of the price value for the provided market id

Parameters

Name
Type
Description

id_

uint256

undefined

Returns

Name
Type
Description

_0

uint8

undefined

decimals

function decimals(contract ERC20 quoteToken_, contract ERC20 payoutToken_) external view returns (uint8)

Returns the number of configured decimals of the price value for the provided token pair

Parameters

Name
Type
Description

quoteToken_

contract ERC20

undefined

payoutToken_

contract ERC20

undefined

Returns

Name
Type
Description

_0

uint8

undefined

registerMarket

function registerMarket(uint256 id_, contract ERC20 quoteToken_, contract ERC20 payoutToken_) external nonpayable

Register a new bond market on the oracle

Parameters

Name
Type
Description

id_

uint256

undefined

quoteToken_

contract ERC20

undefined

payoutToken_

contract ERC20

undefined

PreviousOracle-based AuctioneersNextOracle Fixed Discount Auctioneer (OFDA)