Integration guide
Smart contract
Creating a deposit
Example
DInterest pool = DInterest(0xdead);
ERC20 token = ERC20(0x6b175474e89094c44da98b954eedeac495271d0f); // DAI
uint256 depositAmount = 3 * 10 ** 18; // 3 DAI
uint256 maturationTimestamp = now + 365 days;
require(token.approve(address(pool), depositAmount));
// deposit returns the ID of the deposit
uint64 depositID = pool.deposit(depositAmount, maturationTimestamp);Withdrawing a deposit
Example
Calculate Interest Amount
Withdrawing vested MPH rewards
Example
Buying yield tokens
Example
Zero coupon bonds
Minting a zero coupon bond
Redeeming zero coupon bonds for their face value
REST API
Example response
Deployment
Last updated