MAI Stablecoin — July 2023 Analysis

Layer Ø
7 min readJul 20, 2023

General outlook and implications from the Multichain exploit

Is Multichain’s exploit having a cascade effect on the stablecoin?

The current situation of the stablecoin MAI — We attempt to get clarity between FUD and any legitimate doubts, also in relation to the problem emerged with Multichain.

Price and Peg

Currently the MAI token prices around 0.97 failing to recover the full peg with the dollar since about mid-March. In addition, the main pools to trade MAI are extremely unbalanced, having many MAIs and relatively few USDCs and/or other stablecoins.

See for example the following pools:

https://polygonscan.com/address/0x94d47616f45F98e1ac688326FFdAb7bf3A6be440

2,019,133 MAI
153,563 USDC

https://optimistic.etherscan.io/address/0xe54e4020d1c3afdb312095d90054103e68fe34b0

4,639,651 MAI
2,744,422 USDC

This implies that at the present time liquidity is very skewed and any MAI sales would have a significant impact on the price:

While MAI purchases have a marginal impact on its price:

Debt and Collateral

QiDAO governance reports that MAI is overcollateralized because the sum of the collateral is greater than the circulating MAIs. Unfortunately, we do not have up-to-date data in this regard as QiDAO’s analytics site (mai.watch) is currently under maintenance and there is no firm timeline to return live as the team is focused on dealing with the situation caused by Fantom/Multichain.

