Launch USDT Market on Compound v3 Ethereum

Summary

We would like to propose on addition of USD Tether (USDT) to Compound V3.

Motivation

USDT is one of the most popular markets in Compound V2. It is the third largest Market on Compound V2 in terms of total earnings and is the largest V2 market in terms of total borrowing. Adding USDT to V3 would provide the Compound community an attractive market for borrowing and lending. Moreover, this history of demand for USDT on Compound and other protocols, makes it a desirable asset to be listed on the platform.

USDT is also one of the most widely used stablecoins in the industry. With Marketcap of $95Billion it is the third largest coin in terms of Marketcap.

Proposed Collateral

We propose adding the following assets as collaterals for the USDT market

  • wstETH
  • ETH
  • WBTC
  • COMP
  • USDC

We invite the community to suggest and give inputs for any other collateral assets.

Relevant Documents and Links

Website: https://tether.to/

Twitter: https://twitter.com/Tether_to/

CoinMarketCap: https://coinmarketcap.com/currencies/tether/

CoinGecko: https://www.coingecko.com/en/coins/tether

V2 USDT Market Stats: Link

Next Steps

Franklin DAO has received a grant from the Compound Grants Program to deliver the technical implementation of this market.

We invite the community to consider this application for listing the USDT market and welcome suggestions in this direction.

Additionally, we look forward to the community to suggest

  • Collateral Factor
  • Reserve Factor
  • Borrowing Limit
11 Likes

We recently updated the proposal to include wstETH as a suggested collateral.

4 Likes

Excited to help push this initiative as part of the Growth Plan:

2 Likes

Clarifying that the Milestone 1 from CGP has been met with this proposal posted on the forum. And Milestone 2 will be funded should the community vote in favour.

CGP wants to ensure alignment and transparency with the community.

3 Likes

Ethereum v3 USDT Initial Asset Listing Recommendations

Simple Summary

Gauntlet is excited for the community to expand Compound III into USDT. We recommend the following initial parameter recommendations for the Ethereum v3 USDT comet.

Risk Parameters

Asset Collateral Factor Liquidation Factor Liquidation Penalty Supply Cap
WETH 83% 90% 5% 500,000 ($1.32B)
WBTC 80% 85% 5% 18,000 ($892M)
COMP 65% 70% 25% 100,000 ($5.8M)
wstETH 80% 85% 5% 9,000 ($30M)
UNI 75% 81% 15% 3,000,000 ($23M)
LINK 79% 85% 7% 2,000,000 ($40M)

Gauntlet provided parameter recommendations for assets listed on Ethereum v3’s USDC Comet and included wstETH, as requested in the initial proposal. We excluded USDC from our initial recommendation due to uncertainties about the market value of incorporating a fiat-backed stablecoin into the USDT Comet market. Gauntlet will provide a recommendation if the community wants to move forward with adding USDC to the Comet as collateral.

Storefront Price Factor: 60%

Gauntlet recommends keeping the storefront price factor at the same value as the Ethereum v3 USDC Comet.

Target Reserves: 20,000,000

After Gauntlet’s forum post analyzing Target Reserves, Gauntlet recommends increasing the Target Reserves for this market based on historical reserve growth and our recent recommendation to increase Ethereum USDC Comet’s Target Reserves.

IR Curve Parameters

IR Parameter Value
borrow per year interest rate base 0.015
borrow per year interest rate slope low 0.061
borrow kink 0.90
borrow per year interest rate slope high 3.2
supply per year interest rate base 0
supply per year interest rate slope low 0.059
supply kink 0.90
supply per year interest rate slope high 2.9


The chart above demonstrates that the generation of Comet USDT reserves will be positive when utilization exceeds 72%.

Incentive Parameters

Daily COMP Supply Rewards Daily COMP Borrow Rewards
70 50

Our COMP rewards recommendations are designed to offer appealing distribution APRs when the comet is first launched. We are incentivizing supplies and borrows to incentivize the rapid ramp-up of TVL and the high utilization of USDT. The Daily COMP rewards are subject to change as TVL rises and the markets evolve.

Here’s an update on the current COMP rewards structure in Ethereum v3 USDT:

  • Daily COMP Supply Rewards: 70 COMP
  • Daily COMP Borrow Rewards: 50 COMP

