This repository contains Miro's staking related smart contracts
ERC20 extension that allows time locking tokens for a certain periods of time.
Has 2 roles:
MIGRATOR- addresses with this role are allowed to bypass time lockDEFAULT_ADMIN_ROLE- admin role. Can change time lock parameters and grand roles to others
Project Miro staking contract.
Utilizes TimeLockedERC20 to lock 20WETH/80VLR liquidity tokens and ERC20Votes for DAO voting capabilities.
Migrator contract, allows users to migrate their stakes from previous versions to seVLR.
Supports following migration routes:
PSP->VLRsePSP1->VLRsePSP2->seVLRPSP+(W)ETH->seVLRsePSP1+(W)ETH->seVLR
Also supports following cross-chain migrations using Across protocol:
sePSP2->seVLR
Helper contract, which is responsible for handling staking on destination chain during cross-chain migrations.
Utilizes Across's AcrossMessageHandler interface with handleV3AcrossMessage method.
This codebase has been audited by professional security firms:
- PeckShield (VLR Token & Miro Staking) - February/May 2025
- AstraSec (Full Protocol) - May 2025
All identified security issues have been resolved. See audits/ for detailed reports and findings.
Final Audited Commit: 609701a
Install yarn dependencies:
$ yarn installThis is a list of the most frequently needed commands.
Build the contracts:
$ yarn buildDelete the build artifacts and cache directories:
$ yarn cleanGenerate test coverage with lcov report
$ yarn test:coverageLint the contracts:
$ yarn lint:solRun the tests:
$ yarn testAdd env variables and run the following command to deploy the contracts:
$ hardhat ignition ignition/modules/MiroMigrator \
--network base \
--parameters ignition/parameters-base.jsonThis project is licensed under MIT.