-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add superform USDC rate providers and vaults
- Loading branch information
1 parent
7b321c1
commit 445475f
Showing
4 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ERC4626 Vault: `SuperVault` | ||
|
||
## Details | ||
- Reviewed by: @mattpereira | ||
- Checked by: @\<GitHub handle of secondary reviewer\> | ||
- Deployed at: | ||
- [ethereum:0xF7DE3c70F2db39a188A81052d2f3C8e3e217822a](https://etherscan.io/address/0xF7DE3c70F2db39a188A81052d2f3C8e3e217822a#code) | ||
- [base:0xe9F2a5F9f3c846f29066d7fB3564F8E6B6b2D65b](https://basescan.org/address/0xe9F2a5F9f3c846f29066d7fB3564F8E6B6b2D65b#code) | ||
- Audit report(s): | ||
- [yAudit Report](https://github.com/superform-xyz/SuperVaults/tree/main/audits) | ||
|
||
## Context | ||
\<Write a brief description of the intended functionality here.\> | ||
|
||
## 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. | ||
|
||
- [ ] 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, which can be found [here](https://github.com/balancer/balancer-v3-erc4626-tests/tree/main/test). | ||
- [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 (e.g., via a proxy architecture or an `onlyOwner` function that updates the price source address). | ||
|
||
### 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/UNUSABLE\>** | ||
|
||
\<Delete this hint: Formulate a nuanced conclusion here. Remember, it's okay if some of the boxes above are checked as long as reasonable protections are in place. If the ERC4626 Vault is very obviously safe, say so. If it's very obviously not, say so: what specifically needs to change before it can be considered safe? If the conclusion is hazy, explain why, and leave the final determination up to the reader. \> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
\<Template: Copy this file and replace all elements inside \<\> brackets. Delete this particular block.\> | ||
|
||
# Rate Provider: `ERC4626RateProvider` | ||
|
||
## Details | ||
- Reviewed by: @mattpereira | ||
- Checked by: @\<GitHub handle of secondary reviewer\> | ||
- Deployed at: | ||
- [ethereum:0x9fA39387D479fd456367190c82739eD6dC86491D](https://etherscan.io/address/0x9fA39387D479fd456367190c82739eD6dC86491D#code) | ||
- [base:0x829Be222f36C6B7D48a7e1270b3c070BA2Ee98C4](https://basescan.org/address/0x829Be222f36C6B7D48a7e1270b3c070BA2Ee98C4#code) | ||
- Audit report(s): | ||
- [yAudit Superform Router Plus and Super Vaults Review](https://github.com/superform-xyz/SuperVaults/blob/main/audits/yAudit_report.pdf) | ||
|
||
## Context | ||
\<Write a brief description of the intended functionality here.\> | ||
|
||
## 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] Implements the [`IRateProvider`](https://github.com/balancer/balancer-v2-monorepo/blob/bc3b3fee6e13e01d2efe610ed8118fdb74dfc1f2/pkg/interfaces/contracts/pool-utils/IRateProvider.sol) interface. | ||
- [x] `getRate` returns an 18-decimal fixed point number (i.e., 1 == 1e18) regardless of underlying token decimals. | ||
|
||
## Review Checklist: Common Findings | ||
The ERC4626 RateProvider fetches the rate of SuperVault tokens in terms of the underlying asset. The exchange rate is provided via the conversion between totalAssets and totalSupply. The SuperVault contract leverages Yearn v3's `TokenizedStrategy` as a proxy implementation that handles core ERC4626 vault logic. It extends this foundation by adding specialized functionality for managing multiple Superform positions through weight-based allocation, rebalancing capabilities, and whitelist controls. | ||
|
||
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 Rate Provider is upgradeable (e.g., via a proxy architecture or an `onlyOwner` function that updates the price source address). | ||
|
||
- [ ] Some other portion of the price pipeline is upgradeable (e.g., the token itself, an oracle, or some piece of a larger system that tracks the price). | ||
|
||
### Oracles | ||
- [ ] Price data is provided by an off-chain source (e.g., a Chainlink oracle, a multisig, or a network of nodes). | ||
|
||
- [ ] Price data is expected to be volatile (e.g., because it represents an open market price instead of a (mostly) monotonically increasing price). | ||
|
||
### Common Manipulation Vectors | ||
- [ ] The Rate Provider is susceptible to donation attacks. | ||
|
||
|
||
## Conclusion | ||
**Summary judgment: USABLE** | ||
|
||
The Rate Providers should work well with Balancer pools. |
This file contains 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