The Standard Developer Documentation
  • Introduction
  • Protocol Modules
    • πŸ§‘β€πŸ’»Participants
    • πŸ—οΈSmart Vault
    • πŸ‡ΊπŸ‡³DAO Vault
    • 🎯Core
    • πŸ“”Strategies
    • πŸ’ΆCollateral Manager
    • πŸ•Fee Manager
    • ☯️Liquidation Manager
    • 🈸Application Manager
  • Protocol Elements
    • πŸ§™β€β™€οΈOracles
    • πŸ’°Treasury
    • πŸŽ†Proxies
    • πŸ’ Stable Coin Generator
  • Token Contracts
    • Token Overview
    • The Standard Token (TST)
    • The Stable Euro (S-EUR)
  • Governance
    • Governance Overview
    • Development Roadmap
  • Custodian Framework
    • πŸ“¦Custodians
    • πŸ—ΊοΈCustodian Framework
    • Audit
  • Guides
    • Creating your Smart Vault
    • Generating S-EUR
    • Staking TST
Powered by GitBook
On this page
  1. Protocol Elements

Oracles

PreviousApplication ManagerNextTreasury

Last updated 3 years ago

Please read about oracles here

The Standard Oracle Implementation

The Standard will use the Uniswap v3 TWAP oracles as this has been proven to be a solid source of data for price discovery.

As Uniswap offers good on-chain data the standard protocol also will need the data from from off-chain sources for gold/silver/oil or any asset that the DAO seems worthy to be a good hedge against inflation. For this reason we also use the data from

Potentially tokenised indices can be used as collateral as well.

General Oracle Implementation

TWAP

The time-weighted price algorithm (TWAP) is quite simple: the price P multiplied by how long it lasts T is continuously added to a cumulative value C.

For example,

  • when timestamp = 0 & ETH price = 3000: C = 0 (initialisation)

  • when timestamp = 200 & ETH price = 3200: C = 0 + 3000 * (200 β€” 0) = 600,000

  • when timestamp = 250 & ETH price = 3150: C = 600,000 + 3200 * (250 β€” 200) = 760,000

The TWAP between time (0, 250) is (760,000 β€” 0) / (250 β€” 0) = 3,040, which satisfies that price 3000 lasts for 4/5 of the time and price 3200 lasts for 1/5: 3000 * 4 / 5 + 3200 / 5 = 3,040.

πŸ§™β€β™€οΈ
https://ethereum.org/en/developers/docs/oracles/
https://data.chain.link/
Oracle structure