Building and Deploying a DeFi Staking Platform with Solidity, Foundry and Next.js

https://hackernoon.imgix.net/images/KupH4vwOrtTTP23ybw9UyZ5YM2Z2-5m03bse.png

As part of Week 4 of my EtherAuthority Web3 Internship, I completed a full-stack DeFi Staking Platform that allows users to stake ERC-20 STK tokens and earn RWD reward tokens based on the time their tokens remain staked.

The project combines Solidity smart contracts, Foundry-based testing and deployment, OpenZeppelin contracts, a Next.js frontend, TypeScript, ethers.js and MetaMask wallet integration.

The final smart contracts are deployed on the Ethereum Sepolia Testnet, and the frontend is deployed using Vercel.

Project Objective

The objective of this project was to build a working staking dApp from the smart-contract layer to the user interface.

The platform implements:

  • An ERC-20 staking token called STK
  • An ERC-20 reward token called RWD
  • A staking contract that holds users' staked STK
  • Time-based reward calculation
  • STK approval before staking
  • Staking
  • Withdrawal of staked tokens
  • Reward claiming
  • Configurable APR for the contract owner
  • Pause and unpause functionality
  • MetaMask wallet connection
  • ...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more

https://cdn.mos.cms.futurecdn.net/v7n9VxJpmjj3oKVntQCbtb-2000-80.jpg

Nacon announces the Revolution Pro X – Special Edition, a new Hell Is Us-inspired Xbox controller offering 'joystick tension adjustment, Hall Effect sensors, and micro-switch combine technologies'

* Nacon reveals its officially licensed Xbox controller, the Revolution Pro X – Special Edition * The controller design is inspired by Hell Is Us and is now available for £109.99 / $129.90 / €129.99 * It combines mechanical fine-tuning for all playstyles and tournament-grade precision Nacon has announced the Revolution Pro X