Skip to content
Showcase projectBlockchain & Web3
  • 223 tests
  • 100% coverage
  • Slither-analysed

Token + Vesting + Staking

Token-launch toolkit: capped ERC-20, cliff + linear vesting and staking rewards

ERC-20EIP-2612OpenZeppelin v5Foundry

What it is

SigmaToken is an ERC-20 with a hard cap, EIP-2612 permit (gasless approvals), burnability and two-step ownership — the owner can mint only up to the cap. TokenVesting holds tokens for many beneficiaries; each schedule has a start, a cliff, a duration and a revocable flag, and is fully funded when it is created.

StakingRewards lets users stake one token and earn another (or the same) at a fixed rate over a reward period. It uses O(1) reward-per-token accounting, so gas costs don't grow with the number of stakers, and rewards are pulled into the contract before they are promised.

The business problem

A token launch needs supply discipline, credible lock-ups for team and investors, and fair holder incentives. Custom, unaudited implementations of these patterns are a common source of exploits — broken reward maths, unfunded reward promises and admin backdoors.

How it works

  1. 1

    SigmaToken is deployed with a hard cap; the owner can mint only up to it.

  2. 2

    The owner creates vesting schedules (start, cliff, duration, amount, revocable). Tokens are pulled into the contract immediately.

  3. 3

    Nothing vests before start + cliff; afterwards tokens vest linearly until the end of the duration. Beneficiaries call release() at any time.

  4. 4

    For revocable schedules, revoke() keeps the vested part claimable and returns only the unvested remainder.

  5. 5

    The owner funds a staking reward period with notifyRewardAmount(); stakers earn pro rata and can stake, withdraw, claim or exit at any time.

Security measures

  • Hard cap enforced in _update, so it applies to every mint path
  • Two-step ownership on all three contracts
  • Vesting fully collateralised; invariant balance == allocated − released checked by fuzzing
  • Fair revocation: vested tokens can never be clawed back
  • Rewards pulled on notify — no unfunded promises; solvency invariants
  • recoverERC20 can never withdraw the staking or reward token
  • nonReentrant on value-moving functions, SafeERC20 throughout

Features

  • Capped ERC-20 with EIP-2612 permit
  • Cliff + linear vesting for many beneficiaries
  • Per-schedule revocable flag
  • Synthetix-style staking rewards with O(1) maths
  • Reward-period rollover

Typical use cases

  • Token generation events for DAOs, games and loyalty programmes
  • Transparent team, advisor and investor vesting
  • Staking-reward and liquidity campaigns

Known limitations

Reward duration can only be changed between reward periods.

Other showcase contracts

Showcase

Milestone Escrow

The client locks the full budget up front, split into milestones. Funds move only on release, arbiter decision or cancellation.

Solidity 0.8.28OpenZeppelin v5ETH / ERC-20

223 tests · 100% coverage · Slither‑analysed

Showcase

SigmaNFT Collection

A fair NFT launch: allowlist and public phases, per-wallet limits, immutable max supply, ERC-2981 royalties and a delayed reveal.

ERC-721ERC-2981Merkle proofs

223 tests · 100% coverage · Slither‑analysed

Showcase

Gold-Backed Token (RWA)

Backing becomes a precondition of minting: tokens can only be minted if the reported gold reserve covers the new total supply.

ERC-20AccessControlProof of reserve

223 tests · 100% coverage · Slither‑analysed

Standards: Solidity 0.8.x, OpenZeppelin, Foundry tests with fuzzing, Slither static analysis, verified source. 223 tests · 100% coverage · Slither-analysed.

Have a project in mind?

Tell us what you're building. You get an honest assessment, a clear scope and a fixed-price or milestone proposal, usually within a few working days.

Prefer to write first? Write to us