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

MultiFungibleTokenTemplate1 contract

A MFT is uniquely identified by its ethereum address and a numeric (non-zero) ID. The ID represents a unique combination of dimensions that define the MFT. SUFI tokens are examples of MFTs where:

  • FTokens and ITokens are 2-dimensional (Currency and Expiry)
  • STokens and UTokens are 4-dimensional (Currency, Expiry, Underlying, and Strike Price)

MFT is DAO-controlled, i.e., only Lendroid’s DAOs can mint or burn a MFT.

Dao-only

FunctionParamsDescription
initializeconstructor_params,
daos[5]
Called only by the CurrencyDao when a new ERC20 Token is supported by the protocol. The CurrencyDao deploys and initializes the corresponding SUFI Tokens.
References: CurrencyDao, function
Authorizes the following DAO addresses to
  • mint and burn tokens
  • ProtocolDAO
  • CurrencyDAO
  • InterestPoolDAO
  • UnderwriterPoolDAO
  • MarketDAO
  • ShieldPayoutDAO
get_or_create_idcurrency,
expiry,
underlying,
strike_price
Can be called only by an authorized DAO. Inspired by Google App Engine’s concept of creating Datastore Entity keys from a given Key path, an ID is either retrieved or created from the given combination of inputs.

Common

FunctionParamsDescription
idcurrency,
expiry,
underlying,
strike_price
A numeric (non-zero) number which represents a unique combination of the given inputs.
is_valid_ididReturns True if a given ID is valid. False otherwise.
safeTransferFromfrom,
to,
id,
value,
data
Can be called by either the token holder or an authorized DAO. Transfers tokens with a given ID from an address to another address.
burnid,
from,
quantity
Can be called by either the token holder or an authorized DAO. Burns tokens with a given ID from an address.
balanceOfaddress,
id
Returns the balance of an address for a particular token id.
totalBalanceOfaddressReturns the combined balance of an address for all token ids.
balanceOfBatchaddressReturns the combined balance of an address for all token ids.
totalBalanceOfaddress ,
ids[5]
Returns the combined balance of an address for given 5 token ids.
Last updated on 2/14/2020
← ERC20PoolTokenTemplate1ProtocolDAO →
  • MultiFungibleTokenTemplate1 contract
    • Dao-only
    • Common
Lendroid V2 - Deleuze
Docs
OverviewSmart contractsAPIUI
Community
Project ChatTwitter
More
BlogGitHub
Facebook Open Source
Copyright © 2020 Lendroid Foundation