Solidity lab demos

Harsha Nandhan Reddy Gajulapalli · read-only overviews · Hardhat local evidence

ERC-20 Staking Vault

Stake STK, earn more STK at an owner-set per-second rate. ReentrancyGuard + CEI pattern.

Lab contract 6 Hardhat tests passing Solidity 0.8.20
Open demo page GitHub

Dividend Token

Mintable ERC-20 where holder dividends and staking compete for the same balance. Explicit accounting lab.

Lab contract 33 Hardhat tests passing Solidity 0.8.24
Open demo page GitHub

1) ERC-20 Staking Vault — quick look

Owner mints STK. Users stake into StakingVault, withdraw principal, and claim accrued rewards. Reward rate is owner-controlled.

Full staking vault demo →

2) Dividend Token — quick look

Send ETH to mint (1 ETH = 1000 DTK). Owner can push ETH via distributeDividends; holders pull with withdrawDividends. Staked tokens stop earning holder dividends until unstaked — that tradeoff is the point of the lab.

Full dividend token demo →