MultiTranche

This is a type of Agreement designed to perform a Nivaura Demo Phase II https://docs.google.com/document/d/1wwEOXKa0cmmS0jM0p9q9rkltvEPmSuK3PuwPK-tapcs/edit

deadline

uint256 deadline

WUSDC

contract IERC20Mintable WUSDC

compounds

mapping(address => address) compounds

constructor

constructor(address _parser, address _ownerAddr, address _dslContext) public

Sets parser address, creates new Context instance, and setups Context

_setBaseRecords

function _setBaseRecords() internal

Uploads pre-defined records to Governance contract directly

_setDefaultVariables

function _setDefaultVariables() internal

_setParameters

function _setParameters(uint256 _recordId, string _record, string _condition) internal

Uploads pre-defined records to MultiTranche contract directly. Uses a simple condition string bool true. Records still have to be parsed using a preprocessor before execution. Such record becomes non-upgradable. Check isUpgradableRecord modifier

Parameters

Name Type Description
_recordId uint256 is the record ID
_record string is a string of the main record for execution
_condition string is a string of the condition that will be checked before record execution

_setEnterRecord

function _setEnterRecord() internal

If DEPOSITS_DEADLINE hasn't passed, then to enter the MultiTranche contract: 1. Understand how much USDC a user wants to deposit 2. Transfer USDC from the user to the MultiTranche 3. Mint WUSDC to the user's wallet in exchange for his/her USDC

_setDepositRecord

function _setDepositRecord() internal

If DEPOSITS_DEADLINE is passed to deposit USDC to MultiTranche: 1. Deposit all collected on MultiTranche USDC to Compound. As a result MultiTranche receives cUSDC tokens from Compound 2. Remember the deposit time in DEPOSIT_TIME variable

_setWithdrawRecord

function _setWithdrawRecord() internal

If USDC lock time is passed: 1. Understand how much WUSDC a user wants to withdraw 2. Withdraw requested amount of USDC from Compound 3. Burn user's WUSDC 4. Send USDC to the user