Ultimate magazine theme for WordPress.

smartcoding51/defi-yield-farming: A DeFi app that provides staking and farming functionality and can be deployed to a website

This truffle project is focused on developing a DeFi app that implements the concept of the yield farming/liquidity mining based Dai token.

This repository presents practices related to:

  • Set up a blockchain.
  • Develop Ethereum smart contracts.
  • Write tests for the developed Ethereum smart contracts.
  • Develop a client-side website so that users can actually use this application.

All:

  • Add OpenZeppelin contracts to mitigate risk.
  • Develop a new function to keep track of rewards.
  • Implement a method to automatically withdraw the rewards when certain conditions are met (in the current version it is triggered manually).

theory

What is yield farming?

At its core, yield farming is a process that allows cryptocurrency holders to freeze their holdings, which in turn earns them rewards.

Shortly:

  • Yield farming allows you to lock up funds while earning rewards.
  • This is the lending of cryptos via DeFi protocols to earn fixed or variable interest.
  • The returns can be far greater than traditional investing, but with higher returns comes higher risk, especially in such a volatile market.

application software architecture

Here is the application software architecture workflow:

  • Users use an internet browser to connect a frontend application written in HTML, CSS and JavaScript.
  • Instead of accessing a back-end server, the website then communicates directly with the blockchain, which stores all the code and data for the application.
  • The DeFi application codes are contained in smart contracts written in a solid programming language very similar to JavaScript. These smart contracts are immutable, which means the code cannot be changed and all data is stored in the public ledger, which is also immutable. And every time new data is added to the blockchain, it is permanent and publicly verifiable.

installation

Set up

  • Node.js

    sudo curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash nvm install 12.18.3 node -v

  • truffle

    sudo npm install -g [email protected] –unsafe-perm=true

  • ganache The installation instructions can be found here.

  • MetaMask The installation instructions can be found here.

commands

  • Be sure to install Node.js packages

  • Deploy smart contracts on the Ethereum blockchain

  • Deploy and run the front-end application

  • Run the scripts to issue tokens

    truffle exec scripts/issue-tokens.js

author

Kei Nakano

license

This system is available under the MIT License. See the LICENSE file for more information.

Learn Crypto Trading, Yield Farms, Income strategies and more at CrytoAnswers
https://nov.link/cryptoanswers

Comments are closed.

%d bloggers like this: