Add Market: MATIC

1.Summary:

We would like to ask the Compound community to consider adding Polygon (MATIC) token as a collateral.

Many of the content is copied from MATIC collateral application on MakerDAO governance:

2.Applicant:

Stable Node. Stable Node was founded by Gustav Arentoft and Doo Wan Nam who are seasoned business development and growth professionals. We both spent about three years growing the MakerDAO protocol in the European and Asian markets. Stable Node invests and also assists with business development and governance.

Stable Node Twitter: https://twitter.com/StableNode

3.Interested Collateral:

ERC-20 Polygon (MATIC)

4.High-level overview of the project:

MATIC is the ecosystem token of Polygon Network (previously Matic) - a 100% EVM compatible L2 scaling solution with current TVL of more than $6B and 350+ dapps deployed across DeFi, NFT, Gaming and DAO space. With the recent rebranding Polygon has now expanded in scope and vision and have transformed into Polygon with the aim of becoming an Ethereum scaling aggregator - thereby providing developers with L2 solutions in addition to the POS/Plasma chain (mainnet launched April 2020), zk and Optimistic Rollups and Validum chains (part of the roadmap - as seen on website http://polygon.technology/).

5.A brief history of the project:

Matic team has been making valuable contributions to the Ethereum ecosystem for a long time, even before it’s public surfacing as Matic Network. This includes working on implementations of Plasma MVP, developing the WalletConnect protocol and the Ethereum event notification engine Dagger.

MATIC token has now been listed over 30 exchanges globally. In terms of market cap MATIC is valued at $9.5B and FDV of $14.7B (as of 8/28/2021). 24H trading volumes of >$800M make it one of top 30 traded coins across DEXs and CEXs.

Polygon POS/Plasma hybrid chain is a production ready L2 scaling solution that is 100% EVM compatible, decentralized with 88 validators and battle-tested with 200+ dapps building on it. Average txn/day around 200k and 260k+ wallet addresses. These numbers are increasing at a faster rate than competitors owing to the NFT craze and DeFi initiatives launched by dapps on Polygon.

You can check all the dapps building on Polygon here on awesomepolygon.com

6.Relevant documents:

Project - Website http://polygon.technology/

Whitepaper - Papers - Polygon Papers - Polygon | Ethereum's Internet of Blockchains

Document portal - Official documentation https://docs.matic.network/

Matic Asset codebase - Github GitHub - maticnetwork/contracts: Smart contracts comprising the business logic of the Matic Networ

Ethereum addresses - Etherscan $1.4021 | Matic Token (MATIC) Token Tracker | Etherscan

7.Audits:

Audits - Quantstamp audits 5_6190238193657316409.pdf - Google Drive

8.Community links:

Discord: Polygon

Reddit: https://www.reddit.com/r/maticnetwork/

Official forum: https://forum.matic.network/

9.The use case for the token:

The MATIC token lies at the heart of the Polygon ecosystem with multiple use-cases. Primarily the MATIC token is used for paying gas fees on the Polygon network. It runs the ecosystem, supporting top Dapps. Additionally you can participate in the Proof-of-Stake consensus of the blockchain as a validator node and earn 12-14% APY in MATIC tokens.

9.1 DeFi use case for the token:

MATIC is also used as collateral for various DeFi protocols including MakerDAO and QiDAO.

10.Where does exchange for the asset occur?

MATIC is one of top traded assets on all CEXs. On-chain pairs are most liquid on Uniswap and Bancor.

11.Oracle Integration:

Chainlink which supports Compound protocol also supports price feed for MATIC

12.Next steps:

We would like the Compound community to consider the application and assess collateral factor, reserve factor, and borrowing limit and put into a formal vote.

For reference, on Maker protocol, minimum collateralization ratio is 175%, stability fee at 3% and debt ceiling at 3 million, but are in discussion to increase to 50 to 100 million.

Thank you and let us know any questions and comments.

5 Likes

Hey Doo,

I’ll look into the Risk Assessment Questions more thoroughly tomorrow.

Risk Assessment Questions:
Moved to a seperate reply.

Addressing your questions:

Collateral Factor:

Collateral factor provides a buffer in which the borrower can be safely liquidated before becoming insolvent. Generally, assets are first added with 0% collateral factor.

Once the asset is added, we can compare MATIC to benchmarks to find the right CF.

Collateral factor should be lower for assets that are more risky for liquidators or Compound to hold. Collateral factor should be lower for assets with large centralized holdings compared to DEX liquidity. Collateral factor can be higher for assets with high DEX liquidity.

We may say MATIC is less risky than USDT (0% CF), but more risky than ETH (75% CF).

MKR (35% CF)

UNI (60% CF)

ZRX (65% CF)

Based on these numbers, MATIC may end up around 35% to 65% CF.

Reserve Factor:

Reserve factor directs some of the interest to insurance for the protocol. Over time, the growing reserves protect the protocol from insolvency. This could be needed if liquidation is too slow. For volatile assets, the standard reserve factor is 25%.

Borrow cap:

Each asset has a borrow cap. Once that much of the asset has been borrowed, no more can be borrowed by anyone.

Borrow cap accomplishes two things:

  1. It limits damage from a vulnerability leading to infinite minting of another collateral asset.

  2. It limits governance sway using borrowed funds.

Borrow cap may not matter until there are greater funds in the market. I’ve heard the Community Multisig has the ability to adjust the borrow caps, so we may not need to address borrow cap right now. Does Polygon use MATIC for governance? If not, we can leave borrow cap unlimited.

2 Likes

Thanks for this follow up and flurry for questions. Happy to answer all.

Quick clarification - Will existing cToken contracts work with MATIC?
If cTokens work with other ERC20s like MKR, wBTC - pretty sure they should work with MATIC (also a simple ERC20).

3 Likes

Risk Assessment Questions:
Q: How much CEX/DEX liquidity is there?
A: Coingecko provides info about liquidity/market depth. There’s much more liquidity across CEXs: ~$25mm -2% liquidity. Coingecko puts UniswapV3 -2% depth at $223k.

Uniswap depth comes from $7.62mm of MATIC liquidity on Uniswap V3.

Q: Which DEX has the most liquidity?
A:

Uniswap and Bancor

Q: How does liquidity compare to the Market Cap?
A:

In terms of market cap MATIC is valued at $9.5B

Q: Can the MATIC token contract be upgraded?
A: No.

Q: Does the collateral token contract have a fixed supply?
A: Yes. MATIC was initialized with the whole 10 Billion supply sent to msg.sender.

Q: Are there any large MATIC holders?
A: Ownership concentration: Here.

Contracts:
Each of these contracts has been audited.
MaticTokenVesting funds are controlled by the Polygon Foundation Multisig below.
StakeManagerProxy and Plasma DepositManagerProxy are upgradable by this 2 day timelock.
A 5/9 Multisig can execute from the timelock.

Multisig Wallets:

Other Wallets:
TODO: Are there any security procedures protecting these accounts?

  • Wallet holds 4.7% ($695,787,036).
  • Polygon (Matic) Mining & Seeding : Wallet holds 4% ($596,388,888).
  • Wallet holds 1.8% ($262,675,456).
  • Polygon (Matic): Marketing & Ecosystem : Wallet holds 1.5% ($230,363,933).
  • Wallet holds 1.5% ($224,381,950).

Q: Will existing cToken contracts work with MATIC?
A: Existing cToken contracts should work because MATIC is pretty standard.
The tokens are pausable. This could prevent liquidation if MATIC is added as a collateral asset.

TODO:
Who has the power to pause MATIC?
Under what circumstances will MATIC token be paused?

MATIC token is mostly standard OpenZeppelin contracts. The only new code appears to be the MaticToken constructor.

// File: contracts/MaticToken.sol

contract MaticToken is ERC20Pausable, ERC20Detailed {
    constructor (string memory name, string memory symbol, uint8 decimals, uint256 totalSupply)
    public
    ERC20Detailed (name, symbol, decimals) {
        _mint(msg.sender, totalSupply);
    }
} 

Q: How long has it been since the last exploit?
A:

There have been no exploits till date on the MATIC token thankfully. :slight_smile:

Q: How long has it been since launch?
A:

mainnet launched April 2020

According to etherscan analytics, MATIC token was deployed April 2019. I guess the system was deployed in pieces.

Q: What security issues were raised in the collateral token’s audit reports?

  • Are any of these relevant to its use as collateral in Compound?

A:
The Quant Stamp audit focused on Plasma Contracts. I don’t see any issues here about MATIC token. Nothing in the report seems relevant to its use as collateral in Compound.

I found a Nomic Labs audit of the MaticTokenVesting and MaticToken contracts.
According to the audit summary,

All issues have been properly addressed by the Matic team.

1 Like

There have been no exploits till date on the MATIC token thankfully. :slight_smile:

2 Likes

Thanks for progressing with the application. And while the process is different, Maker Risk Team has done a lot of work on looking at MATIC address and movement and etc as well. Hopefully, it will help with the process as well: [MATIC] Collateral Onboarding Risk Evaluation - Domain Work - The Maker Forum

Thank you.

2 Likes

It would be good to have some feedback on my deployment before deploying to mainnet.

Ropsten CToken: 0xdD3F345DdbB38ED1926B738bc9C026a5883d8051

npx saddle match 0xdD3F345DdbB38ED1926B738bc9C026a5883d8051 CErc20Delegator -n ropsten 0xc4c8c1125A91dA265d6bbcC868Fd115c5cfc40D4 0xcfa7b0e37f5ac60f3ae25226f5e39ec59ad26152 0x2341ba42eb00c63cf03559c9a2295a23ace7e4ad 200000000000000000000000000 "Compound Matic Token" "cMATIC" 8 0x2079A734292094702f4D7D64A59e980c20652Cae 0x0295a48b76bc68662bd15bfaecedca075a4f568f 0x

Labeled Parameters:

Underying: 0xc4c8c1125A91dA265d6bbcC868Fd115c5cfc40D4
Comptroller: 0xcfa7b0e37f5ac60f3ae25226f5e39ec59ad26152
InterestRateModel: 0x2341ba42eb00c63cf03559c9a2295a23ace7e4ad
InitialExchangeRateMantissa: 200000000000000000000000000
Name: Compound Matic Token
Symbol: cMATIC
Decimals: 8
Admin: 0x2079A734292094702f4D7D64A59e980c20652Cae
Implementation: 0x0295a48b76bc68662bd15bfaecedca075a4f568f
becomeImplementationDate: 0x

I think MATIC would be a great addition to the protocol.

Good work on deploying to ropsten; know the implementation you are using is an old version. Here is the current version.

2 Likes

I deployed cMATIC to mainnet.
CErc20Delegator : 0x944dd1c7ce133b75880cee913d513f8c07312393

Running saddle match, I get an error message about gas fees:

Error: Returned error: err: max fee per gas less than block base fee: address 0x9889EBA2bbbF0c7B11442d55397303D25d88F7Dc, maxFeePerGas: 50000000000 baseFee: 72015953262 (supplied gas 6000000)

@adam says:

This seems like eip 1559 bug. I think the solution is to wait for the gfx team to implement hardhat in place of saddle.

npx saddle match 0x944DD1c7ce133B75880CeE913d513f8C07312393 CErc20Delegator -n mainnet 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b 0xd956188795ca6F4A74092ddca33E0Ea4cA3a1395 200000000000000000000000000 "Compound Matic Token" "cMATIC" 8 0x6d903f6003cca6255d85cca4d3b5e5146dc33925 0xa035b9e130F2B1AedC733eEFb1C67Ba4c503491F "0x"

1 Like

Your deploy looks good. I’ll try to see if I can get the match to work on my side.

1 Like

Any updates on this? ETA on when MATIC goes as collateral and users can deposit funds?

Happy to help if any issues along the way.

1 Like

Here’s the new oracle contract.
It appears the old oracle contract code is the same as the new oracle contract code.

The ETH price returned by the oracle seems to match the old oracle and the MATIC price seems to roughly match coingecko.

The simulation passes:

…
Result {
β€˜0’: β€˜10000000000000000000’,
β€˜1’: β€˜384’,
β€˜2’: β€˜1003578883971642670’,
β€˜3’: β€˜40429985162’,
length: 4,
cashPrior: β€˜10000000000000000000’,
interestAccumulated: β€˜384’,
borrowIndex: β€˜1003578883971642670’,
totalBorrows: β€˜40429985162’
},
undefined,
Result {
β€˜0’: β€˜0x2f7e209e0F5F645c7612D7610193Fe268F118b28’,
β€˜1’: β€˜1000000003032248887’,
β€˜2’: β€˜5000000000’,
length: 3,
redeemer: β€˜0x2f7e209e0F5F645c7612D7610193Fe268F118b28’,
redeemAmount: β€˜1000000003032248887’,
redeemTokens: β€˜5000000000’
}
]
Action: CToken cMATIC: MaticHolder (0x2f7e…) redeems 5e+9 tokens
Command: Print β€œcMATIC integration ok”
cMATIC integration ok

