feature: Midas Liquid Reserve Vault Support#85
Conversation
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.
Check with Chaos for config
There was a problem hiding this comment.
I've put a message
There was a problem hiding this comment.
💡 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".
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
|
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)