Create a yearn finance yield farm smart contract

As decentralized finance evolves projects are coming out with new ways for users to supply and borrow money. The yearn finance project attracted a lot of attention because it allows users to make deposits and automatically moves funds to various liquidity pools.

Yearn aggregates yield from CompoundFulcrumAave, and dYdX then moves deposits into the pool with the highest available rates. This movement of funds occurs when new deposits or withdrawals occur in the contract.

When using yearn.finance the funds that you deposit are part of the total amount of money moving from pool to pool. Each of these pools have caps on the maximum amount that can be invested to achieve a specific rate. In some instances your deposits might perform better if there is less deposits in the contract.

Create a yearn.finance clone

The purpose of the post is to help you understand how year.finance works and provide you with instructions on creating your own defi lending farm that will obtain the highest yield in the market place. The article below, written by Andre Cronje the creator of yearn.finance, explains how to create a clone of the yearn finance application.

https://andrecronje.medium.com/how-to-deploy-your-own-iearn-finance-5f90095fa04e

Github Repo

To bypass the article you can go directly to the github repository and fork or clone the two repositories listed below;

The first repo link to iearn-finance is the code to the web interface which is built in React. You will need to have npm and nodejs installed.

The second repo is the itoken repo. If you are only interested in investing your DAI download the yDAI contract. You can use remix to build and deploy this contract.

If you need help with Solidity click this link for guides on how to write smart contracts.

Click here for more information about how to use the Ethereum test network and how to obtain test ETH.

Follow the instructions in the article to deploy your own yield farming program.

Next – How to create an NFT ERC721 Solidity smart contract

-->

Leave a Reply