Balancer: a generalized Uniswap
Editor's Note: This article comes fromBlue Fox Notes (ID: lanhubiji), reprinted by Odaily with authorization.
Blue Fox Notes (ID: lanhubiji)
Blue Fox Notes (ID: lanhubiji)
, reprinted by Odaily with authorization.
On Balancer's official website, you can see that it is positioned as a "non-custodial portfolio manager, liquidity provider, and price sensor." For users who are new to Balancer, it is difficult to understand why it is a portfolio manager and a liquidity provider at the same time.
secondary title
Although there are many differences, in order to understand Balancer faster, Balancer can be simply understood as a generalized version of Uniswap. Because of this generalization, Balancer is endowed with characteristics different from Uniswap, resulting in different usage scenarios, which ultimately lead to path differentiation.Understand Uniswap in one article》《Both Uniswap and Balancer are AMM (automatic market maker) models, but Uniswap is more like a special version of Balancer, and Balancer is more like a general version of Uniswap. Uniswap is an automated token exchange protocol. It does not use the model of order matching, but the model of liquidity pool.》《In Uniswap's market maker model, its liquidity pool involves two types of tokens. When providing liquidity, liquidity providers must inject 50% of the value of each token into the liquidity pool. To exchange tokens in Uniswap is essentially to inject one token into the liquidity pool and withdraw another token at the same time, and its liquidity pool is a constant product.》)。
The liquidity provider provides the token pair to the liquidity pool, and its value ratio is 1:1. That is to say, for example, if you provide 100 MKR, you need to provide 221 ETH for market making (Blue Fox Note: As of writing The price at the time of writing is about 1MKR=2.21ETH). Its automatic market maker mode is a constant product mode. If the above example is followed, its constant product is 100*221=22,100 (Blue Fox Notes: About Uniswap, you can refer to Blue Fox Notes’ previous article "
Understand Uniswap in one article
How to earn income on Uniswap?
If a user uses 1MKR to exchange ETH in the liquidity pool, then the liquidity pool becomes 101MKR, and according to its constant product, 2.19 ETH can be exchanged (for simplicity, the 0.3% transaction fee is not included here).
So what do you get if you generalize this pattern? That is Balancer. The relationship between them is partially similar to the relationship between Maker and RAI.
According to Balancer's model, its constant product is equivalent to (100)^0.5*(221)^0.5=148.66, where the proportion of 0.5 is fixed, and the product of 148.66 is also constant, and the change of token price depends on injection and withdrawal amount of tokens. If this model is followed, then injecting 1MKR can also be exchanged for 2.19ETH. In other words, according to Balancer's model, Uniswap's market-making model is to fix the value ratio of the two tokens at 0.5 each. Therefore, in the end, the exchange price of the two token pools is the same.
The generalization of Balancer refers to increasing the number of tokens in the pool from 2 to multiple (currently Balancer can be set up to 8), and changing the proportion of each 50% to a completely customized ratio, that is, In the ETH-MKR pool, it is no longer limited to inject 50% of the value of the corresponding tokens, but inject user-defined ratios of tokens, such as 75% of MKR and 25% of ETH. Of course, if the user sets two tokens, one is ETH and the other is MKR, and the ratio is 1:1, then this is no different from the corresponding token pool on Uniswap. Of course, the transaction fee can also be set to 0.3% .
secondary title
What will be the result of generalizing Uniswap?
Balancer can still implement decentralized token transactions
On Uniswap, people can exchange ETH and ERC20 tokens, or between ERC20 tokens. Balancer can still perform the same exchange. The token exchange price in its liquidity pool depends on the proportion and balance of the token pair. As shown below:
Among them, Bi is the balance of token i, which is the token injected into the liquidity pool, that is, the token that traders want to sell; Bo is the balance of token o, which flows out of the liquidity pool, That is, the token that the trader wants to buy; Wi is the proportion of token i; Wo is the proportion of token o.
10^0.4*400^0.4*37^0.2=56.8
Since the proportion is constant, the spot price changes with the change of the token balance. The price of purchased tokens (withdrawn from the liquidity pool) will increase, while the price of sold tokens (injected into the liquidity pool) will decrease. Once the external market price changes, causing it to be different from the price of the Balancer liquidity pool, arbitrageurs will come in to make profits until the price is balanced and there is no room for arbitrage. This means that the price between Balancer token pairs will eventually converge with the spot price.Balancer's liquidity pool can have multiple tokens, or just two tokens. At present, the best liquidity is the MKR-ETH liquidity pool. As of the writing of Blue Fox Notes, its liquidity has reached 3,189,561.03 US dollars, and the 24-hour trading volume is 153,846.91 US dollars. The proportion of its pool is not 50% of ETH and 50% MKR, but 75% MKR and 25% ETH. At the same time, the liquidity of MKR-ETH on Uniswap is $3,266,092, and the 24-hour trading volume is $176,995. As far as the liquidity pool of MKR-ETH is concerned, the two are basically at the same level. For token exchangers, it is more appropriate to use Balancer’s MKR-ETH pool for token exchange, because the exchange fee is 0.2%, but for liquidity providers, the income is 0.1% less. There are also many liquidity pools with multiple tokens on Balancer, with a maximum of 8 token pools.》
Liquidity providers can customize their own liquidity pools, which can be private pools or shared pools. Private pools do not allow others to join, and shared pools are open liquidity pools. Currently only the shared liquidity pool is open.
Suppose the liquidity provider builds a multi-token pool consisting of 10 wBTC, 400 ETH, and 37MKR, with asset ratios of 40%, 40%, and 20% (calculated according to the price at the time of writing Blue Fox Notes), then its The constant product of the pool is:
Any exchange between wBTC and ETH and MKR tokens can be supported in this token pool. In Uniswap, the V1 version needs to complete the token exchange between wBTC and MKR through ETH routing, while in V2 it supports the direct exchange of wBTC and MKR. For details, please refer to the previous article of Blue Fox Notes "
Uniswap V2: What will Uniswap look like in the future
Of course, in order to reduce slippage, Balancer will also help users find the best trading options from multiple fund pools. Balancer has some advantages over uniswap's 0.3% because the fee can be customized. However, the rate itself is not the threshold for gaining a competitive advantage, because it can be followed.
Balancer can also be an automated portfolio management tool
In order to hedge risks and obtain relatively high returns, investors often adopt portfolio strategies. Index funds help investors gain consistent exposure to a portfolio.
However, index funds need to be managed by someone, and the fund's managers will charge investors a fee for managing the index fund. These include the cost of rebalancing index funds, labor costs and automated robot costs.
The advantage of the Balancer liquidity pool is that it can realize an automated index fund through the participation of arbitrageurs. It does not require custody and is decentralized. Not only does it not need to pay fees, but it can also harvest fees.
The reason why Balancer can create an automated index fund and become an automated portfolio management tool is mainly because of its AMM model. The ratio of asset value in its liquidity pool is constant, which means that no matter how it is traded, each liquidity pool The token value ratio in is constant.
This means that, as the transaction progresses, and with the participation of arbitrageurs, the final asset portfolio will be rebalanced according to its set value ratio, and will tend to be consistent with the spot value.
For example, assuming that some investors are interested in the DeFi track, but cannot bet all their funds on a project, these investors can build a DeFi index fund, based on certain indicators, such as locked asset value, transaction volume, Non-correlation, etc. Select 5 of the tokens as index funds, and configure them according to the ratio of 20% each. For example, according to the current asset lock-up amount, from MKR, SNX, Avae, COMP, Kyber, BNT... Select 5 tokens (Blue Fox Note: Please note that this is not investment advice, but just to illustrate the scenario of establishing an index fund).
Another example is that a user just wants to gain exposure to mainstream cryptocurrencies, build a mainstream currency index, add BTC to his investment portfolio (tokenized btc can be used, such as wBTC, tBTC, renBTC, imBTC...), ETH wait.
At the same time, Balancer can also construct index funds of traditional stocks through synthetic assets. For example, its index funds include various stock assets such as Tesla, Apple, and Amazon. Users can customize index funds with a lower threshold. From this perspective, it has the potential to replace traditional centralized index funds.
Balancer's Token Mechanism: Liquidity Mining
The supply of BAL tokens is 100 million, of which 25% is allocated to founders, core developers, advisors and investors, and these tokens will have an unlocking period. The remaining 75% of tokens will be allocated to liquidity providers. With subsequent governance approvals, tokens may also be allocated to the protocol's ecological strategic partners.
The token of the Balancer protocol is the governance token BAL. The BAL token is deeply bound to its business, and this mechanism can also be seen in the token design of Compound. This is more conducive to the development of the ecosystem than the pure voting governance model. This also highlights the evolution of token model design in the DeFi field.
The advantage of liquidity mining is that BAL tokens are distributed to liquidity providers, and BAL token holders are bound to Balancer's ecological interests, which is beneficial to its future governance. Governance will involve adding new functions, deploying smart contracts on public chains other than Ethereum, layer2 expansion plans, introducing protocol layer fees, etc.Why Automated Market Makers Might Lose Money?》)
The supply of BAL tokens is 100 million, of which 25% is allocated to founders, core developers, advisors and investors, and these tokens will have an unlocking period. The remaining 75% of tokens will be allocated to liquidity providers. With subsequent governance approvals, tokens may also be allocated to the protocol's ecological strategic partners.


