TrueUSD Listing Proposal [Stay tuned]

Hello, everyone from the Compound community. I am from the TrueUSD team. Our team would like to propose listing TrueUSD on Compound.finance.

We prepared 100,000 COMP and are ready to create the proposal at any time. However, we would love to hear the feedback from the community before we take the action. We also believe that compliance and transparency, the core value of TUSD will shine in the Defi realm with the help of the prosperity of the Compound ecosystem.

We need your support to help us to get listed!

Overview

TrueUSD (TUSD) is the first independently-verified digital asset redeemable 1-for-1 for US Dollars. The ERC20 stablecoin uses multiple banks, escrow accounts, and third-party attestations to reduce counterparty risk, provide transparency, and prevent fraud.

TUSD offers liquidity on dozens of leading exchanges, DeFi protocols, and is supported by major OTC desks. TUSD also supports nearly instant minting and redemption speeds through the Silvergate Exchange Network (SEN) and PrimeX by PrimeTrust.

TrueUSD has built a bank-level compliance department that in unison with TrueCoins escrow partners ensures that only approved users can mint or redeem TrueUSD.

Token

  • Symbol: TUSD

  • Blockchain Type: ERC20, Avalanche, Binance Chain

TrueUSD in DeFi

Highly compliant and transparent stablecoin TUSD has now been listed on multiple DeFi platforms. Not only does TUSD have a high ranking among stablecoins in many rating agencies, but also in APR ranking on DeFi platforms.

On Curve.fi, there is a TUSD Metapool, by staking DAI, USDT, USDC, and TUSD, users can enjoy trading fee share and CRV mining rewards. The reward is currently around 30% and will reach 40% with an accelerator. On Uniswap, by providing liquidity to USD/ETH, users can gain a 17% APR. It can be a good choice when it comes to providing liquidity on Uniswap. As for SushiSwap, users can enjoy both trading fees and SUSHI mining rewards by providing liquidity of TUSD/wETH and the APY is up to 45.08% on Onsen.

Proposal Details

The details for TUSD on Compound are as follow:

  1. Set collateral factor as 0%

  2. Set reserve factor as 7.5%

  3. Set TUSD with unlimited borrow cap.

  4. updates the Compound price feed to peg TUSD to $1

  5. Using JumpRateModelV2 as the interest rate model.

Contract information

  1. cTUSD contract has been deployed at 0x12392F67bdf24faE0AF363c24aC620a2f67DAd86

  2. Change to a new oracle with TUSD support

Comptroller._setPriceOracle(0x4007B71e01424b2314c020fB0344b03A7C499E1A)

  1. Add TUSD into the market

Comptroller._supportMarket(0x12392F67bdf24faE0AF363c24aC620a2f67DAd86)

  1. Set reserve factor of cTUSD as 7.5%

cTUSD._setReserveFactor(75000000000000000)

If you like to know more about TUSD, you can find us here :point_down:

Social Media

TrueUSD.Website: https://trueusd.com/

Twitter: https://twitter.com/tusd_official

Medium: https://trueusd.medium.com/

Telegram EN: Telegram: Contact @TUSDofficial_EN

Telegram CN: [Telegram: Contact @TUSDofficial_CN

](Telegram: Contact @TUSDofficial_CN)

Yours,

TrueUSD

4 Likes

What kind of tests have been done on the new oracle? Has the new token been simulated? I am seeing a lot of assets without prices currently UniswapAnchoredView | Address 0x4007B71e01424b2314c020fB0344b03A7C499E1A | Etherscan

I’m excited to see you all moving forward with this!

1 Like

Hi, Jared
The contract 0x4007B71e01424b2314c020fB0344b03A7C499E1A has been certified by Compound team
We will also discuss with the Compound team to launch the price feed of non-stable coins before it’s been completed

TrueUSD contract simulation progress update

Hello, everyone from the Compound community. After the last time we posted the proposal on Compound forum, we have been diligently preparing the contract and we consider it a good time to update progress.

Simulation summary
The execution of the proposal and the TUSD market were simulated using ganache-cli with Alchemyapi for archived data. The contract forked at block height 12269785.

Contracts details
cTUSD: 0x12392f67bdf24fae0af363c24ac620a2f67dad86
New oracle address: 0x4007b71e01424b2314c020fb0344b03a7c499e1a
Governance: 0xc0da02939e1441f497fd74f78ce7decb17b66529
Comptroller: 0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b

Proposal execution
In the simulation process, the proposal could be successfully activated, voted, queued and executed.
The simulation process includes call the propose function in the governance contract and use bytecode below for transaction:
0xda95691a00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002e0000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000000030000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b0000000000000000000000003d9819210a31b4961b30ef54be2aed79b9c9cd3b00000000000000000000000012392f67bdf24fae0af363c24ac620a2f67dad8600000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000185f73657450726963654f7261636c65286164647265737329000000000000000000000000000000000000000000000000000000000000000000000000000000175f737570706f72744d61726b6574286164647265737329000000000000000000000000000000000000000000000000000000000000000000000000000000001a5f73657452657365727665466163746f722875696e74323536290000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000200000000000000000000000004007b71e01424b2314c020fb0344b03a7c499e1a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000012392f67bdf24fae0af363c24ac620a2f67dad860000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000010a741a4627800000000000000000000000000000000000000000000000000000000000000000052261626322000000000000000000000000000000000000000000000000000000

