Proposal to add MaticX to Aave v3 Polygon Market

Hi Everyone :wave:

Please see below our risk assessment for maticX. Please do comment on the risk assessment.

maticX - Aave v3 Polygon Market Risk Assessment

General

Stader is building a native staking smart contract platform spanning multiple networks that enables users to develop staking-related applications on top of Stader infrastructure. Stader’s staking solution for the Polygon network is maticX.

maticX is an ERC20 receipt token which represents staked MATIC and a portion of the staking rewards. In crafting maticX, Stader carefully selects validators based upon performance, safety, decentralisation and the commission terms to ensure users receive the best user experience. Of the top 100 validators, the top 6 make up more than 50% of the staked MATIC. As a result, Stader has elected to work with validators who have less than 1% of the total staked MATIC market.

At the time of writing, 30/07/2022, the data in the table below provides insight into the maticX’s state on Polygon Network.

Note:

  1. Subset of Ethereum circulating supply which has passed through the bridge
  2. Smart Contracts such as liquidity pools are counted as 1 in this figure
  3. Bridge contracts feature in this figure

maticX token on Polygon represents a claim on maticX deposited into the Ethereum to Polygon bridge contract. The maticX token on Ethereum represents a claim to MATIC token deposited into the MATIC staking contract. Thus, maticX on Polygon represents stake MATIC on Ethereum via the bridge.

maticX Ethereum Network: 0xf03A7Eb46d01d9EcAA104558C732Cf82f6B6B645
Ethereum to Polygon Bridge: 0x40ec5B33f54e0E8A33A975908C5BA1c14e5BbbDf
maticX Polygon Network: 0xfa68fb4628dff1028cfec22b4162fccd0d45efb6

maticX Smart Contract Risk

MATIX has been audited by ImmuneBytes and Halborn. An extract from the Halborn Audit “Halborn identified some security risks that were mostly addressed by Stader Labs team.” Only two informational findings were not attended to and all non informational risks have been addressed.

From the Immunebytes audit the following extract summarises the audit process “Stader Labs team has Acknowledged/fixed the issues based on the auditor’s recommendation.” The Immunebytes engagement finished on the 26th April 2022 and recommended Stader run “a bug bounty program as a complement to this audit is strongly recommended.”

Stader launched a bug bounty program of up to $1M for critical bugs on the 25th April 2022 which is still ongoing to this day. The details of the program can be found here and to date no bugs have been found.

Polygon Bridge Risk

The Polygon <> Ethereum bridges have an outstanding $2M bug bounty on Immunefi. Further information on the bridges can be found here. As the Polygon market already utilises receipt tokens from the Ethereum bridge, deeper analysis has not been performed into the security on the bridge contracts administered by the Polygon community.

maticX Counterparty Risk

maticX is the core contract which acts as a receipt tokend for staked MATIC. maticX can be acquired on Polygon and mainnet. Both means of acquiring maticX utilise the same contract address on Polygon. maticX is a non-rebasing token, which means that the amount of tokens in the user’s wallet is not going to change. Over time, while rewards are accumulate, the value of the maticX tokens increase relative to MATIC.

Administration

The contract is governed by a 3 of 5 multi-sig with named signers and majority are not Stader core team, like DefiDad and Aishwary from Polygon Foundation. The details can be found here.

The multi-sig mentioned above administers over the following parameters:

  • setBotRoleAdmin Admin for off-chain bots to update the exchange rate of maticX periodically
  • setFeePercent Set the Stader’s commission of the staking rewards. Set to 10% currently
  • setInstantPoolOwner Set to Stader’s instant pool owner to offer maticX at a cheaper gas fee
  • setValidatorRegistry Set the address to point to the contract wrapper for validator operations
  • setFxStateRootTunnel Set the Polygon root tunnel used for communication of exchange rate of maticX <> Matic from Ethereum onto Polygon
  • setVersion Used for marking a version of code
  • PauseContract Pause deposits, withdrawals, claims. Only meant to be used in critical situations
  • Upgrade Contracts Only meant to be used in critical bug fixes

Fees generated by maticX are routed to the Stader Treasury wallet which is a Gnosis Safe controlled by a 2 of 3 multisig consisting of members of the Stader core team. 2 signers of the Treasury are also on the maticX product multisig.

Deposits

Users are able to stake MATIC natively on Polygon up to the threshold of 1.55M wMATIC per refill. It takes around 3 hours to refill the contract when Users have deposited MATIC. Users will receive maticX in the next block upon completing this transaction. For MATIC holders on Ethereum there are no limitations on how many units of MATIC can be staked each day. Upon receiving maticX on Ethereum users are required to bridge the asset to Polygon Network. Bridging from Ethereum to Polygon Network is expected to take around 7-8 mins.