2 Likes

Chainlink just finished setting up the new oracle contract with LUSD, RAI, & FRAX support. While MATIC is included in the current oracle contract, we’re going to take the opportunity to add MATIC to the protocol and switch the oracle contract over to the new one.

The new oracle contract is the same contract as the existing oracle contract. The config is the same for all current markets and includes the three new markets. Each new market uses a Chainlink oracle and a Uniswap v2 pool.

We expect the Matic addition to pass unanimously with a 0 CF listing. To reduce the amount of time Chainlink needs to update two oracles, the current and the proposed oracle, we’re submitting the changes together.

GFX Labs is introducing the oracle, so the groups/individuals interested in adding the assets have the opportunity to bring them to a vote. This is not a statement of support or opposition to their additions. Please review the new oracle contract and the cMATIC market. We are targeting to submit the proposal on Monday.

4 Likes

Hello everyone,

I wanted to follow-up on the recent proposal to list MATIC and expand on this statement:

It should be noted this asset addition has not been reviewed by Open Zeppelin. Given that MATIC is a well-established contract and the ctoken contract utilizes the current standard, there is a good precedent to support the asset addition. As usual, the proposal is to list MATIC with a 0 collateral factor. This allows Compound to onboard assets incrementally and safely.

As the proposal text says, the asset listing proposal hasn’t been reviewed by the OpenZeppelin security team. I discussed this proposal with @getty yesterday and conveyed my previous recommendation that the community wait to list new assets until OpenZeppelin could do an asset review and define a more secure listing process. However, it could be several more weeks before we have a complete plan in place for securing asset listings as we are wrapping up the Compound Protocol Audit this week.

The security risks here appear to be low for the reasons mentioned in the Proposal but I would advise the community to proceed with caution and with an understanding that integration risks are always present. As Security Advisor, I want the community to be aware of the risks in unaudited proposals so that the community can make an informed decision with the best interests of the DAO in mind.

3 Likes