The chart above illustrates the Distribution Annual Percentage Rates (APRs) across various supply levels, assuming a 90% utilization rate. It’s noteworthy that APRs exceeding 2% will persist until the market’s supply reaches $100M. These incentive distributions are strategically designed to accelerate the Comet’s growth on the ETH mainnet, which boasts a circulating supply of 45B USDT.

Next Steps

We welcome community feedback.

3 Likes

Compound Mainnet USDT Migration Review

June 24-26, 2024

Summary

Medium Severity Issues: 1 (1 Partially Resolved)

Notes & Additional Information: 1 (1 Unresolved)

Total Issues: 2 (1 Partially Resolved, 1 Unresolved)

Scope

OpenZeppelin reviewed Pull Request 862 of the compound-finance/comet repository at commit 3ade273 which will submit a governance proposal to create a USDT 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:

.github/workflows/enact-migration.yaml
contracts/Comet.sol
contracts/CometCore.sol
contracts/CometMainInterface.sol
contracts/IERC20NonStandard.sol
deployments/mainnet/usdt/migrations/1717664323_configurate_and_ens.ts

Reviewing base and collateral assets of the USDT Comet market on Mainnet was out of scope.

Overview

As described in the Compound Community Forum Proposal, Woof Software and the Compound Growth Program propose launching the USDT market on Mainnet with wstETH, ETH, WBTC, COMP, UNI and LINK as collateral.

To deploy 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 862 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:

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

Security Model and Trust Assumptions

Before proposal enactment to incorporate the USDT 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 from the Comet ecosystem at large such as any other governance proposals between this audit and this proposal execution should not have any effects.

Medium Severity

Misconfigured and Wrong Oracles Used

All the collaterals for the USDT market should be priced in USD. However, the wstETH asset is priced in ETH instead of USD. Due to a misconfigured address in the WBTC oracle, it is also pricing the collateral in ETH instead of USD. Both of these will cause problems when attempting to return the appropriate price such that borrowers won’t be able to borrow using these as collateral.

Consider using the MultiplicativePriceFeed contract to get the wstETH and the WBTC price in USD by utilizing the wstETH/ETH and ETH/USD price feeds for wstETH and the WBTC/BTC and BTC/USD price feeds for WBTC. cbETH collateral is priced in USD similarly on Base.

Update: Partially resolved in commit ea783f7.

The wstETH asset is priced using the WstETHPriceFeed with the stETHtoETHPriceFeed parameter set to the address of a stETh/USD price feed because there are not any wstETH price feeds provided by ChainLink on Mainnet to use with the MultiplicativePriceFeed. Although, this solution will function as expected, the description and some identifiers describe its intended use with a stETH/ETH price feed instead. Consider creating a duplicate contract with updated description and identifiers to avoid possible confusion.

The misconfigured BTC/USD price feed address was resolved.

Notes & Additional Information

Prevention of ENS Record Mismatch

As part of the migration process, the address of every deployed market is added to the v3-official-markets record of the v3-additional-grants.compound-community-licenses.eth domain. This record value is determined during development and constructed in the migration script before proposal. The setText method of the ENS Resolver used in this migration only allows replacing the current value with a new value. There is a chance that this proposal can unintentionally remove recently added market details or include the anticipated effects of defeated proposals.

To prevent such a scenario from occurring, consider these options:

Use setText One Proposal At a Time

Wait until all proposals that use setText to update the ENS record have either executed or failed before constructing the record text set by setText. If another proposal is submitted after record construction and before proposal, wait and reconstruct. If any another proposal using setText to update the ENS record is proposed, cancel all but one of the active proposals that have not been defeated.

Call a Wrapper of setText

Create and deploy an audited contract and method that constructs the ENS record text at the time of proposal execution so that the value is set correctly even if the ENS record changes after proposal. Use the value of the ENS record at the time of proposal execution with the new chainId, baseSymbol, and market address mapping to determine the new text value to set with setText. Calling this new wrapper method, instead of calling setText directly as a proposal step, will preserve the current record value and only insert the new market details without the risk of overwriting the changes of another proposal. This option is compatible with any number of other concurrent proposals using the same wrapper method.