The latest reported data ($54M of collateral and $46M of MAI outstanding, see https://app.mai.finance/analytics) confirm that at the aggregate level the sum of collateral is greater than the MAI outstanding, unfortunately though, this does not necessarily mean that MAI is overcollateralized and that there is no risk. What matters are the individual positions and the presence of any bad debt; in fact, users’ positions in properly overcollateralized good debt cannot guarantee for any users in bad debt; moreover, QiDAO’s treasury has the authority to issue MAIs, the collateralization of which must be secured by treasury assets and not by collateral provided by individual users.

Why does the value of the total collateral not determine overcollateralization?

Or, better: why overcollateralization per se does not indicate the quality of the collateral?
The issuance of MAIs is normally done through vaults (‘safe’), somewhat as with DAIs: the vault opener must deposit a value of collateral in the vault (example: $100k value of ETH as collateral) against which he can request the issuance of new MAIs (example: $50k value of MAIs), which will then become a kind of “loan” to the vault holder. In this example, the vault holder is overcollateralized, because the value of ETHs as collateral adequately exceeds the value of MAIs issued.

Assume that there was another user who, after depositing $100k of a higher volatility collateral (example: Aavegotchi) issues another $50k MAI, the overall situation would present $200k of collateral and $100k of MAI outstanding. However, if the collateral used by the second user (Aavegotchi) were to suffer a major depreciation and that $100k became $20k of collateral, the total situation would become $120k of collateral ($100k ETH + $20k Aavegotchi) against $100k MAI issued, so in aggregate the total protocol would still be overcollateralized ($120k collateral > $100k MAI), but the MAI would be potentially insolvent if the first user decided to close its vault. In fact, if the person who opened the vault in ETH repays the MAIs and takes back the collateral by closing the vault, they take $50k MAIs out of circulation but also take $100k of collateral; the situation at this point would become $50k MAIs circulating vs. $20k collateral, hence insolvent.

What is the total amount of bad debt?

Until a few weeks ago QiDAO was publishing a dashboard showing the total amount of debt. The figure was about 28M MAIs. Unfortunately, though, as previously reported, this dashboard has been unavailable for a few weeks now, as it is in maintenance.

In contrast, no statistics have ever been published on bad debt. So unfortunately it is not possible to know whether MAI is currently solvent or not once any bad debt is subtracted.

However, we know that Fantom’s main tokens (USDC, USDT, Dai, ETH, WBTC) were issued by Multichain. What does this mean: often in other platforms they are bridged through a smart contract — such as the ETH on Optimism or on Polygon which lie on a smart contract deposited on Ethereum — but in Multichain’s case, Multichain acted as depositary/custodian of the assets backing up the value of these tokens, which were held in a Multichain multisig wallet; in exchange Multichain issued a token named as ‘ETH’ on Fantom. So basically all Fantom’s main tokens were native of Fantom (we can think of them as an IOU issued by Multichain), and after Multichain discontinuing operations they lost much of their value (USDC 0.26, USDT: 0.20, Dai: 0.13, ETH: 298.37, WBTC: 4058.77). These tokens were also used as collateral on Fantom. This potentially could have caused bad debt of between $1M and $2M (based on the latest available data that indicated about $2M of debt in Fantom’s vaults).

See, for example, the vault with Fantom’s WBTC collateral:

https://ftmscan.com/address/0xE5996a2cB60eA57F03bf332b5ADC517035d8d094

Total debt 1.03M MAI
Collateral 71.32 Multi-WBTC (value as of 07/20/2023: $289k)
(NOTE: Fantom’s oracles are not as reliable as they were before Multichain’s failure, so the real value of those 71 BTC is not over $1M, as Fantomscan reports, but much more likely less than $300k, as we assume)

So the WBTC vaults alone on Fantom to date have already caused over $700k of bad debt. Unfortunately, we do not know if there is any other bad debt prior to the Multichain situation and how much it is. It would be very helpful if the QiDAO team would provide a dashboard with accurate numbers to that effect.

What is QiDAO’s treasury debt?

To the bad debt of the vaults it is necessary to add the treasury debt, which is the amount of outstanding uncollateralized MAIs (not issued by the vaults). In fact, the treasury has the power to issue MAIs, which it does on a regular basis to facilitate the circulation of MAIs between chains, feed the vaults, and other purposes.

If these MAIs are out of circulation, e.g., remain on bridge contracts or in treasury wallets, they are assimilated to nonexistent MAIs.

Different matter if these are circulating. At this point it is therefore necessary to know how many total MAIs are in circulation.

Again, though, answering the question is not at all easy given the presence in the portfolios managed by MAIs, bridges, and null addresses of a huge amount of MAIs. There are 306M MAIs on Polygon alone, but our goal is to calculate the circulating, thus excluding those already burned or potentially nonexistent (because in bridges or treasuries).

To do this we rely on the estimate produced by MAI itself:

https://api.mai.finance/v2/circulatingMai

46M of MAI. 1.7x the amount of debt.

According to these numbers, MAIs collateralized with user vaults account for 61% of the total, while the remaining 39% are expected to be collateralized with QiDAO treasury assets.

Distribution of MAI circulating

So we are talking about 18M MAI circulating in excess than the vault debt that MAI’s treasury would have to meet itself with its own assets.

Again, though, the lack of up-to-date and comprehensive analytics does not allow us to tell whether or not the QiDAO treasury is really solvent. The only thing we can say is that, based on the data provided by the team (https://docs.mai.finance/functions/smart-contract-addresses), the treasury wallets should only have about $3.5M of assets spread over the following addresses:

0x3FEACf904b152b1880bDE8BF04aC9Eb636fEE4d8 ($739K USDC, $250K WMATIC)
0xf32e759d5f1c63ed62042497d3a50f044ee0982b ($500k ARB)
0xB1a8D1D6Dc07ca0e1E78a0004aa0bB034Fa73d60 ($455K OP)
0x8befba32e3f1b69b53cf72d3114afb1ce1871878 ($50K among ETH, stETH, OP, WBTC)
0xc63c477465a792537d291adb32ed15c0095e106b (221K USDC)
0x6ffcd0a428bde1ece553e326b9569a15b18be76c (56K USDC)
0x9d3c8a651e48e4d89ca5d1553035a4be3c17cfe6 (100K FRAX, 43K USDC)
0x93592880a2be33a0f15b543dbcd77522d344288a ($1.1M BIFI)
0xad95a5fe898679b927c266eb2edfabc7fe268c27 (35K USDC)

A dangerous precedent: market.xyz

About a year ago the treasury deposited several million MAI on the lending platform market.xyz unfortunately for them though, that platform became insolvent due to the huge bad debt developed by a user.

MAI’s treasury was then forced, in order to withdraw his own assets, to repay the failed user’s debt (8.4M of MAI lost) against the seizure of the same failed user’s collateral. However, the sale of this collateral only recovered about $600k, thus leaving a potential loss to the QiDAO treasury of about $7.8M. If confirmed, this loss would represent about 17% of MAI’s working capital (thus already alone well above the current 3% depeg).

The following transactions are shown below:

https://ftmscan.com/tx/0x4aa0aee29411fc1aa65bef8a7bdc0a5bc02c023956642af03209e76c85dca624 (LiquidateBorrow)
https://ftmscan.com/tx/0xa1e56b8455bc2456a8f9b2fe6ec4d9f77d77f65d20372b2525d4324b919c97d1 (LiquidateBorrow)
https://ftmscan.com/tx/0x1a8a58e5bd3de1a7715d097faec0afd6efcbde529b8238238e47e6c9873ccfcf (RepayBorrow)

A second dangerous precedent: (Vault MOOBifi)

In this case it was a MAI Vault’s collateral that depreciated quickly and caused bad debt. The treasury repaid 5.2M MAI of other people’s debts by seizing 7'170 BIFI of collateral, one half of which went to Binance (which at the value of BIFI at the time of transfer corresponds to about $1.5M) and the other half was staked on Beefy which at today’s value corresponds to about $1.1M.

So these operations may have created another $2.6M of potential bad debt.

Following are the transactions:

https://ftmscan.com/tx/0xd8bafcf8b2a068aa88c434946042e98267216b4a321fa8f47745c5fa678ece0c (LiquidateVault)
https://ftmscan.com/tx/0xab119eef6a6b8cf11463a86bd6814677582ae5f654692e0e6b37a25f6cd24739 (LiquidateVault)
https://ftmscan.com/tx/0x925e6f0612798a465235b77321c6d15070fc9d8da01d0bede5607b6e9b386562 (PayBackToken)
https://ftmscan.com/tx/0xd5bac8e93bdcce6b5abd431e09f81e4eccc97609fbbb0f8b1ad623a7b91f5ad0 (PayBackToken)
https://ftmscan.com/tx/0x1f764ebf5ae938f7e28bfc15c1e04ca96389dfa91d00dbb1251d8875531d2757 (PayBackToken)
https://ftmscan.com/tx/0x517e7273184516d1cfaf19a5cdb5f7fdf6caab93156bf8a7c86945acada2bc2e (PayBackToken)
https://ftmscan.com/tx/0x2bacdc759f99aafb5b699ceb8136f1e8f28fdd56198af7e293b11f246fa11f9e (LiquidateVault)

The open questions:

  1. What is the current data on the vaults debt and related collateral?
  2. What is the bad debt of these vaults and how much does it represent as a percentage of the total?
  3. What is the actual treasury debt? That is, the difference between MAIs in circulation and vault debt.
  4. What assets (other than the MAIs it can issue) does the treasury have to cover that debt?

Sources

On MAI:
MAI Finance, MAI Finance APP, MAI Finance Analytics
QiDAO Protocol Wiki

On Fantom’s exposure to the Multichain’s exploit:
Multichain Failure Hits Fantom DeFi: Assets Depeg Amid TVL Decline
Fantom Can’t Make Any Stablecoin Promises If Multichain Fails
Fantom Can’t Promise Anything With Stablecoins In Multichain Failure

--

--

Layer Ø

Occasionally sharing researches and thoughts around finance, technology, and the fascinating space where the two combine.