Skip to content

yieldprotocol/fyDai

Repository files navigation

YieldToken

YieldToken is an implementation of zero-coupon Dai bonds. It is inspired by the paper "The Yield Protocol: On-Chain Lending With Interest Rate Discovery" by Dan Robinson and Allan Niemerg.

These smart contracts have been deployed to Kovan and the Mainnet, and a web frontend is deployed at https://app.yield.is

Detailed documentation can be found in the Yield docs.

Warning

This code is provided as-is, with no guarantees of any kind.

Install

Pre Requisites

Before running any command, make sure to install dependencies:

$ yarn

Lint Solidity

Lint the Solidity code:

$ yarn lint:sol

Lint TypeScript

Lint the TypeScript code:

$ yarn lint:ts

Coverage

Generate the code coverage report:

$ yarn coverage

Test

Compile and test the smart contracts with Buidler and Mocha:

$ yarn test

Fuzz

You will need to install echidna separately, and then run:

$ echidna-test . --contract WhitepaperInvariant --config contracts/invariants/config.yaml

Start a local blockchain

We use ganache as a local blockchain:

$ yarn ganache

Start a local copy of the mainnet blockchain