An ERC-20 token with a 1% transfer fee and an ERC-4626 upgradeable vault built on top of it.
A self-contained ERC-20 with:
- 1% transfer fee: 70% to the owner, 30% permanently burned
- Fee exemptions: owner-controlled per-address exemption list and a global kill-switch (
setFees) - Rate-limited minting: max 1,000 tokens per 24-hour block window (~57,600 blocks)
spray/spraySplit: batch-distribute tokens to up to 100 recipients in a single transactionincreaseAllowance/decreaseAllowancefor safe allowance management
An upgradeable ERC-4626 vault (behind an ERC-1967 proxy) that accepts NNS as the underlying asset:
- Block-based reward accrual (
~7.716e15shares per block) claimRewards()mints accrued reward shares directly to the depositor- Owner-controlled
mint()with a rate limit of 1,000e18 shares per day
| Contract | Address |
|---|---|
Token (NNS) |
0x34ced970f392852ad92A3Cb729B7e1f7e96a4Ca2 |
Vault proxy (NSHARE) |
0xcEc82EFeB7049c0Db621221Fe2c2B8Bf9B645001 |
| Vault implementation | 0x77fd0E4Cfe6E95F0F8fc014E0a501f93DA096B08 |
Found a bug or want to request a feature? Open an issue in this repository.
Please include:
- A clear description of the problem or request
- Steps to reproduce (for bugs)
- Relevant contract addresses or transaction hashes if applicable
git clone https://github.com/emma31-dev/vault-contract.git
cd vault-contract
cp .env.example .env # fill in PRIVATE_KEY and RPC_URL
forge installjust build
# or
forge buildjust test # full suite
just test-token # Token tests only
just test-vault # Vault tests only# local anvil
just anvil # separate terminal
just deploy-local
# remote network (reads RPC_URL and PRIVATE_KEY from .env)
just deploy
# dry-run (no broadcast)
just dry-runjust fmt # format Solidity
just snapshot # gas snapshots
just clean # remove build artifactsBuilt with Foundry.