💻
Teller Diamond
  • Teller V1.1
  • Diamond Contracts
  • Intro to Diamond Contracts
  • Teller Protocol Diamond
  • Facets (aka mini-contracts)
    • Market
    • Lending
    • Escrow
    • NFT
    • Price Aggregator
    • Settings
  • Additional Resources
    • List
    • Teller Testnet
  • Legal
    • Terms of Use
    • Privacy Policy
    • Cookies & Data Policies
  • Privileged Roles and Ownership
    • Progressive Admin Role Owner
Powered by GitBook
On this page

Was this helpful?

  1. Facets (aka mini-contracts)

Price Aggregator

Contains the Library and the Facet required to pull information on token prices in Chainlink.

  • ChainLinkAggFacet

  • ChainLinkAggLib contains functions that help:

    • isTokenSupported checks if a token is supported and has a pair aggregator

    • aggregatorFor grabs the ChainLink Aggregator address to check if a token pair is supported

PriceAggFacet

Contains helper functions that:

  • getValueFor calculates the value of a source token amount into a destination token

  • priceFor calculates a price from Compound. If price isn't found from compound, then it tries to retrieve it from ChainLink

  • isCToken checks if a token is a cToken and returns the address of the token if true

  • compoundPriceFor retrieves the price of a source token in destination token from Compound

  • chainlinkPriceFor retrieves the price of a source token in destination token from ChainLink

PriceAggLib

Implements both the valueFor and priceFor functions to retrieve both values and prices of a source token to a destination token.

PreviousNFTNextSettings

Last updated 3 years ago

Was this helpful?