Skip to content

Gas Comparisons for Decentralized Stablecoins on Ethereum

author image @dittoproj

Here it is! My fourth and final entry in the multi-part series introducing DittoETH. In this post, I will cover the state of decentralized stablecoins on Ethereum and give a gas comparison of each. Be sure to catch up on the other parts of the series if you haven't yet:

There have been various attempts to create decentralized stablecoins, either using ETH as collateral or a protocol's own endogenous currency. MakerDAO was the first in 2017, introducing the concept of using a CDP (collateralized debt position) for opening and minting the stablecoin.

A year later, the first endogenous stablecoin, Synthetix, was released, followed by two other protocols that could be categorized as using their own endogenous token: Ampleforth and Beanstalk. While there have been others, many have failed since then, as endogenous currencies face potential breakdowns when demand for the token dries up. These protocols all employ various methods to mint their pegged asset.

SynthetixAmpleforthBeanstalk
Year Launched201820192021
DescriptionInitially synthetic assets protocol using its own token SNX for collateralizationStablecoin that is backed by internal rebasing tokenUses a dynamic peg mechanism with their endogenous token that incentivizes users to maintain a stable price
Stablecoin NamesUSDAMPLBean
Pegged AssetUSDUSDSoft peg to USD
Collateral TypeEndogenous: SNXEndogenous: AMPLEndogenous: BEAN
MethodCDPContracting and
Expanding Supply
Contracting and Expanding of debt-based supply that is sold to external exchanges

There are currently a few unique protocols that use exogenous collateral, specifically ETH. The most notable projects that differ from MakerDAO are RAI, Liquity, and crvUSD.

MakerDaoRAILiquityGHOcrvUSD
Year Launched20172021202120232023
DescriptionFirst stablecoin platform on EthereumDecentralized and immutable floating stablecoinDecentralized and immutable stablecoin with interest free borrowingDecentralized multi-collateral stablecoin, fully backed, transparent and native to Aave ProtocolCurve native stablecoin using LLAMMA for soft, continuous liquidations. Turns collateral into AMM that rebalances in price fluctuations.
Stablecoin NameDAIRAILUSDGHOcrvUSD
Pegged AssetUSDFloating to USDUSDUSDUSD
Collateral TypeExogenous: RWA, USDC,
ETH, LST, etc
Exogenous: ETHExogenous: ETHExogenous: VariousExogenous: ETH LST's,
wBTC, and tBTC
MethodCDPCDPCDPCDPCDP
Minimum Debt5,000 DAI~3809 RAI2,000 LUSDVariousNo Minimum
Fees1-3% Variable Annually0.5% Variable0.5% - one time of debt1-5% Variable1-5% Variable
Minimum C-Ratio~185%135%110%VariousVarious
Debt nameVaultSafeTroveVaultVault
Liquidation Fee10-33%10%200 LUSD + 0.5% of the
Trove's collateral
VariousAt least 1%

RAI was co-founded and architected by Nikolai Mushegian, an early and influential developer who primarily worked on MakerDAO and Bitshares. He built RAI out of dismay with the centralization taking place within MakerDAO. RAI functions differently from other stablecoins. Instead of aiming for a fixed price pegged to an asset, RAI floats and gradually veers towards a stable price over time. RAI is an intriguing stablecoin that remained true to the principles of immutability and decentralization. How could we have expected anything less from Nikolai? The only downside was its slow-moving peg to the ETH/USD price, resulting in it being over/under pegged throughout its duration. Ideally, users should have a more reliable fixed peg.

Liquity is a decentralized stablecoin that, like RAI, is censorship-resistant and exists without embedded governance in the protocol. Thus, Liquity is immune to oversight and regulation from centralized authorities and institutions. Instead of using liquidation functions to manage and remove bad debt from the system, Liquity employs a redemption mechanism allowing any LUSD user to redeem for the appropriate amount of ETH according to the oracle price. This mechanism functions like a bank, allowing convertibility of money in the bank account to cash at any point in time, which gives LUSD its underlying floor price.

