Illuvium Staking V3 lets you stake ILV or ILV/WETH LP on Base and earn rewards. It’s upgradeable, battle‑tested, and simple. It also includes a StakingVaultFactory to deploy vault proxies consistently.
- Stake ILV or LP: Two dedicated vaults
- Flexible locks: Choose a lock duration within configured bounds
- Upgrade friendly: UUPS proxies for future upgrades
- StakingVaultFactory (deprecated): Deploy vault proxies with a consistent setup (not used on mainnet/testnet)
- Automated distributions: Rewards flow via a distributor contract
- Safety first: Reentrancy guards, SafeERC20, and role‑based access
src/
├── Constants.sol
├── L2RevenueDistributorV3.sol
├── StakingVault.sol # Vault implementation (UUPS)
├── StakingVaultFactory.sol # Factory for vault proxies (deprecated; not used on mainnet/testnet)
└── interfaces/
├── IAerodromeFactory.sol
├── IAerodromePair.sol
├── IAerodromeRouter.sol
└── IStakingVaultMinimal.sol # Minimal vault interface for integrations
script/
├── Deployer.s.sol # Deploys impls + proxies, wires pools
└── HelperConfig.s.sol # Network config, env overrides, mocks
test/
├── Base.t.sol
├── L2RevenueDistributorV3.t.sol
├── StakingVault.t.sol
├── StakingVaultFactory.t.sol
├── invariants/
│ ├── Properties.sol
│ ├── Setup.sol
│ ├── SystemCryticTester.sol
│ ├── SystemCryticToFoundry.t.sol
│ ├── TargetFunctions.sol
│ └── actors/
│ └── VaultUser.sol
└── utils/
├── MockAerodrome.sol
└── MockERC20.sol
git clone https://github.com/illuvium/staking-contracts-v3.git
cd staking-contracts-v3
forge install
forge build
forge test -vvvanvil --fork-url $BASE_RPC_URL
forge script script/Deployer.s.sol \
--rpc-url http://localhost:8545 \
--sig "run(uint8)" 0 \
--broadcastMost flows are covered with straightforward unit tests. Run everything or target a file/test:
forge test -vvv
forge test --match-path test/StakingVault.t.sol -vvv
forge test --match-test testFuzz_Deposit_Succeeds_WhenValidParams -vvvInvariants (Chimera-style) and property testing:
# All invariants
forge test --match-path test/invariants/** -vvv
# Deeper invariant exploration
forge test --match-path test/invariants/** --invariant-depth 128 -vvv
# (Optional) Echidna
echidna . --config echidna.yamlL2VotingIlluvium exposes each wallet's raw eligible ILV on Base for
Snapshot council elections. It combines ILV deposited in the V3 ILV vault with
the ILV share represented by LP tokens deposited in the V3 LP vault. It does
not count wallet tokens, pending rewards, WETH exposure, lock duration, or
reward boosts.
The reader is immutable and has no owner, roles, proxy, or setters. Snapshot
uses its balanceOf(address) result with the erc20-balance-of-cv strategy,
which applies the square root off-chain.
Set a few env vars, load your Foundry keystore, then run the deploy script against your network.
# Import or create a Foundry keystore entry (only once)
cast wallet import my-deployer --interactive
cast wallet list
# Export deployment context
export ADMIN=0x...
export OPERATOR=0x...
export L1_POOL_ADMIN=0x...
export DEPLOYER_ACCOUNT=my-deployer # alias from cast wallet list
export DEPLOYER_SENDER=0x... # address tied to the alias
# Testnet example (Base Sepolia)
forge script script/Deployer.s.sol \
--rpc-url $BASE_SEPOLIA_RPC \
--account $DEPLOYER_ACCOUNT \
--sender $DEPLOYER_SENDER \
--sig "run(uint8)" 1 \
--broadcast --verify
# Mainnet example (Base)
forge script script/Deployer.s.sol \
--rpc-url $BASE_RPC_URL \
--account $DEPLOYER_ACCOUNT \
--sender $DEPLOYER_SENDER \
--sig "run(uint8)" 2 \
--broadcast --verify --slow- ILV vault and distributor: Deployed on Base mainnet in November 2025 via
script/Deployer.s.sol. - LP vault and Aerodrome pool: LP vault
0xAcF7b71620008eF01e001BeaF639Ec060f9193DAuses LP token0x5747e944eed9Bf2b6fbD14Df44211bAdbA36ce84for the Aerodrome ILV/WETH pool.
| Contract | Address | Implementation |
|---|---|---|
| StakingVault (ILV) | 0x88b5B7d27e5aE0926D31b0C9bc3516376C028cC8 |
0xB10ea2EeA6C0dbe2db76Fd7E09951753f2F0690B |
| StakingVault (LP) | 0xAcF7b71620008eF01e001BeaF639Ec060f9193DA |
0xB10ea2EeA6C0dbe2db76Fd7E09951753f2F0690B |
| L2RevenueDistributorV3 | 0xdd5ac0f8Bc0ad15dEAf17903F50E8c356aEcBBc2 |
TBD |
| L2VotingIlluvium | 0x05260814c7f430ccD3e6778353aE4426BE868396 | N/A (immutable) |
| StakingVaultFactory (deprecated) | TBD |
TBD |
| Contract | Address | Implementation |
|---|---|---|
| StakingVault (ILV) | TBD |
TBD |
| StakingVault (LP) | TBD |
TBD |
| L2RevenueDistributorV3 | TBD |
TBD |
| StakingVaultFactory (deprecated) | TBD |
TBD |
MIT.
Built with Foundry • Integrates with Aerodrome • Deployed on Base