Lendroid V2 - Deleuze

Lendroid V2 - Deleuze

  • Docs
  • API
  • UI

›Deep dive

Overview

  • Overview
  • Terminology
  • V2 Contracts
  • V2 Players

Deep dive

  • Deep Dive
  • ERC20Template1
  • LERC20Template1
  • ERC20PoolTokenTemplate1
  • MultiFungibleTokenTemplate1
  • ProtocolDAO
  • PoolNameRegistryTemplate1
  • CurrencyDAO
  • ERC20TokenPoolTemplate1
  • InterestPoolDAO
  • InterestPoolTemplate1
  • UnderwriterPoolDAO
  • UnderwriterPoolTemplate1
  • MarketDAO
  • PositionRegistryTemplate1
  • SimplePriceOracleTemplate1
  • SimpleCollateralAuctionGraph1
  • ShieldPayoutDAO
  • Sequence Diagrams

Examples

  • Library documentation
  • Wallet documentation

Deep Dive

SimplePriceOracleTemplate1 contract

This contract implements the SimplePriceOracle interface.

The system can enable support for only one price oracle per currency-underlying pair.
References:

  • ProtocolDao
  • MarketDao

Note: The price obtained from the oracle is expected to be the underlying price per currency. For example, to support DAI-ETH pair, an oracle built with this interface can use MakerDao’s Medianizer as its price feed to return ETH price per DAI.

Developers can submit their own price oracle contracts as long as the contracts contain the following functions:

FunctionParamsDescriptionReturn type
get_price-Update the current price of underlying per currency from the price feed. Return the updated price.uint256
owner-Get the owner of the oracle contract.address
currency-Get the currency token address.address
underlying-Get the underlying token address.address
feed_address-Get the price feed address.address
current_price-Return the last updated price.address
Last updated on 2/14/2020
← PositionRegistryTemplate1SimpleCollateralAuctionGraph1 →
  • SimplePriceOracleTemplate1 contract
Lendroid V2 - Deleuze
Docs
OverviewSmart contractsAPIUI
Community
Project ChatTwitter
More
BlogGitHub
Facebook Open Source
Copyright © 2020 Lendroid Foundation