-
Notifications
You must be signed in to change notification settings - Fork 7
feature: Midas Liquid Reserve Vault Support #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scripts/DeployMidasModule.s.sol
Outdated
| //price provider set oracle | ||
| PriceProvider(priceProvider).setTokenConfig(tokens, midasConfigs); | ||
|
|
||
| IDebtManager.CollateralTokenConfig memory collateralConfig = IDebtManager.CollateralTokenConfig({ ltv: 90e18, liquidationThreshold: 95e18, liquidationBonus: 1e18 }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check with Chaos for config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've put a message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8c8f91ba9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Audit Changes - MidasModuleCommit: SummaryThis commit simplifies the MidasModule by removing the async withdrawal flow and switching to a direct async withdrawal request pattern. The module now directly calls Major Changes1. Withdrawal Implementation SimplifiedRemoved Functions:
Modified Function:
Impact:
2. Removed State Variables and Structs
3. Removed Errors
4. Added Error
5. Event ChangesRemoved Events:
Modified Event:
6. Code Quality ImprovementsRemoved Unused Imports:
Documentation Updates:
Constructor Changes:
Testing UpdatesAll test cases related to async withdrawal flows have been removed:
All
Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Midas Vault Integration Module
Summary
Adds
MidasModuleto enable EtherFi Safes to interact with Midas Liquid Reserve Vaults. Supports multiple vaults, depositing USDC/USDT to mint Midas tokens, instant withdrawals, and async withdrawals via Cash Module integration.Changes
MidasModule.sol: Module contract supporting multiple Midas vaults with:MIDAS_MODULE_ADMINrole)IMidasVault.sol: Interface for Midas Vault operations (depositInstant, redeemInstant, redeemRequest)DeployMidasModule.s.sol: Deployment script that configures module, price oracle, collateral settings (90% LTV, 95% liquidation threshold), and withdrawable assetsscripts/gnosis-txs/DeployMidasModule.s.sol: Gnosis Safe deployment script for Midas modulescripts/gnosis-txs/SetMidasConfig.s.sol: Gnosis Safe configuration script that sets up module permissions, price oracle, collateral/borrow config, and withdrawable assetsMidasModule.t.sol: Comprehensive test suite covering deposits, withdrawals, async flows, multi-vault scenarios, and error casesFiles Changed
src/modules/midas/MidasModule.sol(new)src/interfaces/IMidasVault.sol(new)scripts/DeployMidasModule.s.sol(new)scripts/gnosis-txs/DeployMidasModule.s.sol(new)scripts/gnosis-txs/SetMidasConfig.s.sol(new)test/safe/modules/midas/MidasModule.t.sol(new)remappings.txt(new)deployments/dev/534352/deployments.json(modified)foundry.toml(modified)