Listing ETHx on Compound

[Gauntlet] - Updated ETHx Asset Listing Recommendation

Simple Summary

Since our last recommendation, we’ve observed increased slippage when swapping ETHx to WETH. Therefore, Gauntlet recommends updating the listing parameters for this asset accordingly:

Parameter Value
Collateral Factor 85%
Liquidation Factor 90%
Liquidation Penalty 5%
Supply Cap 2,100

ETHx TVL in pools has been trending upwards. The below table outlines major ETHx/WETH pools and their TVLs.

Dex Category TVL (mil) URL
balancer_ethereum 32.77 Link
curve 12.69 Link
balancer_ethereum 5.72 Link
curve 5.44 Link
balancer_ethereum 0.70 Link
uniswap_v3 0.13 Link
pancakeswap-v3-ethereum 0.10 Link
uniswap_v3 0.06 Link
curve 0.04 Link
pancakeswap-v3-ethereum 0.02 Link
balancer_ethereum 0.02 Link
curve 0.01 Link

Total TVL: 57.72mil

The Balancer ETHx-WETH pool stands out as the primary liquidity source with $32.77M worth of WETH. It’s worth noting that there are additional liquidity pools involving LST/LRT pairs that contribute to the overall liquidity profile of ETHx. These peripheral sources of liquidity are not accounted for in the list above.

Supply Cap and Liquidation Penalty

A 5% slippage would amount to ~$7.8M worth of ETHx being sold. Given the above liquidity sources, we recommend setting the supply cap that would cause 5% slippage. Gauntlet recommends a supply cap of 2,100 ETHx.

Liquidation Factor (LF) and Collateral Factor (CF)

Metric Value
Annualized Volatility 5%
Max Drawdown from Exchange Rate 1%

Given the above metrics along with the proposed Liquidation Penalty, Gauntlet recommends

Liquidation Factor = 1 - (LP+Volatility)

This would give an LF of 90%, and a CF of 85%

Use of Exchange Rate Oracles

If exchange rate oracles are implemented, Gauntlet can recommend more capital efficient parameters as the asset remains insulated from market movements, although exposes it to tail-end risks. The exchange rate based risk parameters could facilitate higher caps and Liquidation Factors along with more conservative Liquidation Penalties. Gauntlet supports exchange rate oracles for ETHx within this correlated Comet if the community decides to move forward with this strategy.

Thanks a ton for the updated parameters @Gauntlet. And we do plan to use exchange rate oracles. So please go ahead and suggest the more capital efficient parameters

ETHX Collateral For Mainnet WETH Migration Review

July 15-17, 2024

Summary

Total Issues: 2 (1 resolved)

Low Severity Issues: 1 (1 resolved)

Notes & Additional Information: 1 (0 resolved)

Scope

OpenZeppelin reviewed Pull Request 851 of the compound-finance/comet repository at commit 1efa339 which will submit a governance proposal to add ETHx as a collateral asset to the WETH Comet market on Mainnet using the official Comet Migration process.

In scope was the governance proposal created by the simulated Enact Workflow using the migration files:

deployments/mainnet/weth/migrations/1715192704_add_ethx_collateral.ts

System Overview

As described in the Compound Community Forum Proposal, it has been proposed to add ETHX as a collateral asset to the WETH Comet market on Mainnet.

To add a collateral asset to an official market on Mainnet, a series of specific Compound Governance steps must be taken. Dependencies must be accurately and securely deployed after which an official governance proposal is to be proposed on-chain. The focus of OpenZeppelin’s review was Pull Request 851 which includes the deployed dependencies, the official migration governance proposal, and all the security concerns that may arise during execution of the proposal. Specifically we checked:

  • Whether correct contracts were deployed on-chain.
  • Whether the simulation workflow created the same proposal as the deployment workflow.
  • Whether the proposal description was accurate and descriptive of its effects.
  • Whether proposal dependencies were verified as deployed with correct configurations.
  • Whether proposal instructions were decoded and verified as complete.
  • Whether correct oracle price feeds were used.
  • Whether proposal instructions were simulated and executed successfully without errors.
  • Whether the eventual market configuration matches the parameter values provided by Gauntlet and accepted by the community.

