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

SigmaVault (ERC-4626)

Fee-free ERC-4626 tokenized vault with a deposit cap and inflation-attack protection

ERC-4626OpenZeppelin v5Virtual sharesFoundry

What it is

SigmaVault builds on OpenZeppelin's audited ERC-4626 implementation, so it works out of the box with aggregators, routers and dashboards. Virtual shares with a decimals offset of 6 make the first-depositor inflation attack unprofitable.

A configurable deposit cap is exposed through maxDeposit and maxMint, so integrators see the limit before calling. The vault charges no fees — yield reaches holders directly when assets are transferred in — and withdrawals are never limited by the cap.

The business problem

Treasuries, yield products and savings apps need share-based pooling. Custom share accounting is a common source of bugs — the best known is the first-depositor inflation attack, where an attacker's donation rounds the next depositor's shares down to zero.

How it works

  1. 1

    A user approves the asset and deposits; the vault mints shares according to previewDeposit.

  2. 2

    A strategy or treasury sends profit to the vault, so every share becomes worth more.

  3. 3

    The user redeems shares or withdraws assets and receives their pro-rata part.

  4. 4

    The owner can raise or lower the deposit cap; lowering it only stops new deposits.

Security measures

  • Audited OpenZeppelin v5.7 ERC-4626 base; rounding always in the vault's favour
  • Inflation-attack mitigation (decimals offset 6), covered by a dedicated test
  • Fuzzed: deposit + redeem never returns more than deposited; previews match execution; cap always enforced
  • Invariants: solvency and share accounting
  • Ownable2Step; the owner can only change the cap, never move user funds

Features

  • ERC-4626 standard vault
  • Deposit cap via maxDeposit / maxMint
  • No deposit, withdrawal or performance fees
  • Pro-rata yield accrual
  • Withdrawals never capped

Typical use cases

  • DAO treasury or corporate savings vaults
  • White-label yield products on ERC-4626 infrastructure
  • Controlled launches with a staged deposit cap

Known limitations

Fee-on-transfer and rebasing assets are not supported. The vault holds assets idle; strategy integrations would add their own risks and need a separate audit.

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

Token + Vesting + Staking

A capped ERC-20 with gasless approvals, vesting schedules with cliff for team and investors, and Synthetix-style staking rewards.

ERC-20EIP-2612OpenZeppelin v5

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

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