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

PositionRegistryTemplate1 contract

This contract records all loans created in the system. Borrowers interact with this contract to

  • Create a new loan
  • Partially / wholly repay their loan
  • Withdraw remaining collateral from liquidated loans
  • View active, closed, and liquidated loans

Dao-only

FunctionParamsDescription
initializeLSTcontract,
marketDao
Called only by the ProtocolDao, but initiated by the Deployer. Stores the following information
  • LST Token contract address
  • MarketDao address

Common

FunctionParamsDescription
avail_loancurrency,
expiry,
underlying,
strike_price,
X
The caller of this function is typically the borrower, who wishes to borrow X amount of the currency as loan, which she hopes to repay on or before the given expiry. In her balance, the borrower should have:
  • X amount of ITokens for the given currency and expiry.
  • X amount of STokens for the given currency, expiry, underlying, and strike_price.
  • Xstrike_price amount of FTokens for the given underlying and expiry.
Note: The tokens above are stored in the MarketDao until whichever occurs earlier:
  • Borrower repays the loan.
  • Loan market expires.
repay_loanid,
Y
The caller of this function is typically the borrower, who has already borrowed a loan and now wishes to repay Y amount of the loan. Note: The caller will need to authorize the CurrencyDAO to transfer Y amount of currency.
close_liquidated_loanidThis function can be called by anyone. In this function, any remaining collateral after liquidation of the loan with the given id is sent to its borrower. Note: The loan is liquidated during the auction period after the expiry of the corresponding loan market. Since the auction is active until either all FUnderlying has been sold or the required currency amount has been raised, this function will work only after the auction is closed, aka, the corresponding loan market has been settled.

Escape-hatch

FunctionParamsDescription
pause-Pauses all operations of the contract.
unpause-Resumes all operations of the contract.
Last updated on 2/14/2020
← MarketDAOSimplePriceOracleTemplate1 →
  • PositionRegistryTemplate1 contract
    • Dao-only
    • Common
    • Escape-hatch
Lendroid V2 - Deleuze
Docs
OverviewSmart contractsAPIUI
Community
Project ChatTwitter
More
BlogGitHub
Facebook Open Source
Copyright © 2020 Lendroid Foundation