Security Model and Trust Assumptions

Before proposal enactment to incorporate ETHX as a collateral asset for Compound’s WETH Comet market on Mainnet, it is assumed that there will not be any upgrades or changes to the implementations of the proposal. It is also assumed that any changes to the Comet ecosystem at large such as any other governance proposals between this audit and this proposal execution should not have any effects.

Low Severity

Incorrect Price Feed Decimals

The migration script currently uses an ETHX price feed in USD with 18 decimals. However, Comet expects the price feed to have 8 decimals and will reject any feed that does not conform to this requirement. Therefore, while the migration script might run successfully, the proposal will fail with the custom error BadDecimals.

To resolve this, consider deploying a new price feed that reports prices with 8 decimal places to ensure the proposal executes correctly.

Update: Resolved in commit 1f7912b. A ScalingPriceFeed will be deployed to scale down the fetched ETHX price from 18 decimals to 8 decimals and conform with the Comet requirements.

Notes & Additional Information

Inefficient Listing Parameters

The currently used asset listing parameters may be incorrect and lead to the market being less capital efficient. Gauntlet’s parameter recommendations were made before the knowledge of suitable exchange rate oracles. To summarize, if an exchange rate oracle were to be used for the asset listing of ETHX, then Gauntlet would recommend more capital efficient listing parameters as the system can take on more risks. However, it does seem that the current risk parameters are on the safer side and shouldn’t add any risks in using them.

Updated risk parameter value recommendations for the ETHX collateral asset can be set by governance proposal when available.

Update: Acknowledged.

Conclusion

Upon reviewing the calldata generated by the migration script, we found a single low issue which prevents successful proposal execution. We recommend an additional review following revision of the migration script, simulation of the proposal execution, and testing of the resulting market configuration.

Add ETHx to cWETHv3 on Mainnet

PR - Add ETHx as collateral to WETH market on Mainnet by MishaShWoof · Pull Request #901 · compound-finance/comet · GitHub

Actions

  1. Run Slither. Fails. :x:. Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  2. Forge test. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  3. Gas Profiler. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  4. Scan. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  5. Mainnet-weth Scenario. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  6. Unit tests. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  7. Eslint. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  8. Contract linter. Success.:white_check_mark: Add ETHx as collateral to WETH market on Mainnet · woof-software/comet@564a6c5 · GitHub
  9. Prepare migration. Success.:white_check_mark: Prepare Migration · woof-software/comet@564a6c5 · GitHub
  10. Enact migration. Success.:white_check_mark: Enact Migration · woof-software/comet@564a6c5 · GitHub

Description we use:

'# Add ETHx as collaterals into cWETHv3 on Mainnet\n\n

Proposal summary\n\n

Compound Growth Program [AlphaGrowth] proposes to add ETHx into cWETHv3 on Ethereum network. This proposal takes the governance steps recommended and necessary to update a Compound III WETH market on Ethereum. Simulations have confirmed the market’s readiness, as much as possible, using the Comet scenario suite. The new parameters include setting the risk parameters based on the recommendations from Gauntlet.\n\n

Further detailed information can be found on the corresponding proposal pull request and forum discussion.\n\n\n

Price feed\n\n

Exchange rate price feed of ETHx/ETH was provided by Chainlink team. The address of pricefeed that is used is 0xdd487947c579af433AeeF038Bf1573FdBB68d2d3\n\n\n

Proposal Actions\n\n

The first proposal action adds ETHx asset as collateral with corresponding configurations.\n\n

The second action deploys and upgrades Comet to a new version.

thank you so much for thus info