Decentralized finance Blockchain app. This Digital Bank lets you earn intrest from depositing cryptocurrency.
DaiToken - Mock okens that investors can depoit into bank to earn intrest. DappToken - Mock token that is paid out to investor by the bank as intrest for staking Mock Dai tokens. TokenFarm - This Digital Bank that allow investors to staking Mock Dai token, and in return for pay staked investors Mock Dapp Token
- node v12.18.3
- MetaMask (crypto wallet) - https://metamask.io/
- truffle v5.1.39 (used to compile, test, debug and deploy smart contracts) - https://www.trufflesuite.com/docs/truffle/overview
- web3 v1.2.11 (Javascript API that interacts with a local or remote ethereum node using HTTP) - https://web3js.readthedocs.io/en/v1.3.4/
- Ganache (local development blockchain) https://www.trufflesuite.com/ganache
- ReactJS v16.8.4 (clients side app)
"npm run block:test"
- npm install
- Install Ganache and start it up locally(this is our local blockchain network)
- Connect MetaMask to local blockchain network and import private key of 2nd address in Ganache(note: the 1st address is used by Token Farm, 2nd address used by investor)
- Run smart contract deployment script "npm run block:deploy" (note: whenever a change is made to smart contract make sure to compile by running "npm run block:compile")
- Start React app "npm run start"
- Go to localhost:3000/ in the browser
- Stake, unstake and earn interest!!
After smart contracts are deployed to Blockchain, we transferr 1 million Dapp tokens to the Token Farm(Digital Bank) and also transefer 100 Dai tokens to the investors wallet.
ThisDecentralized finance Blockchain app allows investors to:
- Stake Dia tokens
- Unstake Dia tokens
- Earn intrests from Token Farm in the form of Dapp tokens
Investor can choose how many Dai token that want to stake with the Token Farm(Digital Bank)
Once smart contract have been deployed to blockchain and React app is running locally run issue token script "npm run block:issue-token".
- Unstake total amount:
- Unstake partial ammount: