Scaling DeFi on Harmony

Nick White
Sep 9, 2020 · 7 min read

There’s no question about it — DeFi is the break-out use case for blockchain.

In three short months, Total Value Locked in DeFi protocols grew tenfold from $1B to nearly $10B. Yield farming has supercharged this trend, enabling projects barely a few days old to attract hundreds of millions in liquidity. Perhaps most telling, any casual scroll through crypto twitter is full of flavor of the day DeFi memes — SUSHI, YAM, and PASTA to name a few.

Jokes aside, we’ve come a long way since the CryptoKitties craze. Instead of breeding virtual cats, we’re building a new financial system from the ground up. A financial system that is user owned, permissionless and antifragile. Yet all this progress on the application layer stands in stark contrast to the lack of progress at the protocol layer. All these revolutionary DeFi apps operate on the same blockchain that got clogged with kitties in late 2017.

If Ethereum 1.0 couldn’t handle CryptoKitties how can we expect it to handle the ongoing parabolic growth of DeFi?

Waiting on ETH 2.0

For the last two years in the depth of the bear market, the need for scalability seemed distant and waiting for ETH 2.0 seemed a safe option. After all, ETH 2.0’s highly scalable network with sharding and PoS was only a year from shipping. But the timeline was pushed back. And back again. And we find ourselves in the situation we are today.

As TVL in DeFi protocols increased by tenfold, so did average gas prices from 10 Gwei to 100 Gwei. On the one hand, high fees are a sign that Ethereum has found product market fit. If users are willing to pay that much to use the Ethereum network, they must really need the service. On the other hand, if gas prices continue to rise further the network may become impractical for the majority of users.

Recent spikes in activity give us a window into where things might be heading. On September 2, average gas prices on Ethereum reached an all time high of 480 Gwei, meaning a simple ERC-20 transfer costed ~$10 to say nothing of the more gas-intensive DeFi transactions.

This may be just the beginning. If DeFi grows yet another tenfold (which appears likely) average gas prices could reach as high as 1000 Gwei.

Consider how much this Ethereum user paid in just 7 calendar days.

Gas spending of an anonymous Ethereum user over a period of 7 days. Notice the 25 failed transactions!

For those users who can’t afford to pay thousands of dollars in fees, waiting is no longer an option. DeFi needs scalability… yesterday. But what if I told you that you didn’t have to wait?

If I told you ETH 2.0 was ready now, would you believe me?

Harmony is ETH 2.0

In 2018, Harmony set out to solve scalability at the protocol layer and independently arrived at a similar architecture to ETH 2.0. After 2 years of intense building we launched our mainnet featuring: sharding, staking, EVM compatibility, $0.000,001 fees and 5 second finality.

In effect we launched ETH 2.0.

I can almost hear you saying that claiming “Harmony is ETH 2.0” is just that — a claim. Where’s the proof?

Harmony’s DeFi Hackathon

A couple of weeks ago, the Harmony team set out on an internal hackathon to show the world — and ourselves — just how powerful our protocol is. We ported 6 of the most popular DeFi apps on Ethereum to Harmony: Maker, Balancer, Curve, Aave, yEarn and WBTC.

Harmony MakerDAO user interface.

We forked the smart contracts, deployed them on our mainnet, built front ends and shared them for testing. The results speak for themselves.

First, our hackathon demonstrated how easy it is to port smart contracts from Ethereum and deploy them on Harmony. Aside from changes in deployment and wallet interfaces, the solidity code could be deployed exactly as is with no changes.

Second, the hackathon demonstrated a huge difference in performance. 5 second finality is no joke. Having become accustomed to multitasking while waiting for Uniswap trades to settle, it was almost uncanny when my Harmony Curve swaps cleared instantly.

From a user’s perspective, the difference between waiting up to 15 minutes (or even having your transaction dropped) versus getting confirmation in a few seconds is huge. This is especially true when you have to execute multiple transactions in a sequence which happens often in DeFi.

Harmony Curve interface.

Third and most importantly, we demonstrated the potential for enormous cost savings. After getting used to the fact that DeFi apps are slow and expensive, DeFi apps on Harmony felt eerily similar to a Web 2.0 experience. Fast and virtually free.

I compared Balancer on Harmony side by side with Balancer on Ethereum. I simply wanted to join a pool as a first time user. This takes 3 transactions. Two transactions to grant access to the two assets you are pooling, and one to put your assets in the pool. Here are some stats:

It took me 17 times longer to join a Balancer pool on Ethereum than on Harmony and it cost nearly 700,000 times more.

Let that sink in.

Why Sharding Is Different

One criticism we receive is that Harmony is only cheap because there aren’t many users yet. In other words, if the current DeFi ecosystem switched over to Harmony it would only be a matter of time before we run into the same problems with exorbitant gas fees.

While it is true that gas fees on Harmony will increase with more users, our sharded architecture solves the fundamental problem behind high gas fees: limited blockspace.

For any non-sharded blockchain like Ethereum, the supply of blockspace is fixed. This means that with more users, you are forced to compete for the same amount of space for transactions, driving up gas prices. In a sharded network like Harmony, blockspace can be increased by adding more shards. So if gas fees ever get out of hand, more capacity can be added to bring gas prices back down to reasonable levels.

That’s right. On Harmony, you can say bye to crazy gas fees once and for all.

Yes, We Have A Bridge!

DeFi does not exist in a vacuum. It requires an entire ecosystem of assets to trade, lend and borrow. To accelerate the growth of Harmony’s DeFi ecosystem, we have built a bridge to allow ERC-20 assets on Ethereum to be ported over as HRC-20 assets on Harmony.

Once these assets have been bridged, they can take advantage of the speed and cost savings of DeFi applications on Harmony.

Check out the first version of our bridge at

Why It Matters

As usage of DeFi protocols continues to grow so will gas prices, leaving room for only the least cost-sensitive market participants. Whales alone will be able to afford the exorbitant fees while the little guys get priced out. This contradicts the very ethos of DeFi as an open financial system.

While DeFi proponents promote the idea of going “bankless”, they forget the people with the most dire need for DeFi are those that don’t have access to a bank in the first place. These people can’t afford a $1 fee, let alone a $50 one.

Left unchanged, Ethereum will gentrify. It will become the DeFi platform of the 1%. That’s fine. Let Harmony be the protocol that brings DeFi to the 99%.

BUIDL on Harmony

If you too want to build decentralized finance for the next million users, come build with us. If you too want DeFi to be economically accessible for emerging markets, come build with us. Or if you just want to build a DeFi product that is as fast and cheap as Web 2.0, come build with us too.

We have over $7 million in grants for people like you. Join 12+ grant projects already building on Harmony. Apply here and come chat with in us our grants telegram channel.

Become ONE with Harmony

Developers can build on Harmony today, a fast and open blockchain for decentralized applications, suited to handle DeFi and cross-border finance. Harmony Mainnet supports state sharding with instant finality. Our staking mechanism reduces centralization while supporting delegation and slashing.

We ❤️ Developers.

Telegram | Twitter | Discord | Youtube | Medium | Facebook | LinkedIn | Reddit | Instagram


To scale trust for billions of people and create a…