Implement Solidity MVS Manager with ERC4626 Compatibility and Modular Extensions#21
Closed
Copilot wants to merge 1 commit intoupgrade/scarb-2.11.4from
Closed
Conversation
Copilot
AI
changed the title
[WIP] Solidity Implementation of mvs_manager.cairo
Implement Solidity MVS Manager with ERC4626 Compatibility and Modular Extensions
Aug 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a complete Solidity version of the MVS (Multi-Vault Strategy) Manager as requested in the issue. The implementation provides an ERC4626-compatible vault that supports multiple modular extensions with configurable rebalancing operations.
Key Features
ERC4626 Compatible Vault
The
MVSManagercontract fully implements the ERC4626 standard, allowing it to integrate seamlessly with existing DeFi protocols and tooling. Users can deposit, mint, withdraw, and redeem shares using standard vault interfaces.Modular Extension System
The manager supports up to 10 different strategy extensions through the
IMVSSubExtensioninterface. Extensions can be:Configurable Rebalancing
The rebalancing system allows admins to create named combinations of operations:
Total Assets Calculation
As specified in the requirements, total assets are calculated as:
Where all assets are denominated in the manager's base asset token.
Advanced Yield Management
The implementation includes an
IYieldExtensioninterface for extensions that generate yield:Implementation Structure
Security Features
Example Extensions
LeverageVault
Demonstrates a leveraged strategy extension with configurable leverage multipliers (1x to 3x). Simulates interaction with lending protocols for borrowing and position management.
SimpleStakingVault
Shows a yield-generating extension that implements staking with APY calculations, reward harvesting, and compound functionality. Includes ERC165 support for automatic yield detection.
Usage Example
The implementation maintains full compatibility with existing ERC4626 tooling while providing the requested modular architecture and configurable rebalancing capabilities.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
binaries.soliditylang.orgnode /home/REDACTED/work/troves-contracts/troves-contracts/solidity/node_modules/.bin/hardhat compile(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.