CrvUSD is one of the more recent overcollateralized stablecoins that uses a method called Lending-Liquidating AMM Algorithm (LLAMMA). It essentially turns one's collateral into an LP position in an AMM that will rebalance during price changes. CrvUSD innovates on other stablecoins by allowing positions to be softly converted into other assets through AMMs or slowly liquidated over time via the LLAMMA mechanism. As a result, it can reduce risk and losses borne by the borrower compared to other systems. This design allows it to closely mimic Uniswap's V3 pools, where liquidity can be spread across different price points.

How does DittoETH compare to the rest? DittoETH is the first DeFi project on Ethereum to create a stablecoin using an order book instead of a CDP. Thus, one user can bid solely for the minted asset, such as dUSD, while another separate user can back the dUSD with ETH or ETH LSTs. Read CDP vs Order Book for more about the differences between the two approaches.

DittoETH
Year Launched2024
DescriptionDecentralized stable asset protocol that uses an order book
Stablecoin NamedUSD
Pegged AssetUSD
Collateral TypeExogenous: ETH LST's
MethodOrder Book
Minimum Debt250 - 2,000 dUSD
Fees10% of yield to fund insurance TAPP
Minimum C-Ratio~170% (initially at launch)
Debt nameShort Record
Liquidation FeeAt Least 5%

When comparing the various gas costs of each exogenous protocol, DittoETH's costs are comparable, if not cheaper, than the other projects despite using an order book.

DittoETHMakerDaoSynthetixRAILiquitycrvGravita[1]Prisma[1:1]GHO
Open CDP[2]474k596k459k611k527k1.1m587k656k619k
Increase Collateral90k234kN/A225k316k845k344k394k317k
Decrease Collateral93k252kN/A235k319k845kN/AN/A377k
Close CDP[3]228k434k455k412k619k1-2m507k540k677k

To compare between protocols[4], I calculated what it would take to create a CDP on DittoETH, which is still possible on an order book. This means a single user has to create both the minted asset and the short debt position backing it. Normally, an order book would only require a user to be on one side, which is more efficient compared to a CDP. The cheapest protocols for opening a CDP were Synthetix and DittoETH, using roughly ~460,000 in gas. This held true even when adjusting the collateral or closing the CDP. The most expensive overall was crvUSD, mainly due to the gas fees consumed when managing other AMMs.

Based on these comparisons, DittoETH represents a significant breakthrough for decentralized stable assets through its gas-optimized order book. Even when matching with a high number of 20 orders, the gas fees of DittoETH are still relatively similar to crvUSD. This raises an interesting point: it could be said that CDPs have been obfuscating and outsourcing their gas costs to AMMs, which can be quite high during the initial setup. Additionally, AMMs are often subsidized at the beginning to bootstrap liquidity. It would seem more efficient to have the liquidity in-house on the order book instead of having to bootstrap liquidity elsewhere on an AMM, which creates friction and fragmentation in liquidity depth.

# of matches on order bookDittoETH gas costs
5 Matched Trades530k
10 Matched Trades833k
20 Matched Trades1,608k

It's no surprise that DittoETH has similar or even lower gas costs compared to other stablecoin CDP protocols, as I've spent an enormous amount of thought and time optimizing it from scratch rather than foroking an existing codebase.

It's now entirely feasible to use an order book on Ethereum mainnet. DittoETH will bring back into the fold important concepts that were lost when CDPs became the norm for minting pegged assets.

If you're curious, give DittoETH a try for yourself. It is now up and running at ui.dittoeth.com.


  1. Fork comparisons, forks of Liquity that use LST's ↩︎ ↩︎

  2. this includes depositing collateral ↩︎

  3. this includes repaying and withdrawing collateral ↩︎

  4. see https://gist.github.com/ditto-eth/b105edd3e623c9dd9eca367fb04c053d ↩︎