Skip to content

Maia-DAO/maia-v2

Repository files navigation

Maia V2 Contracts

Version Test CI Lint Code Coverage Solidity License Docs Discord

In this repository, you will find the contracts for the Maia V2 BurntHermes aggregation logic.

Contributing

If you’re interested in contributing please see our contribution guidelines! This includes instructions on how to compile and run tests locally.

Documentation

A more detailed description of the project can be found in the documentation.

Architecture

The system is composed of VoteMaia, an example of a Partner contract, that allows the partner to manage underlying BurntHermes utility tokens, like allowing users to claim their share of utility tokens from the bHERMES held in the contract. Also includes PartnerManagerFactory, to be used by governance to acknowledge new partners on-chain.

Repository Structure

All contracts are held within the ./src folder.

Note that helper contracts used by tests are held in the ./test/utils subfolder within the contracts folder. Any new test helper contracts should be added there and all foundry tests are in the ./test folder.

src
├── src
│   ├── factories
│   │   └── PartnerManagerFactory.sol - "Factory for managing PartnerManagers"
│   ├── interfaces
│   │   ├── IBaseVault.sol - "BaseVault interface"
│   │   ├── IERC4626PartnerManager.sol - "ERC4626PartnerManager interface"
│   │   ├── IPartnerManagerFactory.sol - "PartnerManagerFactory interface"
│   │   └── IPartnerUtilityManager.sol - "PartnerUtilityManager interface"
│   ├── libraries
│   │   └── DateTimeLib.sol - "Library to check if it is the first Tuesday of a month"
│   ├── PartnerUtilityManager.sol - "Partner Utility Tokens Manager Contract"
│   ├── tokens
│   │   ├── ERC4626PartnerManager.sol - "Yield bearing, boosting, voting, and gauge enabled Partner Token"
│   │   └── Maia.sol - "Maia ERC20 token - Native token for the Maia ecosystem"
│   └── VoteMaia.sol - "VoteMaia: Yield bearing, boosting, voting, and gauge enabled MAIA"
└── test
    ├── mock
    │   ├── MockERC4626PartnerManager.t.sol
    │   └── MockVault.t.sol
    ├── tokens
    │   └── ERC4626PartnerManagerTest.t.sol
    └── VoteMaiaTest.t.sol

Local deployment and Usage

To utilize the contracts and deploy to a local testnet, you can install the code in your repo with forge:

forge install https://github.com/Maia-DAO/maia-v2

License

MIT Copyright

About

Maia V2 Yield Powerhouse of DeFi

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published