[DeFi] Masterclass on Collateralized Debt Protocols, Part 3: Alchemix

Guillaume Bonnot
5 min readDec 18, 2023

--

In this article, I will talk about Alchemix, the self-repaying loan protocol. Let’s find out what makes this protocol so resilient.

This article is the part of a series containing the following articles:
- MakerDAO v1
- MakerDAO v2
- Alchemix

Abstract

This article is going to show how a good design can make a protocol resilient to adverse effects.

First, we will talk about the concept of self-repaying loans introduced by Alchemix, we will see why it is both a brilliant and a terrible design choice, how the Transmuter helps keeping the price at peg, we will introduce the concept of Algorithmic Market Operator with the Elixir, and finally we will talk about the Curve exploit’s and how it affected Alchemix.

Self-repaying loans

Alchemix is a Collateralized Debt Protocol offering self-repaying loans. Several strategies yield strategies are supported from reputable protocols.

deposit DAI and use Yearn as yield strategy and borrow alUSD

Users can deposit ETH or a USD stablecoin as collateral and borrow Alchemix’s own synthetic of the collateral (ETH -> alETH, USD -> alUSD).

deposit ETH to stake with Frax and borrow alETH

Using synthetics and using the same denomination for the collateral and the debt, greatly reduces the default risk and allows it to never liquidate.

The protocol will regularly harvest the yield generated buy the chosen strategy, and use it to incrementally repay the loan on the user’s behalf.

Why it sucks

The concept of self-repaying loans is both brilliant and incredibly stupid.

It is brilliant because of how people’s brain is wired, most people hate paying interest on their loans and are willing to go an extra mile to make sure the debt is paid asap.

But its also incredibly stupid, because this is the worst financial decision for both the user and the protocol. Have you ever heard the famous quote: “Compound interest is the eighth wonder of the world.” ? There is a reason.

Compounding is where the money is made, investors should prioritize strategies that increase compounding, not reduce it.

Every time the user’s collateral’s yield is harvested by the protocol and used to partially repay the debt, it stops the compounding effect created by the yield. But in the mean time, it also decreases the fees paid to the protocol when reducing the outstanding debt.

This is a loose-loose situation: the user looses the compounding effect on its collateral and the protocol looses the compounding effect on the accrual of the fees.

Anyway, I love this protocol because this makes it very resilient.

The Transmuter

Alchemix’s Transmuter is used to convert base assets into synthetic assets back and forth (ETH <-> alETH, USDC <-> alUSD) on a 1–1 basis.

Converting from the base asset to the synthetic is straight forward, the user just deposits ETH and get the same amount of freshly minted alETH from the transmuter. This conversion is only useful when the synthetic asset is over-the-peg, otherwise the user is better off getting it, with a discount, from the open market when under-the-peg.

Converting the synthetic asset back to the base asset is more complex. Users who want convert it back must enter a kind of queue. Periodically, when the protocol harvests yields, a part of it is allocated to the transmuter and will be distributed pro-rata to users in the queue.

This mechanism can be very slow when there is a lot demand to exit the protocol and the peg is under sell pressure, but it is a great way to ensure the synthetic asset stays at-the-peg under normal conditions.

The Elixir AMO

The Elixir is Alchemix’s Algorithmic Market Operator (AMO).

An AMO is a smart-contract used to deploy the assets in the treasury using different strategies, in order to gain additional yields for the protocol.

For example, when users use the transmuter and deposit USDC against alUSD, the protocol new has USDC in its treasury. The Elixir is going to use those assets, and say, depositing it in Aave in order to get more yield.

the actual Elixir’s strategy

The AMO is a critical part of any DeFi project with an idle treasury and has 2 greatly beneficial effects on the protocol:
- more assets to back the outstanding debt, better collateral ratio
- more profits for ALCX holders

Curve’s Exploit

“On 30 July 2023, a number of Curve pools were exploited to the tune of tens of millions of dollars. Among these exploited pools was the alETH-ETH pool that is used to support the Alchemix ecosystem. […] This permanent loss amounted to 3,856 alETH in aggregate.”

This event caused the alETH price to substantially depeg, for the first time of its history. As we can see, before the hack, the price has always been oscillating near the peg, highlighting the robust design of the protocol.

At the time of writing, the alETH price is slowly coming back to the peg, following the decision by Curve’s DAO to compensate users who have by defrauded by the hacker. When the funds will be released by Curve, alETH should be fully backed again and the peg should be restored.

Conclusion

Alchemix has taken a very different approach to CDP that its competitors, with a very good risk management by utilizing yield bearing tokens to repay loans and denominating the loan in the collateral asset, removing the risk of liquidation for the user and the risk of systemic losses for the protocol.

Even after the recent hack, the protocol has shown its ability to stay pegged, showing the strength of its conservative design.

However, the design might a be bit too conservative for users who want to fully benefit from the collateral yields and their compounding effect.

Let me know what protocol you would like me to analyze next time !

If you liked this article, please share and subscribe !
Looking for a blockchain expert ? Let’s connect on
LinkedIn

--

--