New TUSD markets test

  • New oracle is set up correctly with the address
    0x4007b71e01424b2314c020fb0344b03a7c499e1a
  • New market for TUSD is set up correctly
    Call markets(0x12392f67bdf24fae0af363c24ac620a2f67dad86) get:
    0000000000000000000000000000000000000000000000000000000000000001
    0000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000

It indicates that the TUSD market is approved, while it can’t be used as a collateral asset and receive COMP rewards.

  • ReserveFactor
    Call reserveFactorMantissa() and get:000000000000000000000000000000000000000000000000010a741a46278000 (75000000000000000) as the value

New TUSD market is also simulated for supply and borrow scenarios, with an account supplied COMP and borrowed TUSD from the cTUSD contract.

The testing includes:

  1. COMP price (489655000) is successfully read from the new oracle contract when calculating the collateral value.
  2. TUSD can’t be borrowed when its total asset value exceeds 60% of the COMP value. TUSD could be borrowed when the asset value is lower than the amount.
  3. During the getAccountLiquidity function test, the value changed to liquidatable when the simulation time passed.

Since the proposal has been created and been successfully simulated, we are now ready to activate and launch the 「Add TrueUSD Support」proposal.

We are happy to hear your voice regarding this proposal. Also, we strongly need your support to help us get listed on Compound!

2 Likes

Great progress @Joyce! Is there somewhere the community can review the source of the simulation script you ran for verification (e.g. a github link)? I’m very excited to see this proposal finally get made :raised_hands:

3 Likes

Hi, Jared. Thanks for the support. Below is the GitHub link including the source of the simulation.

https://github.com/rpunk/compound-simulation

1 Like

Thanks for sharing these and all the effort you put in @Joyce!

Since I think its important we keep the quality bar high for changes to the core protocol, I want to point out some things that I think could be improved here. Its not 100% clear to me what these functions are doing (the tx data is hardcoded everywhere), and I think its unnecessarily difficult to run/replicate these tests (due to the timing concerns).

I think the single-script simulations that we have many examples of at this point in the repository should really be the norm. My team at Compound will be focused on making this easier and lowering the bar on contributions here over the next few months.

However all that said, I do believe this sim is probably doing what it’s supposed to be doing, though I hope others will take a look in order to strengthen the overall confidence of the community.

2 Likes

Can the proposal team or other community members post a diff showing changes from Compound standard smart contracts and the ones deployed for adding TUSD? Even better would be including explanations with each addition or deletion to explain why it was needed.

1 Like

TrueUSD is supported on Aave, the risk parameters and market overview can be viewed here for comparison:

TrueUSD is supported as collateral for DAI (MakerDAO/Oasis). Here are some resources for review.

1 Like

This is definitely one of the most important aspects of a proposal like this which True left out of the discussion. The contracts used are relatively old versions of the cToken delegate and delegator contracts—I was able to successfully match the cToken contracts to the code in commit bc3435f8d9a44e991e830b717b1062d732e0e50f.

I’ll try to simulate the proposal through our customary methods and march the oracle tomorrow.

3 Likes

Security of tokens added to Compound is important as any vulnerabilities of supported tokens can directly impact Compound itself. Here are some security related articles for TrueUSD for our users to review.

TrustToken has some TrueUSD related security resources posted online.

Regarding the Oracle code, the only change seems to be updating to the latest UniswapAnchoredView from Compound code repository here: open-oracle/UniswapAnchoredView.sol at master · compound-finance/open-oracle · GitHub

Here is output from a diff of the Old Oracle and New Oracle contract code verified on Etherscan.

<         if (config.isUniswapReversed) {
<             // unscaledPriceMantissa * ethBaseUnit / config.baseUnit / expScale, but we simplify bc ethBaseUnit == expScale
<             anchorPrice = unscaledPriceMantissa / config.baseUnit;
<         } else {
<             anchorPrice = mul(unscaledPriceMantissa, config.baseUnit) / ethBaseUnit / expScale;
<         }
---
> 
>         // In the case of non-ETH tokens
>         // a. pokeWindowValues already handled uniswap reversed cases, so priceAverage will always be Token/ETH TWAP price.
>         // b. conversionFactor = ETH price * 1e6
>         // unscaledPriceMantissa = priceAverage(token/ETH TWAP price) * expScale * conversionFactor
>         // so ->
>         // anchorPrice = priceAverage * tokenBaseUnit / ethBaseUnit * ETH_price * 1e6
>         //             = priceAverage * conversionFactor * tokenBaseUnit / ethBaseUnit
>         //             = unscaledPriceMantissa / expScale * tokenBaseUnit / ethBaseUnit
>         anchorPrice = mul(unscaledPriceMantissa, config.baseUnit) / ethBaseUnit / expScale;

I didn’t verify the configuration set in the New Oracle so hopefully the simulations are sufficient for that.

@rafael.cosman and @Joyce I see that the TUSD proposal was queued in the timelock within the last hour. In 48 hours it will be able to be executed. Before that happens we will need fresh prices posted to the new PriceFeed (Oracle). Can someone from your team post new prices between now and then? With the recent volatility we will probably want price updates right before the proposal executes as well.

Congratulations on the success of your proposal! :slight_smile:

1 Like