*Borrowing is paused on Frontier. All INV stakers need to migrate their stake to FiRM to receive DBR APY*
Frontier is a money-market smart-contract protocol similar to Maker, Compound and Synthetix, but it facilitates capital efficient lending & borrowing via the issuance of synthetic tokens (eg DOLA) & or tokens deposited into Frontier (eg borrowing tokens such as ETH).
Frontier launched on the 25th February 2021 under the name Anchor.
Bad Debt Dashboard
In April 2022, Frontier (at the time named Anchor) suffered a severe exploit. Via a sophisticated and capital-intensive market manipulation, a hacker was able to withdraw over $15.6M in user funds. By successfully manipulating the price of $INV, the hacker heavily inflated the value of INV which was used as collateral. This allowed them to borrow millions from Anchor’s pools.
According to DeFi Safety and rekt.news, the hacker’s rather professional tactic revealed an unforeseen attack vector. In other words, this was not an obvious vulnerability. Altogether, the hacker was able to run away with 1,588 ETH, 94 WBTC, 39 YFI, and 3,999,669 DOLA (worth $15.6M at the time). For more detail on this exploit, refer to any of the resources shared above or the Inverse blog post.
A second exploit happened two months later. This time, Inverse Finance’s Frontier money market was subject to an oracle price manipulation incident that resulted in a net loss of $5.83 million in DOLA with the attacker earning a total of $1.2 million. The affected market—yvcrv3crypto—utilized Chainlink price data instead of the internal exchange rate of the Curve protocol, which allowed the attacker to flash-borrow 27,000 in wBTC and trade it into the tricrypto pool, which caused the price of the yvcrv3crypto LP token to jump in value in the eyes of the oracle. This created an opportunity to borrow DOLA against that collateral in Frontier. Read more about this incident here.
The two attacks left many Anchor users stuck with IOU tokens (called anTokens). Over 24% of the TVL at that time was stolen, leaving Inverse Finance with a significant bad debt. As an initial response, Anchor was paused and the team began working on solutions to repay the bad debt and reimburse affected users.
Repaying debt in a fair manner, where sophisticated users don’t hold an advantage, is hard. In the case of Inverse Finance, our most immediate priority has been to make sure that enough liquidity enters the system so that remaining loans can be liquidated. Had we not prioritized that, even more bad debt would have built up over time. However, as all liquidity that entered the system was sniped by liquidators, and any leftovers were quickly scooped up by sophisticated users running bots leaving regular users on the bottom rung, it was clear something had to be done.
A governance vote enacted the deployment of the DebtRepayer and the DebtConverter. These two contracts were developed to mitigate the impact to the DAO and to help users who want access to their funds sooner.
The Debt Converter contract lets users convert their stuck collateral denominated in YFI/ETH/wBTC to be DOLA denominated instead. It does this by letting affected users willingly transfer their anTokens to a converter, which issues them DOLA IOUs in exchange.
The motivation for the user is the ability to lock in a DOLA denominated value for their assets. The benefit for Inverse DAO is the ability to turn our debt from volatile tokens into stable coins. It also allows users, who are not quick to withdraw their funds, to gradually withdraw as InverseDAO repays its debt. DOLA IOUs will accrue interest with variable APY which is controlled by governance.
The contract allows users to convert their bad debt anTokens into an equal DOLA amount worth of DOLA IOUs. The anTokens will be valued at their current market price in dollars, which is fetched from ChainLink feeds. There is no discount for this debt conversion as there is for the Debt Repayer.
Governance can set a maxConvertPrice for each anToken which represents the maximum value this contract will pay per underlying token. For example, assume anETH has a maxConvertPrice of 1,500e18 & a market price of $1,600. A user that redeems 1 ETH worth of anETH will only receive 1500 DOLA worth of IOUs.
The core idea of the Debt Repayer is to let people pull their money out before others, if they’re willing to take a haircut doing so. This may sound punitive, but as it is opt-in, it’s a fair ordering mechanism that reduces the total debt burden. This means that every time someone decides to exit early, the date of the last repayment comes a little bit closer. Essentially, users that exit early will push forward the date of the last user to exit.
This contract allows users to redeem bad debt anTokens for the native asset that they represent, but at a discount. The smart contract works on a reserve basis, where as long as there is 15% or more of liquidity stored in the contract compared to the total outstanding debt, users can exit without any cut.
As Inverse Finance adds assets to the market and the debt reserves of the contract increase, the discount is reduced using a linear model with parameters set by governance. Those wishing to redeem their anTokens early, before much reserves have had time to accumulate, will take a steeper discount than those redeeming later when reserves are higher. anTokens will eventually be redeemable at one-to-one value with their underlying, once a certain threshold of reserves are met. What reduction in payout can a user expect below 15%? It depends on the total amount of reserves. The payout has a linear progression from keeping 45% of book value at 0% reserves, up to keeping 100% of book value at 15% reserves and above.
Reserve ratio is calculated for each asset by dividing the total amount in each V1 market by the borrow balance of the exploiter.
The debt repayer contract was deployed with the following parameters: Max Discount: 55% Zero discount reserve threshold: 15%. Both the minimum payout and the reserve requirements are subject to change by Inverse DAO governance.
The ETH/WBTC/YFI V1 market anToken discount is dynamic so please check the current exchange rate on the interface, and it was set to be redeemable at an initial discount of 55% when the debt repayment contract has a reserve ratio of 0%. The zero discount reserve threshold is 15%. As the Treasury Working Group dollar-cost average buys the bad debt assets, a proportion of these buys are sent to the debt repayment contract which causes the stores of YFI, Eth and wBTC in the contract to slowly fill, raising the reserve ratio for each asset. At 5% reserves, a user can redeem their Eth debt at a 36.6% discount. At 10% reserves, the discount falls to 18.3%. At 15% reserves or more, the discount will be at 0%.
Reserve ratios are calculated separately for each debt asset. If there is 75 ETH stored in the debt repayment contract, and there is 1,000 ETH currently stuck in the ETH V1 market on Frontier then the reserve ratio will be 7.5%, meaning currently the available discount is 27.5%. If a user with 34.5 ETH stuck in V1 markets decides to withdraw all of their ETH in this moment, they’ll receive 25 ETH from the debt contract (27.5% discount). This reduces the debt contract’s ETH balance to 50 ETH, and the reserve ratio to 5%, meaning that the next available discount to a user will be 36.6%.
At this point, the 34.5 ETH of anETH is sent to the TWG. The TWG can then use currently stored ETH in the Treasury to repay this full 34.5 ETH from the bad debt, meaning the new total of ETH in V1 markets becomes 965.5 ETH (1,000 - 34.5). The TWG will direct a proportion of ETH/WBTC/YFI assets for repayment to this contract. This proportion will be determined each time based on the current context of the repayment situation. The rest of the ETH/WBTC/YFI will be used for liquidations and adding liquidity to the V1 markets like before.
There are two types of DOLA bad debt:
- DOLA bad debt is debt that originated from a DOLA fed, ie the backing of DOLA.
- Debt that originates from users borrowing DOLA in Frontier without repaying (exploiter).