Withdrawals

Withdrawals for maticX range from instant up to 3 days for Users. Users can effectively unstake maticX in one of three ways detailed below:

  • Unstake maticX directly on Polygon which takes 50 hours.
  • Bridge maticX to Ethereum and unstake which takes 50 hours.

The 3 day withdrawal period is lower than some alternatives on the market and is expected to support a tighter secondary market spot price relative to the fundamental value of the receipt token’s claim.

maticX Market Risk

Oracle Details

Chainlink Oracle: Calculated maticX/USD Oracle 0xfccff2a3E9d52d655860647aEdBD133929f988e6

Chainlink has developed an oracle feed for maticX/USD on Polygon that is calculated from the MATIC/USD oracle and the staked MATIC yield derived from the POS network. The oracle does not utilise maticX decentralised or centralised exchange liquidity spot pricing. The MATIC/USD Chainlink oracle derives its pricing feed from the spot trading price of MATIC on decentralised and centralised exchanges.

This type of oracle is beneficial for users seeking to use maticX as collateral, especially when recursively depositing maticX and borrowing MATIC, as the price feed is independent of spot market price fluctuations. However, for liquidators this oracle may diverge from spot pricing which means some loans risk being miss priced in terms of valuing the collateral. The unstaking withdrawal period is around 2-3 days. A key benefit for users is Stader withholds some liquidity that enables Users to redeem MATIC near instantly via their User Interface (UI). At the time of writing, around 225k maticX units could be exchanged for MATIC on Polygon via Stader’s UI.

When considering the price of maticX/MATIC on decentralised exchanges on Polygon, this dune chart shows the hourly data, here. This data period spans the stETH/ETH price volatility and the UST to zero events of May/June 2022. During this challenging time for markets and the spot price of maticX held up well.

Liquidity Details

The table below summarises the status of maticX liquidity at the time of writing. Using 1inch Networks Aggregation Protocol, at the time a $5.9M of wMATIC position can be converted to maticX for 5% price impact with most of the liquidity sourced from the Balancer v2 pool.

References:

Balancer v2 Dune
Quickswap Dune
Meshswap

Of the 334 depositors into the Balancer liquidity pool 332 have deposited into the Balancer Gauge to earn BAL rewards. 25.6% of the funds deposited into gauge is by one address which is labelled Sphere Finance Deployer on Polyscan. The next largest depositor is 13.35% of the gauge’s deposits.

99.3% of the liquidity in the $5.1M Quickswap pool has been deposited into the staking contract to earn an APY 11.62%. The three largest liquidity providers in the exchange pool make up 62.2% of the total pool’s liquidity. The largest depositor in the pool makes up 31.9% of the liquidity.

The liquidity within the main liquidity pools is largely concentrated within a handful of wallets. This represents a risk to lending markets where liquidators rely on this on-chain liquidity to execute liquidations. Liquidators could unstake maticX which incurs a 3 day wait time which carries the risk of the asset price exposure changing during the unstaking period.

As of 30th July 2022 for maticX(wMATIC) using Coingecko data which commences 3rd May 2022:

As with stETH and sAVAX, this proposal recommends listing maticX with borrowing disabled.

Comments:

Having recently obtained a Chainlink oracle, maticX can be listed on Aave v3 on Polygon. maticX can be added as collateral in Isolation Mode with a Supply Cap in place. A Supply Cap of around $6M is suggested which represents half the market capitalisation of maticX on Polygon and also approximately the value of a trade with 5% price impact via 1inch’s aggregator at the time of writing. The Supply Cap should be revised to prevailing liquidity conditions.

The initial listing risks parameters for maticX are the same as those proposed for stMATIC with a revised lower supply cap reflecting the lower liquidity profile.

Given users may recursively strategy of depositing maticX, borrowing matic, swapping/staking it for maticX and then depositing maticX into Aave’s lending pool again, an E-Mode should be created between maticX and MATIC. The Supply Cap is intended to ensure there sufficient maticX liquidity remains across decentralised exchanges, as the strategy has the effect of transferring liquidity from exchange liquidity pools into lending pools. With a calculated oracle, the risk of being liquidated is lower and therefore it is expected the leverage strategies will be more aggressively pursued than the stETH strategy on Aave v2 on Ethereum.

The following Isolation and Efficiency Mode parameters would be a good starting place based upon current market conditions:

Supply Borrow Caps + eMode Parameters

The Efficiency Mode (eMode) parameters are a balance of used for other applications like sAVAX listing on the Avalanche market and for Stablecoins on Polygon.

Matthew Graham

5 Likes