Skip to content

VeloraDEX/velora-miro-contracts

Repository files navigation

Project Miro Contracts

This repository contains Miro's staking related smart contracts

Contracts

TimeLockedERC20

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 lock
  • DEFAULT_ADMIN_ROLE - admin role. Can change time lock parameters and grand roles to others

seVLR (Placeholder Name)

Project Miro staking contract.

Utilizes TimeLockedERC20 to lock 20WETH/80VLR liquidity tokens and ERC20Votes for DAO voting capabilities.

MiroMigrator

Migrator contract, allows users to migrate their stakes from previous versions to seVLR.

Supports following migration routes:

  • PSP -> VLR
  • sePSP1 -> VLR
  • sePSP2 -> seVLR
  • PSP + (W)ETH -> seVLR
  • sePSP1 + (W)ETH -> seVLR

Also supports following cross-chain migrations using Across protocol:

  • sePSP2 -> seVLR

BridgeStaking

Helper contract, which is responsible for handling staking on destination chain during cross-chain migrations.

Utilizes Across's AcrossMessageHandler interface with handleV3AcrossMessage method.

Security

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

Setup

Install

Install yarn dependencies:

$ yarn install

Scripts

This is a list of the most frequently needed commands.

Build

Build the contracts:

$ yarn build

Clean

Delete the build artifacts and cache directories:

$ yarn clean

Coverage

Generate test coverage with lcov report

$ yarn test:coverage

Lint

Lint the contracts:

$ yarn lint:sol

Test

Run the tests:

$ yarn test

Deploy

Add env variables and run the following command to deploy the contracts:

$ hardhat ignition ignition/modules/MiroMigrator \
--network base \
--parameters ignition/parameters-base.json

License

This project is licensed under MIT.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5