- Automated market makers (AMMs) have become popular as they reduce the expense of traditional orderbooks.
- Following after the popular DEX Uniswap, Balancer Labs offers multi-asset pools and lets anyone become a liquidity provider.
- The network enjoyed a quick boost following the launch of its BAL governance token.
The DeFi news category was brought to you by Ampleforth, our preferred DeFi partner
Share this article
Balancer Labs is one of the most talked-about DeFi projects in the space, and for good reason.
It ties up several key components from open finance while improving upon many of these components. It is also one of the more complex projects and poses unique dangers to novice DeFiers.
This complexity has not deterred from Balancer’s popularity, however. At the time of press, it is the number four project on DeFi Pulse with $135.8 million locked in. This sum would be higher if not for the latest exploit, which may have eaten away some hard-earned trust in the community.
The Crypto Briefing team has selected Balancer as this week’s Project Spotlight for all of these reasons.
Unlike our previous two editions, this week’s project has been live for several months and has attracted many notable investors. Moreover, we believe that the project has its merits despite the latest headlines. Indeed, this exploit reveals a much greater theme running through the DeFi space.
Open finance is nascent, complex and fraught with pitfalls. Studying Balancer offers readers insight into all of these issues.
What Is Balancer Labs?
Balancer Labs is an automated market maker (AMM) similar to Curve, Uniswap, Shell Protocol, and many others. Each of these projects offers its own variety of the AMM, which either differ or try to refine previous iterations.
But let’s begin with a broad overview of this tool and how it improves upon current financial tools.
Exchanges, crypto or otherwise, exist to fulfill buy and sell orders. They play an important role because they create a space for a large number of very diverse orders to find matches and be executed.
Solving for the diversity of orders, sizes, and varying prices is the critical function of an exchange. Rarely will an order have a perfect match on the other side, and so both sides of a potential trade may need to make a compromise of sorts to fulfill their order.
A seller may want to sell ten shares in Tesla (TSLA) for $100, but a buyer may want to buy seven shares for $85. After a short time, if neither order is filled, the buyer may raise the price to $95, and the seller may lower their price to $95. In this way, at least a portion of the trade can be made.
When demand (buyers) is low, then supply (sellers) must make more compromises in terms of price, which usually means the price of the asset drops. The opposite is true when demand is high, and supply is low. Ultimately, both buyers and sellers are looking to have their orders filled as fast as possible without losing too much value on the way to filling their orders.
Trying to bring this operation to blockchain technology, specifically smart contracts, comes with a variety of problems. The back and forth between buyers and sellers on a traditional exchange is quick and inexpensive. There are no gas fees or additional verifications needed to eventually match both parties.
Smart contracts, however, demand both expensive gas fees and more time to validate transactions. This means that each time a specific price is called, the smart contract consumes gas to meet this call. If we remember the above example, it can take several calls before the buyer and seller meet at the same price and settle the trade. This process is far too expensive for a smart contract.
AMMs turn this dynamic on its head. Instead of trading against one another, market participants interact directly with a smart contract. Price is determined differently, too. Continuing with the above example, the two assets in question are TSLA and USD.
The smart contract determines the price of each asset based on three variables: X, Y, and K.
In this example, let’s say that X represents TSLA, and Y represents USD. In this version of an AMM, we must supply an equal amount of both to create this market. For the sake of simplicity, let’s assume that one TSLA is equal to $100, and one USD is equal to $1.
If we wanted to supply $1,000 of each asset, then we would provide ten TSLA and 1,000 USD.
The variable K in an AMM is equal to X multiplied by Y, so ten TSLA multiplied by 1,000 USD. This gives us 10,000. In an AMM, the variable K is also the constant, meaning it can never change.
Each time a buyer or seller approaches this two-asset AMM, they’re essentially interacting with the balance of this equation. They swap their USD for TSLA and vice versa. As these activities occur, maintaining K, the constant, means adjusting the weight of USD and TSLA, respectively.
Uniswap uses this AMM structure, also known as a “constant product market maker” (CPMM).
Balancer, however, uses a different structure that follows a slightly more elaborate version of this. This version is called a “constant mean market maker” (CMMM).
Instead of merely two assets, Balancer allows users to include many more. This changes the above equation slightly, but the principles are the same.
For a three-asset pool, for example, one would apply the following equation: (X*Y*Z)^(1/3) = K. The weight of each asset adjusts to keep K constant.
One can thus consider AMMs as decentralized and immutable iterations of the traditional order book as we have come to know it. Within the AMM space, there are different players focused on slightly different objectives using variations to the AMM outlined above.
Competitors and Product Differentiation
Balancer’s arrangement goes beyond a simple trading platform and offers users new decentralized versions of traditional finance. Many have described Balancer as an automated index fund or a self-balancing ETF.
As mentioned above, anyone can add up to eight tokens to their Balancer pool. The token weights needn’t be perfectly balanced either. One example of a Balancer pool could be 50% DAI, 25% WETH, and 25% MKR.
Like any AMM, the above arrangement will ensure that the proportions within the pool remain constant no matter how the value of these three assets grows or shrinks.
And like Uniswap, two key demographics can benefit from Balancer: Liquidity providers (LPs) and traders.
Liquidity providers are pool owners. They may decide to make a pool to profit from trading fees via interactions with traders. This incentive is no different from Uniswap.
What differentiates Balancer in this regard is that LPs can effectively create a portfolio of their preferred ERC-20 tokens. They can then bring this portfolio over to the Balancer protocol.
But instead of buying and selling tokens to rebalance this portfolio themselves, LPs create a market (i.e., their personal pool) that lets traders and arbitrageurs do it for them. Thus, instead of paying fees to rebalance their portfolio, Balancer LPs earn the same fees to let others do it for them. These fees are customizable and can range from 0.0001% to 10%.
There are three kinds of pools: Private Pools, Shared Pools, and Smart Pools.
Private Pools means that there is only one LP in charge of monitoring the pool and changing its features. A Shared Pool is one in which parameters are permanent and cannot be changed. Anyone may add liquidity to this pool, and ownership over this pool is tracked using the Balancer Pool Token (BPT).
Smart Pools refer to a pool that is owned and operated by a smart contract. Anyone can add liquidity, and ownership is also tracked using a BPT.
For a full list of these tokens, as well as the pools they represent, click here.
Balancer has also recently released a governance token, called the Balancer Protocol Governance Token (BAL). Like many governance tokens, the Balancer team hopes the BAL token will incentivize the protocol’s key agents (i.e., traders, LPs, etc…) to participate in any potential changes made to the protocol.
According to the team’s FAQ section, these could include:
“Implementing new functionalities, deploying the protocol on additional smart contract blockchains other than Ethereum, using layer 2 solutions for scaling, introducing a protocol level fee, etc. Anything contentious will certainly go to the BAL token holders for review.”
Balancer Labs’ Growth Drivers
Since its launch in March 2020, Balancer has attracted many users. This growth has been accentuated thanks to the continued growth of the broader DeFi sector. As decentralized exchanges (DEXes) enjoy higher activity, using many of these platforms can help users earn extra profits.
For platforms like Uniswap and Balancer, these revenues are due to the trading fees that LPs enjoy for their pools. Since the launch of Compound’s governance token COMP, as well as Balancer’s BAL, this trend has exploded. DeFiers are now using the term “yield farming” to explain the trend.
Unlike tokenless competitors, both Balancer and Compound offer the added incentive of their respective tokens. LPs can thus profit from trading fees within their respective pools, as well as earning COMP and BAL tokens for their service.
As we saw with the COMP launch, this was a highly-lucrative, if not extremely risky, incentive.
— Bobby Ong (@bobbyong) June 21, 2020
Similar to Compound, each week, 145,000 BAL tokens are distributed to LPs proportionate to the amount of total liquidity they have provided to the protocol. The more liquidity, the more tokens an LP can earn.
Though the Balancer team has stated that this token isn’t meant as a speculative asset, it is an attractive bonus to entice new users to join the platform.
Drawbacks to Using Balancer
Unlike our previous two editions of Project Spotlight, Balancer offers readers a unique case study for some drawbacks to its platform. Earlier analyses of Shell Protocol and Furucombo were speculative insofar as the perceived disadvantages had yet to transpire.
This has not been the case with Balancer.
On June 29, 2020, a sophisticated smart contract engineer exploited the Balancer protocol for nearly $500,000. The nature of the exploit includes several complex crypto tools, a deflationary token, a critical understanding of ERC-20 tokens, and, of course, a flash loan.
Before continuing, the engineer used a flash loan from dYdX, and the deflationary token is from Statera (STA). Flash loans effectively let any user become a large-bag holder capable of shifting illiquid markets. What’s more, users can enjoy these funds without any collateral as long as they pay back the loan within the same transaction.
The STA token is deflationary because 1% of every transaction made with this token is destroyed. It was this particular feature that caused so many issues for Balancer. Now for the details.
Like many in the DeFi space, STA holders flocked to various yield farming platforms like Balancer. Relatively deep pools were created with this token, too. The pool in question on Balancer was made up of STA, WBTC, LINK, WETH, and SNX.
The attacker took out a flash loan for 104,000 WETH and then swapped STA for WETH 24 times. Each time this transaction was executed, 1% of the STA token was destroyed. Though the amount of STA technically dropped, the Balancer pool did not account for this drop. The amount of WETH in the pool ballooned while the STA steadily declined.
To profit from the imbalance, the engineer then sells the smallest possible unit of STA for a massive amount of WETH in the pool. For extended details of this attack, readers should review Crypto Briefing’s original coverage of the event.
This exploit is less a condemnation of the team behind the project. Instead, it affirms how nascent this space is and how difficult it can be to build autonomous financial products. In this particular case, however, one could argue that a deflationary token should never be included on Balancer.
Nonetheless, the Balancer team announced that they would refund all affected LPs in full. They will also be giving the highest bug bounty to HEX Capital. The HEX team had identified this issue shortly before the event occurred.
More on the thought process that the Balancer Labs team went through to decide on reimbursing all the liquidity providers who lost funds in yesterday’s incident.
Thank you to all community members who gave essential input to us reaching this decision.https://t.co/PQ686bAWYv
— Balancer Labs (@BalancerLabs) June 30, 2020
Gaming Balancer Liquidity Rewards
On Mar. 31, 2020, Balancer went live on Ethereum mainnet after over a year of planning, research, and development. But it was only a month and a half later, on May 15, that Balancer started to accrue real liquidity.
A protocol upgrade changed Balancer’s economic framework by introducing the BAL governance token. This is when the market saw a true incentive and jumped at the opportunity.
As of the date of the announcement, Balancer had $18 million of locked liquidity. Today that number is over $130 million.
Yet, despite having more liquidity than both Uniswap v1 and v2 combined, Balancer struggles with volume.
Its best day so far recorded just over $15 million in volume. Despite Balancer’s incredible liquidity, this isn’t translating into higher usage. A large portion of Balancer’s pools are sitting dormant but collect large paychecks by way of BAL every week.
At the time of writing, the top two Balancer pools that represent 18.5% of total liquidity are responsible for facilitating less than $90,000 of volume in the last 24 hours.
However, as a three-month-old protocol, Balancer deserves to be cut some slack. The growth the protocol has witnessed since inception is formidable. All that’s left is for the incentive to be refined so Balancer can compete with DeFi heavyweights like Uniswap and Kyber.
The personalities behind Balancer Labs keep a reasonably low profile.
Martinelli is an alumnus of Pantheon Sorbonne University and a serial entrepreneur who has founded three companies. Not much is known of McDonald, aside from the fact that he has been in crypto for a few years, creating a popular MakerDAO tracking tool MKR.tools.
Balancer bootstrapped with $3 million in seed capital. Placeholder VC’s Chris Burniske and Ash Egan of Accomplice led the funding round.
Community Engagement and Liquidity Test
The Balancer community can be found theorizing away to glory on a public Discord server with 3,000 members and growing. Balancer has a thriving community that has helped the team make important decisions – especially with regards to ensuring speculators do not game BAL rewards at the cost of users.
Although most of the discussion happens on Discord, future changes to the protocol will be facilitated by the BAL governance token.
A sleek UI ensures that using Balancer poses no problem for an intermediate DeFi user. The process of becoming an LP is just as easy. But an intuitive UI doesn’t make up for poorer trade terms.
Despite having more liquidity than Uniswap, Balancer cannot compare in terms of slippage – at least not yet.
Trading 10,000 USDC to LINK, for instance, results in 5.7% slippage on Balancer and 2.46% slippage on Uniswap.
On the contrary, Balancer can provide better rates for stablecoin-to-stablecoin pairs. This could be a temporary result of yield farmers using stablecoins to sit in Balancer pools but nevertheless offers an advantage over Uniswap for the time being.
Uniswap has better liquidity for almost every other ERC-20 token, barring stablecoins.
The DeFi ecosystem is becoming incredibly competitive. In particular, the battle between various DEXes.
On one side, there are AMMs like Uniswap, Curve, Bancor, and Balancer gaining significant attention and facilitating most DEX volume. On the other hand, DEXes like IDEX that run orderbook DEXes are attempting to make a comeback.
Traditional AMMs allow users to become market makers, putting dormant tokens to use. A Balancer liquidity pool can double up as a rebalancing ETF.
Balancer allows up to eight assets in one pool, giving it nuance beyond any AMM in existence. The future of the protocol looks bright if it can draw in more meaningful liquidity, establishing rates on par with current DEX leaders.