Update: Unresolved by commit ea783f7. The script reads the curent ENS record at the time of proposal and inserts market mappings of proposals pending execution as of the date of the commit so that this Mainnet USDT Market can be proposed before the pending proposals are executed. This implmentation assumes all proposals are executed in order will overwrite any unanticipated changes to the ENS record that occur between proposal and execution.

Conclusion

Upon reviewing the calldata generated by the migration script, we found one medium severity issue and one informational severity issue. Apart from this, the proposal has been correctly created and follows all current recommendations.

2 Likes

USDT Mainnet Market

PR - On chain USDT Mainnet market by dmitriy-woof-software · Pull Request #862 · compound-finance/comet · GitHub

Last commit + last audited commit changes - Comparing ea783f77275d506018cbab4915d91ab57c8a8b11...aaf5418caa512adfc205e125bd854d8af22e6420 · woof-software/comet · GitHub

Actions

  1. Run Slither. Fails. :x:. On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  2. Forge test. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  3. Gas Profiler. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  4. Scan. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  5. mainnet-usdt Scenario. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  6. Unit tests. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  7. Eslint. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  8. Contract linter. Success.:white_check_mark: On chain USDT Mainnet market · woof-software/comet@241f33a · GitHub
  9. Deploy. Success. :white_check_mark: Deploy Market · woof-software/comet@aedec92 · GitHub
  10. Prepare migration. Success.:white_check_mark: Prepare Migration · woof-software/comet@241f33a · GitHub
  11. Enact migration with impersonate. Success.:white_check_mark: Enact Migration · woof-software/comet@241f33a · GitHub

Description we use:

Initialize cUSDTv3 on Ethereum Mainnet\n\n

Proposal summary\n\n

FranklinDAO team with advice support from Woof Software team proposes deployment of Compound III to the Ethereum Mainnet network. This proposal takes the governance steps recommended and necessary to initialize a Compound III USDT market on Ethereum Mainnet; upon execution, cUSDTv3 will be ready for use. 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 off of the recommendations from Gauntlet.\n\n

Further detailed information can be found on the corresponding proposal pull request, deploy market GitHub action run and forum discussion.\n\n\n

Proposal Actions\n\n

The first proposal action sets the CometFactory for the new Comet instance in the existing Configurator.\n\n

The second action configures the Comet instance in the Configurator.\n\n

The third action deploys an instance of the newly configured factory and upgrades the Comet instance to use that implementation.\n\n

The fourth action configures the existing rewards contract for the newly deployed Comet instance.\n\n

The fifth action reduces Compound’s cUSDT reserves and transfers it to Timelock, in order to seed the market reserves for the cUSDTv3 Comet.\n\n

The sixth action transfers reserves from Timelock to the cUSDTv3 Comet.\n\n

The seventh action updates the ENS TXT record v3-official-markets on v3-additional-grants.compound-community-licenses.eth, updating the official markets JSON to include the new Ethereum Mainnet cUSDTv3 market.

Hello Compounders! Mainnet USDT market on Compound V3 started its on-chain pipeline.

  1. Proposal - Compound USDT Market Proposal
  2. Migration run - Enact Migration · woof-software/comet@241f33a · GitHub
  3. On-chain transaction - Ethereum Transaction Hash (Txhash) Details | Etherscan

We are looking forward to your support in voting!

1 Like

Proposal 268 Review

OpenZeppelin confirmed that Governance Proposal 268 matches the scope we reviewed with the following changes:

  • The factory, comet proxy, and comet ext addresses are different but the deployed bytecode are the same.
  • BaseMinRewards decreased from 1MM USDT to 100k USDT.
  • MultiplicativePriceFeed contract is used to combine wstETH/ETH and ETH/USD price feeds for pricing wstETH in USD.
1 Like

Hey! Avid Compound user here. I noticed that the smart contract has been deployed (TransparentUpgradeableProxy | Address 0x3afdc9bca9213a35503b077a6072f3d0d5ab0840 | Etherscan) with USDT supplied, collateral supplied, and USDT borrowed. The front end isn’t available on the website yet, but is it possible to earn the daily COMP rewards by launching transactions on my own rather than using the front end? Are there any security concerns? Thanks :slight_smile: @dmitriywoofsoftware @jbass-oz

Hey. You can already use this market using etherscan. It should be live on the frontend shortly.