JefferyAkorful.sol

Work / LockVault

LockVault

Time-locked ERC-20 staking with soulbound membership NFTs.

  • Sepolia testnet
  • DeFi
  • Security
  • Solidity
  • Foundry
  • Chainlink

Deployed on Sepolia.

# LockVault// the record

Time-locked ERC‑20 staking. Users lock whitelisted tokens for 30, 90 or 180 days, earn VaultToken rewards by lock length and volume, and large stakers receive soulbound Bronze, Silver or Gold membership NFTs with permanent reward multipliers.

  1. 01

    Ownable2Step for admin roles, so ownership can't be sent to a dead address in one transaction.

  2. 02

    Stakes in a per-user mapping with an active-stake cap, not an ever-growing array.

  3. 03

    Per-second rewards with staged Math.mulDiv for precision and overflow safety.

  4. 04

    Emergency withdraw returns principal and forfeits 50% of accrued rewards to the treasury.

// what the contract refuses
  • StalePrice(address token)The oracle price is older than the staleness threshold.LockVault.sol:269
  • MaxStakesReached()A user already has the maximum number of active stakes.LockVault.sol:138