# ETHDay - Jeremy Musighi - Balancer Labs

- Channel: [CryptoCanal](https://streameth.org/cryptocanal)
- Date: 2022-10-07
- Duration: 23:50
- Topics: People & Blogs
- Watch: https://streameth.org/watch/yt-k_mygZ8vQ_o
- YouTube: https://www.youtube.com/watch?v=k_mygZ8vQ_o

## Description

Amsterdam hosted Devconnect for a week, gathering the brightest developers and Ethereum builders. To get a glimpse into this universe, we hosted ETH Day on April 18th at the Transformatorhuis to showcase the best of the week to a wider audience. 

Jeremy Musighi - Head of Growth - Balancer Labs
Jeremy Musighi is Head of Growth at Balancer Labs, supporting the community-driven growth and sustainability of the Balancer Protocol. He has also been a crypto investor and researcher since 2013 and is the founder and CIO of Immutable Capital. Jeremy previously co-founded, grew, and sold two consumer Internet technology companies.
https://twitter.com/BalancerLabs

Learn more https://cryptocanal.org/eth-day/
Join our TG community https://t.me/CryptoCanalCommunity

We would like to thank our partners and sponsors that made this event possible. 🌷

Ethereum Foundation https://ethereum.org/en/
Devcon https://devcon.org/en/

Balancer https://balancer.fi/
Oasis https://oasis.app/
Perpetual Protocol https://perp.com/
Lido https://lido.fi/

## Transcript

[Music] cool well ladies and gentlemen i hope you had a nice lunch and now we're here and we're going to have jeremy from balancer please give a round of applause thank you very much um hi everyone yeah i'm jeremy from balancer and today i'm going to talk about a really important component of defy which is the amm automated market maker this is a technology that really acts as a linchpin for a lot of the activity that that happens throughout d5 i'm also going to be talking specifically about balancer which is an amm protocol and uh give you guys a look under the hood so i'll start by explaining a bit about the first version of balancer balancer v1 and balancer v1 is a protocol of liquidity pools a liquidity pool is essentially a smart contract that acts as a stockpile of tokens it holds a bunch of tokens token a and token b and those tokens are traded against each other so you know this liquidity pool basically acts as a place for traders to you know if they hold token a and they want token b they can switch between the two and uh on balancer v1 these liquidity pools can hold up to eight tokens this was a you know big breakthrough in d5 because we are more accustomed to amms that only hold you know two token 5050 pools and so you have eight tokens per pool and um you know this is a mechanism for creating also not only trading pairs but also baskets of tokens that can be used sort of like an index fund so if you take yeah eight different tokens for example a bunch of leading defy protocols or layer one protocols or metaverse tokens or you know any sort of sector that you want to kind of create a product that gives you a diversified exposure to then you can use a balancer pool to do that and balancer v1 really had a lot of success but balancer labs team kind of went back and looked at all the sort of ways that balancer v1 was being used and imagined what we think the future of amms is going to be and that's really the philosophy behind building balancer v2 because while balancer v1 is an amm balancer v2 is a is a platform of amms it is a design space for creating amms what does that mean it means that you know in in d5 there are so many different ways that tokens can be traded against each other and there are so many ways that tokens can be priced against each other and there's no one formula that will work for everyone there's no one formula that's going to work in every use case and so rather than trying to pick one formula that we think everyone is going to want to use we really wanted to kind of open up for developers to innovate using the primitive of amms to create every different type let me explain sort of some examples of what i'm talking about so the most probably well-known amm that you've probably heard of is uniswap amazing technology and uh on uniswap you can trade uh sort of two tokens against each other as uh and the way these liquidity pools maintain balance is that when the price of one token goes up that token is automatically sold by the pool this is an automated process in exchange for the other token because it needs to maintain even value 50 50 between the two assets that are held in this pool and now on balancer you can create these pools with multiple assets and the same principle applies where the total value of the pool must be evenly distributed between every asset that it holds so if i have usdc and eth or and wbtc in a pool together as the prices of of eth and wbtc move the pool has to change its balances in order to maintain that that equal value but that is a very different um scenario than if you were to create a liquidity pool of uh that contains stable coins right so if you have a liquidity pool that contains dye usdc usdt for example these are all tokens that have roughly the same exact value and so you would use a different formula without getting too technical you use a different formula for this type of uh liquidity pool and generally that's called stable swap so on balancer v2 one of the types of amms that exist is a stable swap amm another type that exists is what's called a boosted pool and a boosted pool is a liquidity pool that can uh also uh allocate the tokens that are inside of the pool into other yield generating strategies so what that means is if i'm a liquidity provider i'm lping into a balanced or boosted pool my tokens are earning they're earning yield through the trading fees that the pool is generating right as every trade that happens in an amm generates a trading fee and the lps usually get most of that so at the same time i'm also earning a yield through ave because all of my tokens that are in the balance or boosted pool are also deposited into ave and that's a way for me to really maximize my capital efficiency so if i'm an investor looking for the best yield i'm really getting uh best of both worlds there i don't have to choose between sort of like okay am i going to get more in the lending market or am i going to get more as an lp i actually um getting both at the same time so that's like a different also set up for how like an amm liquidity pool can work and one other example is uh there are other projects that have built amms on top of balance or v2 such as element finance and sense and these are projects that have created um like a fixed yield type of system where you can actually deposit assets and receive a set yield for a fixed amount of time sort of more like in traditional finance but within d5 we'll get more into that a little later so another way to think about balancer v2 is that it's a protocol for programmable liquidity and what that means is the use case that has been sort of most widely used and understood for the automated market maker in d5 today is uh token pair liquidity right traders you know i have this i'm selling this for that and i'm using amm to make this transaction there's liquidity available and i can make this trade immediately but the thing is traders are not the only people or not the only participants in d5 who actually need access to liquidity and even more so what we're seeing today and what we're going to see more and more is that protocols and applications also need to have access to defy liquidity so when you can when you create an amm that's programmable and flexible right so flexible and and uh generalizable so that it can be used in in like many different use cases then you can serve an audience beyond sort of the day-to-day trader you can actually be you can create this tool for developers which is what balancer is so when you are building an application in d5 that needs to access liquidity which many do it this is like a fundamental layer of of like how d5 applications work then you have a major advantage if you use balancer because the liquidity pools and balancer can be designed basically specifically to the needs of your application and one example of this is a major game developer that has been working with us and this game developer has they have this this new game that they've been designing and in this game users earn um you know a specific like in-game valuable asset which is a it's a crypto asset it's a token and uh they can also the more they play this game and the more points that they earn they can also convert that asset into a more valuable asset right so as a player playing the game you know you understand what the rules of the game are and sort of you play the game and you earn certain assets and you try to level up your points behind the scenes sort of underneath in terms of like what's uh what are what's happening on the smart contract level is that you have a balancer liquidity pool that contains the different tokens that are um that exist in this game and as players reach certain levels or achievements there are actual swap transactions happening on the background on the balancer protocol uh which is which is really awesome so i mean this like we're really just scratching the surface today for what is possible with this technology but it's super exciting yeah so kind of comparing sort of this new infrastructural model balancer v2 versus v1 so in v1 you had a setup where every liquidity pool was its own smart contract and what that meant was that uh all of the tokens on balancer were actually held in separate silos and when trades were made uh including some trades that require like multi-hops right so you are trading asset a for b and sometimes in order for that to happen you uh need to actually trade a for c and c for b that's kind of like what's happening in the background and if you're jumping from smart contract smart contract then you're yeah you're not really making an efficient use of your gas so in balancer v2 we have this single volt architecture all tokens on balancer v2 are held in the same smart contract they're accessed by each liquidity pool depending on the trade that's being made by the trader so this is um yeah not only more efficient for the traders the protocols the applications that are accessing liquidity on balancer but it's also more ideal for developers who are building with the protocol this is just another look at this concept and this is also describing the difference in what an arbitrage process would look like on balancer v1 versus v2 so one of the very unique things about balancer v2 is that because all of the tokens are held in one vault an arbitrager can profit a lot more by finding imbalances between pools moving tokens from one pool to another and then receiving the profit actually without having to spend any tokens up front in order to make that transaction happen we don't need to go into that detail so for a developer from a developer standpoint if you need access to a liquid market in d5 you might consider like building an amm from scratch especially if you need one that doesn't work the same way as like a uniswap or a balancer or sushi or bancor etc and so you have this choice like you can build you can build a thing from scratch yourself or you can bring this formula or the new concepts for your amm that you want to design and you can and build it on balancer and what what you actually um gain from that decision is that you get the security of balancer protocol which is audited tried and tested battle tested built by you know a really strong team and a very security minded team you get the gas optimizations of our single vault architecture you get access to the all the liquidity on balancer that's in the vault and all of the low-level token accounting that would you would need to worry about as a developer you don't have to worry about it all because it's already taken care of by the balancer protocol yeah and access to uh defy demand through aggregators and the network effects of building on an ecosystem that other developers are also building on okay so who the hell is building on balancer let's go through some examples we talked a little bit about uh these fixed rate lending protocols element finance tempest sense these are all built on balancer balancer has emerged as the leading platform for this entire space because it provides the flexibility and the infrastructure that a project would need in order to build this type of a fixed field marketplace other amms do not and like in case you don't know most of the amms that you use whether it's on ethereum or any other chain most of them are basically a fork of the same thing which is uniswap v2 and that's a very limited design it works very well for a certain use case but beyond that like you you can't build something like this um uh using that infrastructure so another example there are also stable coin protocols that are built on balancer and by using balancer liquidity pools like fake protocol which is utilizing a balancer liquidity pool to essentially manage the protocol pcv protocol controlled value that is held by fey and that is part of their mechanism for maintaining the stability of the backing of the fey token so that when yeah people are making transactions using fey they can be sure that uh the system is is uh liquid and solvent a really big project a really successful project that's been built on balancer is called copper launch copper launch has really emerged as the most popular platform for token sales ido's initial dex offerings new projects that are offering their token to the pro public and raising money for their project can use copper launch as well as uh prime launch both are built using balancer liquidity bootstrapping pools this is yet another type of liquidity pool on balancer which is designed to essentially act as a auction mechanism so that when you are selling a brand new token to the market it can go through a natural price discovery process and also act as a fair launch mechanism for people to buy into your project also mentioned index products earlier so this is a really big area i think that is is starting to take off in d5 i think there's a lot of interest today in how do you build um indexed fund products for defy index funds in general like something that you may have heard of the s p 500 it's an easy way for an investor to sort of buy one asset and just kind of have overall exposure to like an overall sector overall market you know in the s when you buy the s p 500 like the spy index for then you're basically buying the top 500 stocks in the u.s uh stock exchange and you just kind of you know it's a very passive kind of simple mechanism for for investing now in crypto the same principle i think will apply where you have a lot of people who are coming into the space and wanting to invest but they might not have the expertise to kind of pick one investment over another they'd rather you know buy like a basket of investments if they can and this new frontier um it will largely exist on balancer because balancer is the ideal infrastructure you know by you can build a liquidity pool that on balancer v2 can contain up to 40 different tokens today and i think that number will continue to expand as our amazing engineers continue solving these problems and [Music] that liquidity pool acts as as this investment product because every liquidity pool has is represented by a balance or pool token bpt that bpt is essentially an index asset and that can be renamed remarketed repackaged based on the needs of the index fund you may have heard of cal swap a really cool protocol for trading dex liquidity and uh it's actually built on balancer as well one of our amazing partners that we've worked very closely with so every trade that goes through calswap is um settled through the balancer v2 protocol and just talk about two more examples ave is is a one of the biggest d5 projects you've probably heard of and they use balancer in a few ways the first way is as part of their security staking module right so there's an 80 20 ave eath pool on balancer and if you're an ave staker you can stake your ave into this liquidity pool you can stake your balance or pull tokens into ave and basically that just means that you are providing liquidity to ave in the public markets while also providing security to the ave protocol and they're also utilizing balancer boosted pools as a source of liquidity lastly i'll just talk about something new there is a new sort of tokenomic model for the bowel token ve bell and a couple of projects have uh emerged so far that have are building uh sort of like these uh vote bribing platforms um for the the ve battle wars so to speak so redacted cartel has launched their project very recently called hidden hand hit in hand is a platform where if you are a holder of the bow token and you lock your bow what you receive is is called v e bell vote escrow bell v e bell is a mechanism that you can use to vote uh within balance or governance one of the things that you can vote for in balance or governance is which liquidity pools on balancer receive uh incentives like basically extra earnings they earn bowel tokens through what's called liquidity mining so there's a lot of competition between the liquidity providers and these in these various pools to sort of draw that liquidity and draw that those uh incentives to their pool so they use these platforms like aura and hidden hand to um incentivize people to to vote for their pools basically um yeah it's just a funny picture and yeah i think we're good thank you [Applause] thank you very much jeremy um we actually have one question from the audience which is very directed towards you which is from a security perspective is a single volt for all the tokens more risky and what's the tvl yeah so that's a great question i actually had the same question when i first when we were first working on this design right like we're going to put all these tokens into one smart contract it does that mean that it's more dangerous because a hacker would just need to hack into this one smart contract the most and there are many ways that i can answer this question but i think the most compelling way that i could answer this question is that there's been a bounty a bug bounty of 1000 eth which is uh somewhere around 3.5 million dollars for anyone who can find any vulnerability in this balancer v2 vault that bounty has been up since may of 2021 so it's been almost a year that no one has been able to hack this smart contract and claim that bounty it's the biggest bounty in d5 ever so um you know we're very security-minded i mean our our team has a very strong security background and we've you know done security audits through every major firm multiple times and and all of that information is available uh to look through in our documentation so and you know that's why we're confident enough to offer 3.5 million dollars in each to anyone who can hack the the thing and they haven't soon if you can find a vulnerability please go for it we'll give you the the prize because that'll just help us make it even more secure [Music]
