Skip to content

StakingDapp is a fullstack DeFi protocol built with Solidity, NextJS, NodeJS, Ethers, and Web3. The contract was deployed using Remix IDE. It allows users to connect their MetaMask wallet, stake their SepoliaETH, and unstake their tokens at a desired interest rate.

Notifications You must be signed in to change notification settings

hadesbaker/StakingDapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo

StakingDapp

License

StakingDapp is a fullstack DeFi protocol built with Solidity, NextJS, NodeJS, Ethers, and Web3. The contract was deployed using Remix IDE. It allows users to connect their MetaMask wallet, stake their SepoliaETH, and unstake their tokens at a desired interest rate.

Table of Contents

Prerequisites

Before you begin, ensure you have met the following requirements:

  • NodeJS
  • Metamask or another Ethereum wallet for interacting with your contracts

Getting Started

Installation

  1. Clone the project repository:
git clone https://github.com/hadesbaker/StakingDapp.git
cd StakingDapp
  1. Install the required frontend dependencies:
cd frontend
npm install
# or
yarn install
  1. Install the required backend dependencies:
cd ..
cd backend
npm install
# or
yarn install

Usage

Log into RemixIDE and deploy the Staking.sol contract. Copy the ABI and contract address and replace the values within frontend/contracts/index.js.

In the backend folder, create a file called .env. Within the .env file, add a MORALIS_KEY variable with the moralis api key you can get from here.

i.e. MORALIS_KEY=dwindwdiwndiwniwndiwdinwdinwdidindiwn

In a seperate terminal window, run the backend node server:

cd backend
node index.js

In another terminal window, run the development server:

cd frontend
npm run dev

Finally, open https://localhost:3000 with your browser to see the result.

Make sure to properly use the protocol, your metamask wallet is switched to the Sepolia network and the account you connect has SepoliaETH available.

Deployment

Before deploying your contracts to the Ethereum mainnet, ensure you have:

  1. Sufficient ETH for gas fees in your deployment account
  2. Completed a security audit of your contracts
  3. Considered legal and regulatory compliance

To deploy your contracts, return to Remix and change the environment to Injected Provider - MetaMask. Afterwards change the network in your MetaMask browser extension to Ethereum Mainnet and hit deploy.

Copy the new contract address and ABI, paste them into frontend/contracts/index.js and then refresh the page.

About

StakingDapp is a fullstack DeFi protocol built with Solidity, NextJS, NodeJS, Ethers, and Web3. The contract was deployed using Remix IDE. It allows users to connect their MetaMask wallet, stake their SepoliaETH, and unstake their tokens at a desired interest rate.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published