Sturdy is a DeFi lending protocol. Sturdy enables 'lenders' to earn yield on their stablecoins and 'borrowers' to take out interest-free stablecoin loans against their collateral. This interest-free mechanic is made possible through rehypothecation: when a borrower deposits their collateral (e.g. FTM), it is staked (e.g. turned into yvWFTM via Yearn). Over time, yvWFTM will grow in value relative to FTM due to Yearn's mechanics; we harvest this yield, convert it to stablecoins, and distribute it to stablecoin lenders.
- EnvironmentFile (.env)
ALCHEMY_KEY="xxx"
- Compile
npm run compile
- Run the hardhat node on localhost.
FORK=main yarn hardhat node
- Compile
FORK=main yarn hardhat compile
- Next run the following task to deploy all smart contracts
yarn sturdy:evm:fork:mainnet:migration
- For test, run the following task to have a test of sample contract on the localhost.
yarn test
- To get test tokens in your local forked wallet, open the console by running below command, and run this script in console.
FORK=main yarn hardhat console --network forked_main