Skip to content
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

Morpho vaults and rate providers on base #229

Merged
merged 3 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions erc4626/MorphoVaults/V1.1-Ionic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ERC4626 Vault: `MetaMorphoV1_1`

## Details
- Reviewed by: @mattpereira
- Checked by: @mkflow27
- Deployed at:
- [base:0x5A32099837D89E3a794a44fb131CBbAD41f87a8C](https://basescan.org/address/0x5A32099837D89E3a794a44fb131CBbAD41f87a8C#code)
- [base:0x23479229e52Ab6aaD312D0B03DF9F33B46753B5e](https://basescan.org/address/0x23479229e52Ab6aaD312D0B03DF9F33B46753B5e#code)
- Audit report(s):
- [Ionic Protocol Audits](https://doc.ionic.money/ionic-documentation/resources/audit)

## Context
A 4626 Vault which wraps underlying tokens in MetaMorpho vaults in order for vault curators to earn liquidity providers additional yield on their assets.

## Review Checklist: Bare Minimum Compatibility
Each of the items below represents an absolute requirement for the Rate Provider. If any of these is unchecked, the Rate Provider is unfit to use.

- [x] Tests based on the [balancer-v3-monorepo](https://github.com/balancer/balancer-v3-monorepo/tree/main/pkg/vault/test/foundry/fork) pass for the given ERC4626 vaults.
- [x] The required Vault implements the required operational ERC4626 Interface

## Review Checklist: Common Findings
Each of the items below represents a common red flag found in Rate Provider contracts.

If none of these is checked, then this might be a pretty great Rate Provider! If any of these is checked, we must thoroughly elaborate on the conditions that lead to the potential issue. Decision points are not binary; a Rate Provider can be safe despite these boxes being checked. A check simply indicates that thorough vetting is required in a specific area, and this vetting should be used to inform a holistic analysis of the Rate Provider.

### Administrative Privileges
- [] The ERC4626 Vault is upgradeable.
- note: Upgradeability remarks for rate relevant aspects can be found in the corresponding rate provider review.

### Buffer blocklist
- [ ] The reviewed ERC4626 Vault should be added to the blocked buffers metadata list.

### Common Manipulation Vectors
- [ ] The ERC4626 Vault is susceptible to donation attacks.

## Additional Findings
To save time, we do not bother pointing out low-severity/informational issues or gas optimizations (unless the gas usage is particularly egregious). Instead, we focus only on high- and medium-severity findings which materially impact the contract's functionality and could harm users.

## Conclusion
**Summary judgment: USABLE**
The outlined ERC4626 Vaults should work well with Balancer pools. The Vaults implement the required interfaces with fork tests passing as can be seen [here](https://github.com/balancer/balancer-v3-erc4626-tests/pull/14).
40 changes: 40 additions & 0 deletions erc4626/MorphoVaults/V1.1-Seamless.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ERC4626 Vault: `MetaMorphoV1_1`

## Details
- Reviewed by: @mattpereira
- Checked by: @mkflow27
- Deployed at:
- [base:0x616a4E1db48e22028f6bbf20444Cd3b8e3273738](https://basescan.org/address/0x616a4e1db48e22028f6bbf20444cd3b8e3273738#code)
- Audit report(s):
- [Seamless Protocol Audits](https://github.com/seamless-protocol/audits)

## Context
A 4626 Vault which wraps underlying tokens in MetaMorpho vaults in order for vault curators to earn liquidity providers additional yield on their assets.

## Review Checklist: Bare Minimum Compatibility
Each of the items below represents an absolute requirement for the Rate Provider. If any of these is unchecked, the Rate Provider is unfit to use.

- [x] Tests based on the [balancer-v3-monorepo](https://github.com/balancer/balancer-v3-monorepo/tree/main/pkg/vault/test/foundry/fork) pass for the given ERC4626 vaults.
- [x] The required Vault implements the required operational ERC4626 Interface

## Review Checklist: Common Findings
Each of the items below represents a common red flag found in Rate Provider contracts.

If none of these is checked, then this might be a pretty great Rate Provider! If any of these is checked, we must thoroughly elaborate on the conditions that lead to the potential issue. Decision points are not binary; a Rate Provider can be safe despite these boxes being checked. A check simply indicates that thorough vetting is required in a specific area, and this vetting should be used to inform a holistic analysis of the Rate Provider.

### Administrative Privileges
- [] The ERC4626 Vault is upgradeable.
- note: Upgradeability remarks for rate relevant aspects can be found in the corresponding rate provider review.

### Buffer blocklist
- [ ] The reviewed ERC4626 Vault should be added to the blocked buffers metadata list.

### Common Manipulation Vectors
- [ ] The ERC4626 Vault is susceptible to donation attacks.

## Additional Findings
To save time, we do not bother pointing out low-severity/informational issues or gas optimizations (unless the gas usage is particularly egregious). Instead, we focus only on high- and medium-severity findings which materially impact the contract's functionality and could harm users.

## Conclusion
**Summary judgment: USABLE**
The outlined ERC4626 Vaults should work well with Balancer pools. The Vaults implement the required interfaces with fork tests passing as can be seen [here](https://github.com/balancer/balancer-v3-erc4626-tests/pull/14).
40 changes: 40 additions & 0 deletions erc4626/MorphoVaults/V1.1-Spark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# ERC4626 Vault: `MetaMorphoV1_1`

## Details
- Reviewed by: @mattpereira
- Checked by: @mkflow27
- Deployed at:
- [base:0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A](https://basescan.org/address/0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A#code)
- Audit report(s):
- [\<audit title\>](\<link to audit\>)

## Context
A 4626 Vault which wraps underlying tokens in MetaMorpho vaults in order for vault curators to earn liquidity providers additional yield on their assets.

## Review Checklist: Bare Minimum Compatibility
Each of the items below represents an absolute requirement for the Rate Provider. If any of these is unchecked, the Rate Provider is unfit to use.

- [x] Tests based on the [balancer-v3-monorepo](https://github.com/balancer/balancer-v3-monorepo/tree/main/pkg/vault/test/foundry/fork) pass for the given ERC4626 vaults.
- [x] The required Vault implements the required operational ERC4626 Interface

## Review Checklist: Common Findings
Each of the items below represents a common red flag found in Rate Provider contracts.

If none of these is checked, then this might be a pretty great Rate Provider! If any of these is checked, we must thoroughly elaborate on the conditions that lead to the potential issue. Decision points are not binary; a Rate Provider can be safe despite these boxes being checked. A check simply indicates that thorough vetting is required in a specific area, and this vetting should be used to inform a holistic analysis of the Rate Provider.

### Administrative Privileges
- [] The ERC4626 Vault is upgradeable.
- note: Upgradeability remarks for rate relevant aspects can be found in the corresponding rate provider review.

### Buffer blocklist
- [ ] The reviewed ERC4626 Vault should be added to the blocked buffers metadata list.

### Common Manipulation Vectors
- [ ] The ERC4626 Vault is susceptible to donation attacks.

## Additional Findings
To save time, we do not bother pointing out low-severity/informational issues or gas optimizations (unless the gas usage is particularly egregious). Instead, we focus only on high- and medium-severity findings which materially impact the contract's functionality and could harm users.

## Conclusion
**Summary judgment: USABLE**
The outlined ERC4626 Vaults should work well with Balancer pools. The Vaults implement the required interfaces with fork tests passing as can be seen [here](https://github.com/balancer/balancer-v3-erc4626-tests/pull/14).
31 changes: 31 additions & 0 deletions erc4626/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,36 @@
"review": "./AaveV3.md",
"warnings": []
}
},
"base": {
"0x616a4E1db48e22028f6bbf20444Cd3b8e3273738": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "MetaMorpho v1.1 Seamless USDC",
"summary": "safe",
"review": "./MorphoVaults/V1.1-Seamless.md",
"warnings": []
},
"0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "MetaMorpho v1.1 Spark USDC",
"summary": "safe",
"review": "./MorphoVaults/V1.1-Spark.md",
"warnings": []
},
"0x23479229e52Ab6aaD312D0B03DF9F33B46753B5e": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "MetaMorpho v1.1 Ionic USDC",
"summary": "safe",
"review": "./MorphoVaults/V1.1-Ionic.md",
"warnings": []
},
"0x5A32099837D89E3a794a44fb131CBbAD41f87a8C": {
"asset": "0x4200000000000000000000000000000000000006",
"name": "MetaMorpho v1.1 Ionic WETH",
"summary": "safe",
"review": "./MorphoVaults/V1.1-Ionic.md",
"warnings": []
}
}

}
17 changes: 17 additions & 0 deletions rate-providers/MorphoERC4626RateProviders.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
- Steakhouse v1.1 USDC - csUSDC [ethereum:0xB0926Cfc3aC047035b11d9afB85DC782E6D9d76A](https://etherscan.io/address/0xB0926Cfc3aC047035b11d9afB85DC782E6D9d76A#code)
- Gauntlet wETH Ecosystem v1.1[ethereum:0xD231564648C94542C01e9a528c9cAa033bbf274C](https://etherscan.io/address/0xD231564648C94542C01e9a528c9cAa033bbf274C#code)
- IndexCoop mhyETH v1.1[ethereum:0x3BD4B2174498b3Aa01be0acFa0F775472b2dC30b](https://etherscan.io/address/0x3BD4B2174498b3Aa01be0acFa0F775472b2dC30b#code)
- Seamless USDC v1.1[base:0xc11082BbDBB8AaB12d0947EEAD2c8bc28E1b3B34](https://basescan.org/address/0xc11082BbDBB8AaB12d0947EEAD2c8bc28E1b3B34#code)
- Spark USDC v1.1[base:0x9e0926C3c5D2F42845Bf4F980F926b60323872d7](https://basescan.org/address/0x9e0926C3c5D2F42845Bf4F980F926b60323872d7#code)
- Ionic USDC v1.1[base:0xdCb03A77bB54E0a05D591e543FA39E9c46E8Febb](https://basescan.org/address/0xdCb03A77bB54E0a05D591e543FA39E9c46E8Febb#code)
- Ionic Ecosystem WETH v1.1[base:0xcc028cF7F8fA7986001fa7063A2E26b3094b42fd](https://basescan.org/address/0xcc028cF7F8fA7986001fa7063A2E26b3094b42fd#code)



- Audit report(s):
- [Security Reviews & Formal Verifications](https://docs.morpho.org/security-reviews/)
- [MetaMorpho Spearbit Audit](https://github.com/morpho-org/metamorpho/blob/main/audits/2023-11-14-metamorpho-cantina-managed-review.pdf)
- [MetaMorpho v1.1 Audits](https://github.com/morpho-org/metamorpho-v1.1/tree/main/audits)

## Context
The ERC4626 RateProvider fetches the rate of MetaMorpho Vault tokens in terms of the underlying asset. The exchange rate is provided via the conversion between totalAssets and totalSupply. The Morpho contract only determines the potential market parameters, assets, collaterals, beneficiary, owner, fee, and cooldown periods related to the vault curator. There are no entry or exit fees, and no time locks for users to deposit and withdraw from this vault.
Expand Down Expand Up @@ -68,6 +73,18 @@ If none of these is checked, then this might be a pretty great Rate Provider! If
#### IndexCoop mhyETH (wETH) v1.1
For [IndexCoop mhyETH](https://etherscan.io/address/0x701907283a57FF77E255C3f1aAD790466B8CE4ef) some allocators are eoas.
- 0x622271CEC64F6106020F31773Ec5293F4677cb95
#### Seamless USDC v1.1
For [Seamless USDC](https://basescan.org/address/0x616a4e1db48e22028f6bbf20444cd3b8e3273738) some allocators are eoas.
- 0x8a438a7fb092E5D074a7aDe03E7eD25015817c58
#### Spark USDC v1.1
For [Spark USDC](https://basescan.org/address/0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A) no allocators are eoas. Only one allocator exists, which is a multi-sig.
#### Ionic USDC v1.1
For [Ionic USDC](https://basescan.org/address/0x23479229e52Ab6aaD312D0B03DF9F33B46753B5e#events) some allocators are eoas.
- 0x1f9A8c72327242b64bd21945E9750F5C5F50Eee1
#### Ionic WETH v1.1
For [Ionic WETH](https://basescan.org/address/0x5A32099837D89E3a794a44fb131CBbAD41f87a8C) some allocators are eoas.
- 0x5f0761eed6Cd7F0Bd91d847E955cD78Bb50B0647

Comment on lines 73 to +87
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pattern matched this info by looking at SetIsAllocator events, but I'm not sure it is all that valuable since allocators can be added / removed by contract owner at any time, which means the info we are sharing here could be out of date

    function setIsAllocator(address newAllocator, bool newIsAllocator) external onlyOwner {
        if (isAllocator[newAllocator] == newIsAllocator) revert ErrorsLib.AlreadySet();

        isAllocator[newAllocator] = newIsAllocator;

        emit EventsLib.SetIsAllocator(newAllocator, newIsAllocator);
    }



### Oracles
Expand Down
36 changes: 36 additions & 0 deletions rate-providers/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,42 @@
"factory": "0x0A973B6DB16C2ded41dC91691Cc347BEb0e2442B",
"upgradeableComponents": []
},
"0xc11082BbDBB8AaB12d0947EEAD2c8bc28E1b3B34": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "ERC4626RateProvider",
"summary": "safe",
"review": "./MorphoERC4626RateProviders.md",
"warnings": [],
"factory": "0xEfD3aF73d3359014f3B864d37AC672A6d3D7ff1A",
"upgradeableComponents": []
},
"0x9e0926C3c5D2F42845Bf4F980F926b60323872d7": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "ERC4626RateProvider",
"summary": "safe",
"review": "./MorphoERC4626RateProviders.md",
"warnings": [],
"factory": "0xEfD3aF73d3359014f3B864d37AC672A6d3D7ff1A",
"upgradeableComponents": []
},
"0xdCb03A77bB54E0a05D591e543FA39E9c46E8Febb": {
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"name": "ERC4626RateProvider",
"summary": "safe",
"review": "./MorphoERC4626RateProviders.md",
"warnings": [],
"factory": "0xEfD3aF73d3359014f3B864d37AC672A6d3D7ff1A",
"upgradeableComponents": []
},
"0xcc028cF7F8fA7986001fa7063A2E26b3094b42fd": {
"asset": "0x4200000000000000000000000000000000000006",
"name": "ERC4626RateProvider",
"summary": "safe",
"review": "./MorphoERC4626RateProviders.md",
"warnings": [],
"factory": "0xEfD3aF73d3359014f3B864d37AC672A6d3D7ff1A",
"upgradeableComponents": []
},
"0x14BD1e9b30007510c2aFE3a7a8053A6DE5605d35": {
"asset": "0xe298b938631f750DD409fB18227C4a23dCdaab9b",
"name": "ERC4626RateProvider",
Expand Down