All Episodes

January 31, 2025 64 mins

While AMMs (automated market makers) represent a DeFi innovation in themselves, research and experimentation have pushed the possibilities well beyond the limitations of the classic x*y=k constant product formula originally used by LPs. One of the main innovators in this field remains Balancer - from multi-token pools with different weights replicating TradFi indices, to dynamic ratios that can be changed under certain conditions preventing further imbalances, Balancer set in place user protection measures. With the recent release of Balancer V3, developers get more freedom to experiment with AMMs, introducing features such as hooks that enable limitless pool customisation, boosted pools that combine LP fees with yield farming from money markets, and many more.

Topics covered in this episode:

  • Balancer’s inception
  • The evolution of AMMs
  • Balancer vs. other AMM competitors
  • Fungible vs. non-fungible liquidity
  • Balancer v3
  • Boosted liquidity pools
  • DevEx and hooks in Balancer v3
  • Preventing stablecoin depegs
  • MEV mitigation & CoW AMM
  • Scaling to L2s
  • Gyroscope & QuantAMM
  • Balancer’s B2C & B2B solutions

Episode links:

Sponsors:

  • Gnosis: Gnosis builds decentralized infrastructure for the Ethereum ecosystem, since 2015. This year marks the launch of Gnosis Pay— the world's first Decentralized Payment Network. Get started today at - gnosis.io
  • Chorus One: Chorus One is one of the largest node operators worldwide, supporting more than 100,000 delegators, across 45 networks. The recently launched OPUS allows staking up to 8,000 ETH in a single transaction. Enjoy the highest yields and institutional grade security at - chorus.one

This episode is hosted by Friederike Ernst.

Mark as Played
Transcript

Episode Transcript

Available transcripts are automatically generated. Complete accuracy is not guaranteed.
(00:00):
Amms didn't need to be only the simple version of X * y = K,
which implies that the pool always has like the same amount
of value in both, in both tokensand discover that it's possible
to have any number of tokens with any weights that you want.
Like pretty similar to what an index fund or an ETF would look

(00:20):
like. And that was Balancer, Balancer
V1 we launched in 2020. And yeah, since then we went
more from an end user focus protocol to developer focus
protocol where people can build their own AMM innovations on top
of balancers. So we went in that direction
with Balancer V2. There are people who say like

(00:43):
Amms are what what they are now and there's not much to to do.
But then we see a lot of interesting things like priority
fee mechanisms. Balancer V3 is a bad that this
is going to keep happening and we want to be this platform for
people to try new things around AMM design.
Welcome to Epicenter, the show, which talks about the
technologies, projects and people driving decentralization

(01:05):
and the production revolution. I'm Federica ANZ and today I'm
speaking with Fernando Martinelli, the Co founder of
Balancer Protocol. Before I speak with Fernando,
let me tell you about our sponsors.
This week though, if you're looking to stake your crypto
with confidence, look no furtherthan course one.
More than 150,000 delegators, including institutions like Bit

(01:28):
Go, Pantera Capital and Ledger Trust.
Course one with the assets. They support over 50 block
chains and are leaders in governance on networks like
Cosmos, ensuring your stake is responsibly managed.
Thanks to the advanced MEB research, you can also enjoy the
highest staking rewards. You can stake directly from your
preferred wallet, set up a whitelabel note, restake your assets

(01:48):
on Eigenia or Symbiotic, or use the SDK for multi chain staking
in your app. Learn more at Chorus .1 and
start staking today. This episode is proudly brought
to you by Gnosis, a collective dedicated to advancing a
decentralized future. Gnosis leads innovation with
Circles, Gnosis Pay and Metri reshaping open banking and

(02:10):
money. With Hashi and Gnosis VPN,
they're building a more resilient, privacy focused
Internet. If you're looking for an L1 to
launch your project, Gnosis Chain offers the same
development environment as Ethereum with lower transaction
fees. It's supported by over 200,000
ballot errors, making Gnosis Chain a reliable and credibly

(02:31):
neutral foundation for your applications.
Gnosis Dow drives Gnosis governance, where every voice
matters. Join the Gnosis community in the
Gnosis Dow forum today. Deploy on the EVM compatible
Gnosis Chain or secure the network with just one GNO and
affordable hardware. Start your decentralization

(02:53):
journey today at gnosis dot IO. Fernando, it's fantastic to have
you back on. Last time you were on this show
was was actually four years ago.It's a really long time.
Remind us. In crypto, it's a it's a
generation or more. Yeah, it's like in four years
it's at least one generation. So remind us how how did

(03:15):
Balancer get started and how hasit developed since 2020 when we
last had you on? Yeah.
So I've always been a fan of of Krypton General, Bitcoin and
Ethereum and got involved in theearly days of Maker Dow worked
with Ruin and Nicolai and was active, active in the

(03:39):
discussions around AM NS. And it was the early days in
2017, even before that. And the idea came in 2018 when I
realized that AM miss didn't need to be only the simple
version of X * y = K, which implies that the pool always has

(03:59):
5050 like the same amount of value in both, in both tokens.
So, yeah, I, I kind of slept, slept little for some nights
and, and went through lots of maths and discovered that it's
possible to have any number of tokens with any weights that you
want, like pretty similar to what an index fund or an ETF

(04:21):
would look like. And, and that was Balancer.
Balancer V1 we launched in 2020.And yeah, since then how it
evolved, we went more from like a, an end user focus protocol to
developer focus protocol where people can build their own AMM

(04:42):
innovations on top of Balancer. So we, we kind of went in that
direction with Balancer V2 and even more so with Balancer V3,
which we can talk about now, butit's been a, a long journey.
And yeah, a lot, lot, a lot of people now beauty and Balancer.
So very, very glad that we're here still like doing, doing

(05:03):
interesting stuff. And yeah, very happy to be here
with you again. Cedric, super nice.
So maybe let's talk about the very early days of AMM.
So kind of like in my view, kindof AM miss, we're very much
developed as a stop gap measure because kind of, I mean, people
had been used to central order book exchanges off chain, but

(05:29):
implementing them on chain is actually very difficult because
everything is kind of is ex ante.
It's it's public, right, kind oflike and you can front run
things. And so that's kind of how Amms
kind of started off. How how do you see the evolution

(05:49):
of AM Ms. in this space? How have they matured?
Yeah, it's crazy how how we learn things that today in
hindsight feel just obvious. But we it took us like for four
years, maybe until today we're learning new, new stuff.
But like only a year after we started the AMS, we started

(06:11):
discussing things about like impermanent loss and then MEV,
which then evolved to LVR loss versus rebalancing.
And we realized that there were lots of dark forests, ARK bots
that were being there mean in a way, like sandwiching innocent

(06:33):
users. And then things like cow swap
came, came around to to make Ethereum more fair or fairer.
And yeah. So there, there's been a lot of
evolution. And then Uniswap came with, with
their V3 changing the the landscape with concentrated
liquidity, which was definitely groundbreaking.

(06:55):
But that itself introduced some new challenges like just in time
liquidity where like LP's put 100% of the liquidity in a very
short tick or narrow tick when aa big swap happens.
And then people who are providing liquidity with a
longer range, they just, yeah, got them there.

(07:15):
They get their lunch eaten by bythose guys who only apply to
that narrow tick because they they get proportionally almost
all the the fees. So with new innovation comes new
challenges and I think we're still learning today.
There's lots of interesting things that we're doing at
Balancer and others are doing aswell around mitigating math and,

(07:38):
and LVR and our profits and, andreally trying to return the,
the, let's say the profit or the, the surplus of the
operations to the end user instead of to validators or to
the math bots or, or arbors Thatwe really want to, to make sure
that the users get all of the like the return for the risk

(08:02):
they're taking by providing liquidity or by doing trades as
innocent good flow as we call them.
So very excited. I think bouncer V3 is all about
this bat that AM miss are still in their in their infancy.
There are people who say like AMmiss are are like what what they
are now and there's not much to to do.

(08:23):
But then we see a lot of interesting things like priority
fee mechanisms like discussed byDan Robinson, who's a, an OG
and, and, and, and someone we all look up to.
And yeah, some, some very interesting ideas that keep
coming up. So I, I, I think balance of V3
is a bad that this is going to keep happening and we want to be

(08:44):
this platform for people to try new things around AMM design.
Yeah. There's a lot to unpack here and
I think I kind of want to defer most of it until later in the
episode. So, but I think it's it.
We should note that Amms are extremely susceptible to MEV and

(09:05):
LVR just because you're always at a disadvantage if if you're
the maker, right? Kind of like you ideally want to
be the taker and kind of like ifyou have stay liquidity and kind
of like prices have changed, that's really detrimental.
And then also on top of that, ifsomeone kind of actually is

(09:28):
somewhat unsophisticated taker, this potential revenue that
should accrue to the to the makers, it often actually goes
to arbitragers. So kind of they, they, they kind
of lose on both sides. And kind of I think kind of we,
we should talk about how to how to mitigate MEV a little bit

(09:51):
later. So kind of if, if, when I think
about other things that kind of have changed for Amms over the
past four years or so, it's kindof efficiency and cost
reduction, right? Kind of like so you talked about
this simple constant product market maker and kind of this,

(10:12):
this also has changed dramatically, right?
Right, exactly. Yeah, I think that there are
like this is a definitely there are two examples of AMM
innovation where efficiency in terms of capital efficiency,
which means how much price depthor how much useful liquidity for

(10:36):
traders which is translated in, in terms of bad depth, how much
you can trade for a given amountof dollars you deposit into a
pool. And Curve came with the, the
1st, in my opinion, innovation in, in that regard for packed
tokens. And we also have an
implementation of, of yeah, stable swap on, on Balancer and

(11:00):
yeah, and, and Uniswap also innovative in terms of making
those positions non fungible. So anyone can express their
opinion in terms of what range they want to provide liquidity
in, which has also its challenges.
So yeah, I think there's different ways you can talk
about efficiency and different challenges that those those,

(11:21):
yeah, ways you solve efficiency bring to the table.
So you, you already kind of mentioned kind of the main
competitors in the AM landscape.So there's unit swap and curve
and curve very much launched with stables in mind where kind
of say you, you trade one USD sable coin against another.

(11:44):
And then kind of there's very there's very high liquidity kind
of at kind of at the point kind of at in the middle.
So kind of you can trade them against each other really
efficiently, a kind of like evenlarge sums, which is not usually
the case with, you know, vanillaAM Mississippi and the other

(12:05):
one's uniswap. So kind of how, how would you,
how would you say balances positioned with respect to both
of these? Yeah, we're a bit in the
intersection and and really exploring like the like build,
build your own AMM. So AM Ms. made easy.
It's, it's really kind of you have those two and then you have

(12:28):
Balancer kind of an intersection, but also expanding
through third party teams like some of which we're, we're going
to talk about like Cal swap, building the Cal AMM with
Balancer and, and Gyroscope and safe finance and, and lots of
others. So yeah, we, I think we, we are
really positioning ourselves as a platform, not taking any

(12:51):
preferences or any favorite saying like we're going to be
just like many token pools. You know, that that is something
that curve can do, but it's not in a way that we can do it like
with flexible weights and flexible AMM logic.
So we can have up to 8 tokens per pool.
And the main thing that we're not decided is strategically not

(13:14):
to chase after because we, we think that they already do a
good, a very good job at is concentrated liquidity.
So unit swap has pioneered that that concept and we believe that
we can add more value to the space by focusing on fungible
liquidity. So whenever you think of

(13:35):
Balancer, we have a pool token that is like a representation of
a share of a pool where all the users are equal.
So there's no risk of like they're sophisticated players
doing just in time liquidity. So they're LP's just for the
transaction and take all the fees from the other poor LP's
that are humans. So we we solve this by focusing

(13:57):
on fungible liquidity. But within fungible liquidity,
you can have concentrated liquidity as well, which is
something that gyroscope is pioneering within balancer.
So yeah, it's a, it's a invariant shape that follows
the, the shape of an ellipse. That's why it's an elliptical
pool, ECLP, concentrated liquidity, elliptical

(14:18):
considerate liquidity pool. So there are other ways to do
interesting stuff without givingup on the fungibility.
So that, that, that that's how II would put balancer amongst the
other competitors. When you look at non fungible
and fungible liquidity. So to me it's pretty clear why

(14:39):
non fungible liquidity would be preferable in, in many instances
just because you can kind of youcan do very concentrated
liquidity where you're comfortable kind of providing it
and kind of you, you, it's much better APY potentially if you're
doing it right. Why?
What are the advantages of doingfungible liquidity?

(15:04):
Yeah. So fungible liquidity is really
about setting a level playing field like you, you ensure that
sophisticated players cannot come in and and grab your lunch
using just in time liquidity though it it kind of sets a
known and and easy to manage like something that I call set

(15:26):
and forget or yeah, deposit and forget.
Whereas if you're dealing with concentrated liquidity, of
course you can be more efficientand say like, I want to trade if
between 3200 and 3300 and I'm going to make more fees than
people who have a unity to poor balance or pool.
But like you have to be very active.

(15:48):
You have to make sure that as soon as you're your liquidity
goes out of range, then you needto rebuy half of the tokens to,
to go back to, to the play or position your, your position,
your, your LP position closer towhere the price is.
Which means you're rebuying for more than you sold for or you're
selling for last than you boughtfor.

(16:09):
Though it it, it, it comes with a lot of caveats.
So I would say concentrated liquidity is better for active
more sophisticated professional market makers and and fungible
liquidity is better for I would say like passive LP's might be

(16:29):
have a not a better connotation,but I think that's what it is.
Like there's a lot of people whowant to just put the money in an
in an LP position and forget. So those are safe because the
environment does not let active traders kind of come and eat
their lunch, for example, through just in time liquidity
or through more advanced techniques that the normal human

(16:52):
passive LP's are not in a in a position to do or to perform.
That makes a lot of sense. So balance of V3 just came out
or came out a short while ago. So what are what are the main
goals of V3 over V2? Yeah.
So V3 is really taking that ideaof Bouncer is a platform for AMM

(17:17):
innovation step further. So a lot of the hard work we put
and yeah, we spent like almost two years working on V3, maybe
more is is really towards like making it easier for anyone to
develop their own pool or to innovate with their own AMM idea
so that the Dev X experience improved by 10X at least.

(17:39):
It's very much easier, a lot easier to create your own pool.
You only need to define an invariant and and that's it.
All the functions like swap or add liquidity, remove liquidity,
they all stand from this definition of invariant.
Whereas in V2 you had to define all the different functions like
swap in for out, swap out for inand they could be conflicting.

(18:04):
So you could have an AMM that isnot consistent.
So they took more, more care forAM designers to make sure that
everything was consistent. Whereas V3, as I said, you just
like have this invariant like the, the shape of, of the, of
the curve of your AMN. And then bouncer does everything

(18:24):
it does scaling, it does rounding.
It makes sure that your AMN cannot be exploited through
rounding because we we do like rounding at the vault level in
the direction of the pool. So we're kind of taking away a
lot of the burden that MN designers needed to carry about

(18:48):
to worry about. Sorry, in B2 to the vault, we
have this idea of transient accounting.
So you can do lots of transactions, add liquidity,
remove liquidity, swap. And then at the end you settle
your, your tab. Let's say like, like you're at a
bar and you, you drink and then just at the end you pay your

(19:10):
bill. So it's it's similar And, and by
the way, a lot of the things we,we did for Balancer V3 are
similar to somethings that, you know, swapped before.
Also has we even changed our names to make sure that we, we
had the same names as as uni before?
Because we want people to like, yeah, that are used, used to

(19:30):
unisop before to also look at the Balancer V3 and, and see if
it's a good or a better fit. So we also have hooks which make
it easy for specific things thatyou do before and after swap to
be applied to a different set of, of pools without having to
rewrite all the pool code, whichwas possible in V2.

(19:50):
So you, you can always deploy a pool with, with a specific code
that is customized by you. So with the hooks on Bouncer V3,
you can just reuse hooks that exist.
And we have a, a few examples ofof that.
And maybe the coolest thing for the end user, I think about
Bouncer V3 is the, the new idea of boosted pools, 100% boosted

(20:14):
pools. We we had that in Bouncer V2.
And we're improving that by making like before they weren't
100% boosted, we're making them 100% boosted.
And we do that by and it's kind of technical.
So yeah, maybe I I'll just stop here and and I can talk more
about how it works, but I'm veryexcited about boosted Puzo,

(20:36):
which means that instead of likehaving to choose between landing
your say, die or USDC on Avid oradding liquidity to an LP with
your USDC and die or your SDC and E, you can do both.
Like you can add liquidity usingyour dye and then under the
hood, balancer will deploy all that dye to to bad to Avi and

(21:01):
turn it into a dye. So people are trading dye and
USC are dying and and wet. But in the like under the hood
balancer is making sure that this is being lent out to Avi
and all of your position is earning yield.
So this is pretty cool and. That's super cool because here

(21:22):
it's on, particularly at U.S. dollar stables, really high.
So kind of competing with this kind of as a liquidity provider
is really difficult. Tell us how this works under the
hood and kind of why it was difficult to going from
partially boosted pools to fullyboosted pools.

(21:44):
Great question yeah, so the way it so first, why why is it
difficult? Like in in essence, it's not
hard like we what you can do in curve does that, but it's not
very popular because of the the reason why it it's not yeah,
simple to do it, which is like you could just have all the

(22:04):
liquidity go to a tokens. Let's use Avi as an example, but
it could be other landing protocols.
So if you want to have like boththe swap fees like being an LP
and also have the landing protocol, you can just put your
a die paired with an AUSDC on balancer and then people can

(22:27):
trade a die for AUSDC. But this is not what people want
to trade. People have die, people have
USDC, they don't have AUSEC or aDIE or the wrapped version of
those tokens. So really the trading happens in
the underlying token right in indie and USC, not in landing
wrapped versions of those tokens.

(22:48):
So you could solve that by having very kind of
sophisticated aggregator like Logic, which one inch has and
and others like COSOP also have.You can abstract away that from
the end user and say to the end user, you're trading the eye for
your CC. But I am going to Ave.

(23:09):
I'm going to wrap it and then I'm going to trade on Balancer
and then I'm going to give it back to Ave. you know, and do
all that back and forth, which costs a lot of gas.
So this is quite hard to do because of a lot of gas.
So what we did to solve this in Balancer V3 and we don't have,
no one has that. So it's a pretty unique feature
feature, which is what we call buffers.

(23:32):
So what we do is very simply we have a it's like a mini instance
of Ave. inside the Bouncer vault, which has like a little
bit of a dye and little bit of dye.
And then everybody who trades using Balancers vault, they they
trade actually, they see dye as liquidity, but they trade with

(23:54):
in the pool that has a dye and AOSEC, which is already 100% of
Ute for our piece. But then balancer that the vault
looks at the buffer. So the buffer is kind of has a
die and die and wraps and wraps with the same rate as Avi, but
much cheaper because it only reads the rate that Avi is

(24:17):
offering without having to. If you had to wrap using Avi or
unwrap, you would have to do allthe update of the accounting of,
of the whole like pool of of Avi.
So that's quite gas intensive. Even though Ave. is
superficiency and has improved efficiency over time, it's still
quite gas heavy. So what we do is we use this

(24:39):
buffer and then like let's say you trade a little bit of dye
for your STC. You put dye in the vault, the
vault puts dye in this buffer, takes some wrapped or some a dye
trades with the pool that has a dye in your STC, and then the
AUSTC goes to the buffer of USCCand then the user gets USCC.

(25:02):
So the user has the like the the, the experience of trading
die for USCC and there's no external calls to Ave. because
the buffer, the buffers of die and USCC are enabling that
trade. Then of course, what can happen
is the buffer doesn't have enough die or USCC to give back

(25:24):
to the user because the user's doing a big trade.
That that's where I think the the cool thing happens is that
when, when the buffer, so the buffer goes back and forth, back
and forth. And then whenever there's a big
trade, then the buffer doesn't have enough.
So balancer knows that the vaultknows that and goes to Ave. and
then wraps or unwraps exactly the amount needed for the trade

(25:47):
to be executed. Plus giving putting the the
buffer back in the middle, whichmeans that this user that did a
big trade, they're paying for the buffer to be puts into the
sweet spot, which is right in the middle.
So for next trades, smaller trades, it can go back and
forth, back and forth and still,yeah, save a lot of gas for

(26:08):
subsequent trades. So this is this is something
really neat that I think we are just starting to to explore.
And 111 thing that I think a lotof people think is that in layer
two it's not very relevant how much gas you spend because gas
is so cheap, more so on ZK roll ups because yeah, it's really

(26:31):
free processing. But I think that it's still it
still can make a difference between like two sources of
liquidity, say Balancer and Uniswap.
If Balancer has slightly less gas for that trade, then that
liquidity will be used by solvers on cost swap or by by 1
inch or whatever aggregator matcha.

(26:51):
So I do think that the gas discussion even though that's
relevant for L2's, it's still, it can still be like a a
differentiator or sources of liquidity.
It will also become more relevant again once blobs fill
up. Right?
So kind of like. I mean, the only reason why L2's
are currently as cheap as they are is because kind of BLOB

(27:13):
space is pretty abundant. 100% we'll always be reaching that
scalability like moment where like, oh, things are going to be
expensive because we filled up the yeah, the, the Ledger and,
and we need, we need more, more space and keys will go up.
So yeah, absolutely. How baked into the designers

(27:34):
ABBA could we, could you in principle kind of switch this
out for another money money market or does it does it have
to be ABBA? Will there be other versions
that kind of use a different money market?
So Abba's definitely our preferred partner.
We've been together for a long time where they're close and
they use Bouncer for their 8020 pool for providing liquidity in

(27:57):
the AVID token. So it's also the bad like
longest, most battle tested protocol around.
So we're definitely, yeah, kind of bias towards Avid, but the
protocol is neutral. So the smart contracts work with
a wrapper which is a 4626. So as long as your token is 4626

(28:21):
compatible, then you can, you can use a boosted pool.
So other protocols like like Morpho and Euler is looking into
it. There's, there's also already
auto protocols that have boostedpools on balance already.
So it's definitely an open thing.
But of course, we, yeah, we, we,we kind of have A at least in

(28:44):
the UI. And the UI is, is controlled by
its own team that has their own opinions.
But I think the, the standard option is obvious.
So it's just because we we trustthem so much.
Correct. Yeah, that's that makes sense.
When you say kind of it's fully boosted, I take it the part
that's not boosted is the buffer, right.

(29:06):
And I mean the size of the buffer kind of has to be
somewhat in relation to the total pool size and the the the
average trade size, I assume. So kind of like when you say
fully, it's probably like 95 or whatever percent, right?
It, it is full because that that's, that's a great question.
The buffer is not paid or is notfilled by the LP's.

(29:27):
So the LP's, yeah, the LP's onlyput their liquidity in the pool.
And by the way, if there is no buffer, it's fine because that
means that all the all the two. Sections will have to write it
right. Using, yeah, exactly.
So it's just a plus if you have a buffer, it reduces gas for
most of the trades. And like I said, perfectly put

(29:49):
like depending on how big the buffer is, the more trades it
can kind of enable without having to resort to, to an
external call. What how, how we deal with
buffer so far is the projects are putting liquidity there
because like protocols usually have protocol on liquidity.

(30:11):
So you don't need a lot to enable most of the trades in the
buffers. The protocols that are creating
boosted pools are pretty 100K, sometimes 200K in the in the
tokens that they want to boost. And very nice as well is that
one token is. So you only need one buffer to
boost a token and that token canbe in many different pools.

(30:34):
So if you have a buffer for a die and a die, then ADI can be
in like a DIUSCCAD i.e., you know, a DI whatever.
Every time you do this lag, which is boosted dye, then you
use the same buffer. So it's kind of a shared common
good that helps everyone to save, yes.

(30:55):
Yeah, that makes a lot of sense.So when we talked about kind of
like new features for V3, kind of the the first thing that you
kind of mentioned was improved dev experience.
So kind of like making it easierfor devs to kind of build good
well designed AM Ms. on top of on top of balancer.
And the other thing that kind ofyou mentioned but didn't really

(31:17):
go into was hooks. I'm interested in the in this.
So kind of hooks are kind of modular customizations.
Tell us about what kind of logicyou see and what kind of logic
you expect to see in the future.Great question.
So hooks are really like this. Very interesting way to open up

(31:43):
experimentation without creatingdangers for developers or LP's
and also kind of reusing re utilizing code that's better
tested. So that that's the beauty of
hooks, in my opinion. An example of of interesting
hook is you change the the swap fee based on whatever like a

(32:05):
parameter. For example, priority fees.
Those are they're useful for mitigating MAV or LVR in in
chains that are priority fee sequenced.
L twos, right? L twos yeah so base is it uses

(32:25):
it it can change there's nothingset in stone, but differently
from Ethereum L1. They just take like the the the
transactions and order them by priority and execute them.
The base like Coinbase is not interested in in doing money
with Med, at least so far, thankfully, yeah.

(32:47):
So if you are if you're trying to be a math bot and you you
want to capture a very good opportunity, let's say sandwich
someone to be able to get that opportunity.
What you're going to do is you're going to put a high
priority fee for you to be like the first one to do to get it
right. What we do is we we have a hook
that says read the priority fee,which is something that is like

(33:10):
readable in the transaction. And then we say like that
priority fee if it's above a threshold, which is kind of to
safeguard users that are using Madamask or other wallets that
always have some small priority fee as standard minimum up up to
five GUI for example. If you pass that threshold, then

(33:34):
you're considered to be a bot that's trying to extract MAD
from the poor LP's because. Because kind of you're, you're
paying to kind of be early in the sequence and kind of like
get to fulfill some sort of vulnerability or kind of like AB
against something that won't be there for, for a long time,
right Kind. Of like exactly, perfect,

(33:56):
exactly. So what we do is like we, we
calculate the swap fee of the AMM.
So we make the price worse, lessattractive as as much or, or or
proportionally to how much the priority fee goes up.
So if you, if you, if we read a transaction that has a very high
priority fee, we, we increase the swap fee to extract more

(34:20):
value to the LP's. So this way we effectively make
sure that if you're trying to get MEV by paying too much the
sequencer, we say the price is worse.
So it's kind of a very, very interesting way to say the, the,
the share of profit that this MAV opportunity created will go

(34:41):
to our users and not to to you. Box text the box.
Exactly. It it's, it's a it's based on a,
an article. I don't, I don't think it was
the first article talking about that, but Dan Robinson, as I
mentioned, wrote a very interesting paper on this and
we're we're like implementing it.
And I think it's the first, first AM that's doing that.

(35:04):
So the like the very flexible infrastructure Balancer V3
allows that. And we're, I think we're
launching it like next week or so.
We're already, it's already audited.
So. And also the cool thing, as I
mention of hooks is that they only have the very small surface
of kind of interaction or, or, or surface of attack.

(35:26):
Because with a, with a swap hook, you cannot, it's, it's a
view function. You cannot it, it only returns
the swap, the new swap amount and swap percentage and that
itself cannot. It's probably not something that
can drain the the AMM or put LP's in risk because the worst
it gets is the fee goes to 100% and then the trade is like it.

(35:51):
No one is going to trade with that pool, but it cannot be
negative, which would be draining the pool.
So it's it's something that people can just interact and
interact and innovate, iterate alot without the risks that AMM
design bring with it. Cool.
What other hooks are you workingon or looking forward to?

(36:12):
Yeah. So we have the priority fee
hook, we have the stable search hook, which is very interesting
as well. So if you have a, a stable pool
SO2 assets that are correlated like your SCC and die if the,
the PAG is lost or is broken, then you have like, I don't
know, let's say die for $0.70. The the stable storage hook,

(36:34):
What it does is it charges a higher fee towards the side that
you don't want the pool to go. So if you, if you want to dump
more dye and, and make the pack go even worse, there's a higher
fee, whereas the fee that bringsthe pool back to the, the pack
to where we want it to be is, islower or even 0 can't be

(36:54):
negative because that opens up problems, but it can be
virtually 0. So we kind of incentivize the
spread to go towards where we want the pool to go.
So that that's an interesting one.
What do you do if a saver kind of D pegs for a good reason,
right? Kind of like, so for instance,

(37:15):
say someone has invoked the global settlement with Maker and
then kind of dye D pegs. I mean, that's pretty
reasonable. Wouldn't you have to kind of
disable this hook? No, because that's a good
question. Like what the hook would would
do is it would just like not enable trades in that direction.

(37:37):
So let's say the, the, the swap fee or spread grows a lot.
So there's no trades between 80 cents or die and $0.60.
So even though the price is like79, right, it's almost, almost
80, which is the upper margin where we want the the AM to

(37:58):
trade. It's still has all that margin
to go back and forth to the 60 where our AMM is just saving our
users. So in a way it's protecting the
LP's by not giving away more, let's say USDC, which is the one
that's still at $1.00 because yeah, it, it's not worth it.

(38:20):
So it's a trade off between swapfees.
So we, we give up on being traded on, so generating swap
fees because there's a lot of case or most cases when the pack
is broken, it's something that could be dangerous and it could
mean that there's a problem in one of the, the tokens and then
the, the pool will just get drained or, or, or drain all the

(38:41):
good tokens. So that's another cool thing of
the stable storage. The more you get to, to the pack
being broken, the, the more you protect the token that's still
in pack and you don't, you don'tsell it.
So yeah, it's, it's, it's fine. It's, you don't need to
deactivate it, but you still like we, you, you trade blasts.
It's, it's like giving up on swapping fees, swap fees for

(39:06):
yeah, the chance protecting LP'sand, and in the in the event
that that DPAG is not going to be permanent or is something
like temporary or related to a bug or, or some instability of
the system. But as an LP, you're always
allowed to. Withdraw anytime.

(39:26):
Yeah, that's, that's a premise that bouncer has.
It's actually enforced by the vault.
We have functions that allow theLP's to withdraw their liquidity
without even talking to the poolcontract at all.
So, yeah, and that that's, that's just super important.
Like any, any pool that has codec could be broken because of

(39:50):
a bug or whatever. Bounce the vault enable.
It's almost like, now that I think of it, it's almost like
the L2's kind of having this forced exit mechanism.
You know, if the L2 stop creating blocks, then you can go
to the L1 and, and, and just force a withdrawal of your L2

(40:10):
funds and bridge them back. So it, it's kind of similar.
The vault doesn't need to talk to the pool.
To allow users to withdraw theirfunds.
Yeah, I, I think, I think a lot of L2's don't actually have this
implemented yet, but. They say they have or they say
they will have or they should have, but.
We're going to get to this eventually.
Exactly. It's one.
Of the stages of yeah, the ladder of L2's, right?

(40:35):
Cool. You alluded to this kind of like
in the very beginning of the podcast.
So kind of you talked about Med mitigation, kind of we already
touched on this kind of with andthe priority fee hook where kind
of you surmise that kind of likeanyone who's willing to pay a
higher tip is, is probably trying to do something

(40:59):
extractive and it's not just trying to be nice to the
sequencer. So there's another MEB
resistance mechanism with cow AMM.
Can we talk about that? Because kind of like that's,
that's less circumstantial in a way, kind of right with them.

(41:20):
The priority fee hook kind of. You're just assuming that
because someone's winning to payfor first for the first spot
that they're trying to do something malicious or
extractive. How does how does it work with
the cow AM? Great question.
Yeah, as always, it's like a trade off.

(41:44):
I think my personal preference is what Cal swap does or the cow
AMM that's powered by, by Cal Swap, which is really the like
to, to to take a step back. Like MEV stems from the the fact
that there is adverse selection.So there is a, an unfair, as I

(42:06):
said, Sir, tricky. Like the, the, the, the LP's are
like, they are on chain, like you cannot update prices
instantly. There's like block times and
there's gas costs to change things on chain.
Whereas traders, they, they haveinstant information.
You have like all sorts of flow of transactions and man pool, so

(42:27):
you have a lot more oversight ofthe price of assets.
You have access to all the off chain information.
So it's it's really a, an unfairgame.
What COW swap does, and I'm big fan of COW swap, by the way, is
like they, they bring this knowledge to the table by having
this competition between solversand they, they make sure that

(42:50):
the there's a surplus that has to go to the users and the the
solver that maximizes surplus tothe users.
In, in this case, the COW EMM isconsidered a user, which is like
the whole, the whole novelty of of this design.
Like usually only users that puttrades on COW Swap are
considered users and they get the surplus for COW EMM.

(43:13):
The EMM itself is like a user. So it also has like the surface
included in the calculation for the OR the winning solver.
So it, it, it really so COW softallows this, this this kind of
disadvantage of on chain LP's toto kind of yeah, be counteracted

(43:35):
counterbalance. So with, with COW AMM, you are
sure that you are selling whatever you have in your, in
your AMM pool for the market price because there is
competition between solvers and the one that provides the Cao
AMM with the most surplus is theone that's going to win.
So it's really like you, you have like a, a swap fee that is

(44:00):
it's not, it's variable. So like I said, like you can
increase the swap fee to give more value to the LP's by
looking at the priority fee or you can increase the the swap
fee by looking at how the competition between the the
solvers is willing to give more to the LP's to get this
straight. So it's two ways of returning

(44:23):
value to the LP's. And yeah, I like it a lot
because it's just, it has more information from the whole
ecosystem. It's not just some, some mad
bots that are doing like trying to extract and giving to the
sequencer through priority fees.It really involves all the

(44:44):
solvers of Cal Swap, which is getting bigger and bigger and
has more and more participants. So it's, it's fair and fair.
But the, the problem is that the, the downside is that it's
not permissionless as the priority fee hook.
So the priority fee hook, the beauty of it is that anyone,
it's like open anyone can post the transaction on, on the base
sequencer. Whereas for CAU MMS, it works if

(45:08):
you allow only solvers of cow swap to interact with that, with
that liquidity. So it, it's that trade off.
But in my opinion, as COW swap grows bigger and bigger and, and
there's lots of solvers and a lot of diversity in the solver
ecosystem, I think this is a trade off that we're willing to

(45:28):
do in we're going to publish some results soon, but we're
super excited. Like with smaller pools on Cao
MMS, we have much better APRAPRSfrom swap fees then like
compared to Balancer vanilla weighted pools or unit swap V2
pools. Like like they even being a lot
bigger. Cao MMM pools are doing a lot

(45:49):
more APR. So kind of protecting the users
and and giving back, yeah, swap piece to them as compared to the
conventional Uniswap V2 or Balancer AMS, which is amazing.
Something we're going to be building on more and more and
we're going to expand COW MMS toto Balancer V3, which is

(46:09):
something we're working on rightnow.
Are there kind of like benchmarks that you can give us?
So kind of like how much more APR can I expect to kind of get
as an as a cow AM MLP? So I, I've, I've just today seen
some, some numbers by the Cal swap team and it's sometimes

(46:30):
like 4-5 percent annualized in pools that are much smaller.
So the results are really like really promising.
And I'm not going to give you any hard numbers because I might
be wrong and more like more judicious analysis has to be
done. But it, it, it's as as much as

(46:52):
like 5% annualized more. But it makes sense, right?
Because like what COSOP does is really like it, it lets people
trade with the price of the market even though the pool has
a stale price. Like you said, for anything it
the the competition ensures thatthe pool gets it's it's fair
value for the the the assets, which increases the the APR

(47:15):
considerably. So toxic would have lowers
effectively just filtered out. Perfect.
That's right. Yeah.
Cool. One more thing that we also kind
of like tangentially already touched on and that's kind of
scalability and kind of your L2 and multi chain strategy.
Kind of like what we've seen increasingly in kind of like the

(47:37):
theorem ecosystem is that liquidity has splintered
dramatically between different Ltwos.
And contrary to kind of what what we had hoped for initially,
these L2 are very much not interoperable.
So kind of like despite the factthat they have this shared

(48:00):
security layer, you, you still have really long settlement
time. So in principle, kind of like
say go from arbitrum to base andback, it'll take you 2 weeks,
you might as well send a postcard to the other side of
the world, right? So kind of, So what what you

(48:20):
actually have is you have, you know, arbitrage between
different L twos and kind of like it's very liquidity
intensive and and so on. How do you guys think about
balances kind of mighty chain and mighty L2 strategy?

(48:43):
And that's a very hard question.And like, I'm just representing
my views. I can't speak for all the
balancer community, but I, I do think that this is such a hard
problem and one that a lot of people are working on.
Very, very good people, much more intelligent than than me
for sure, but probably then the then our team and with a lot

(49:05):
more resources. So I, I do think that we, we
should not try to create, you know, new protocols for cross
chain swaps or, or, or things like that.
I think we, we should try to kind of stay in our lane and
then make sure what we do, we dothe best we can.

(49:26):
And, and yeah, I, I'm a, I'm nota fan of going the app chain
route. I think this is going to cause
even more fragmentation. Like you said, even if you're
part of the like the Super optimistic chain or you, you
have a base roll up, I think there, there is always
fragmentation that is going to happen.

(49:47):
Maybe it's solved in future. And again, I hope that those
brilliant minds in the, in the Ethereum space are, are going to
be able to, to solve it. As a user, it hurts me a lot to
to, to have that fragmentation. Like I said, it's not not good
you accent it goes like in the direction of all the like Solana
versus E like North Star and andeverything that I think I don't

(50:11):
think we we need to get into. But so, yeah, we are trying to
be as good as we can in in what we do.
But what it when it comes to ourstrategy for multi chain, we we
want to be in the chains that our like our partners require or
want us to be. So we don't want to be on all
chains because it does kind of dilute, you know like capacity

(50:36):
of the team and making sure we can execute with excellence.
So, but given we are protocol for others to build on top, we
have to be on the on the chains that our partners like you know
quant AM, they have very interesting kind of strategies
that use ZK proofs. We don't haven't talked about

(50:58):
them, but I hope we have some time too.
But yeah, teams like like, like them like they want to be on,
you know, ZK sync or whatever chain it's, it's kind of how
we're, we're approaching our strategy.
We want to be supporting the teams viewed on top of Bowser
and our close partners as much as possible.

(51:18):
And we're not tackling directly the the challenge of like cross,
cross chain swaps or or liquidity.
Yeah, at the moment at least. Yeah, I think that's fair.
It's, it's, it's a hard problem.Let's kind of dive into the
other bigger projects building on top of balances.

(51:40):
So kind of you, you already mentioned quant AMM, they'd be
super interested to kind of hearmore about them.
The other thing that kind of really piqued my my attention
was a gyroscope. So maybe you can give us kind of
like a short overview of what they do and how they leverage
balancer. Sure.
Yeah. So disclosure, I am an investor,

(52:04):
an Andrew investor in both thoseprotocols, though I, I'm biased,
but I do think they're amazing. Gyroscope has been around for a
long time. They are basically, yeah, this,
this the initial idea is, and I think it expanded a bit, but is
to have this GYD coin, which is a stable coin that is based on

(52:28):
like how to compartmentalize risk and make making sure that
whatever you have in your basketof assets that collateralize
your stablecoin. If something fails or goes off
bag, you still have the kind of the system dynamics to avoid
like a, a, a DPAG of this coin that is basically built by

(52:54):
collateralized BMM pools on top of balancer.
So it's quite big brain stuff. But yeah, has been created by,
by really brilliant guys that yeah, from, from, from the UK
that I've been, yeah, very, verymuch a fan of since the early
days. And I think they're, they've

(53:14):
been around for maybe four yearsalready.
So yeah, they also created the ECLP that I mentioned.
It's a very gas efficient AM based on elliptical curves or
elliptic curves. Yeah.
So they, they are amazing. And they have built on balancer
V2 and are are now migrating to Balancer V3.
And kind of an as an aside, it was great to see how the devacs

(53:39):
increased or improved because most of the migration process
was like deleting code. You know, you delete this, this
and then it's very, very much watered down version of V2 is
what they need for V3. So kind of validated our, our
hopes of increasing, improving the X quant AMM is really about

(54:01):
like this initial like original idea of bouncer as an index
fund. And it's actually something
we're pursuing not only with quantity MMM, but with, with Cow
AM Ms. and COW swap as partners.This idea of like index funds
and ET apps on chain, like the main reason why I'll talk about

(54:22):
that. But just quantity, MMM, it's
really like how how to have index indices and ET apps or
exposure of like a pool of assets with a very smart kind of
management that's done on chain potentially with ZK proof.
So you have very complex strategies that you don't want

(54:44):
to make public for people to kind of copy you or front run
you. So they have strategies that are
all implemented on chain, but use ZK proofs or yeah, ZK chains
to make sure that it can be implemented on chain without
disclosing what it is and in a gas efficient manner.

(55:04):
So it's, it's really like using balance of V3 as an asset
manager and, and doing very sophisticated strategies.
We're very excited about them. They got a grant, they got
funding from other VCs and yeah,we're, we're launching I, I
think they're already in beta and, and they're going to be

(55:26):
quite big. I I think on balance of V3.
So I'll, I'll say about the apart from quanti, MMM, this
idea of indices and ETFs, I think we have tried that in the
past and I think it was just notthe time.
It was too early. You know, it's like, yeah.
I know that feeling. You know like Myspace and then

(55:48):
Facebook comes at the right timeexecuting the right way.
So the, I think the, the one thing that was missing back then
and was the cause for indices like index Co-op, which I, I, I
love, I think the idea was great.
Like they leaked a lot of value because of this adverse
selection like arbors and traders have on chain, off chain

(56:10):
information and they just extract slowly the value from
those indices by having better prices than the market.
But now we have the tools we just talked about to prevent
MAV. So all of a sudden indices on
chain are a thing again. So you can have exposure to

(56:30):
NVIDIA and other other like assets, real world assets and
and have an index fund on balancing.
By the way, we launched with thelike help of CARP, like actually
their initiative Carpet key, which is part of the Gnosis
family, as you know, amazing guys.
They, yeah, together with BACT, they launched the first spool

(56:52):
where you can like trade assets and in stocks like NVIDIA and
you can only do that in on Balancer.
So that, that, yeah, that that is something that excites me a
lot about the, yeah, the future of of Balancer and AMS in
general. And it's got an amazing yield as

(57:12):
well, so. Exactly.
It's like I'm, I'm I'll make sure my lawyers don't hear this.
Otherwise kind of like they'll they'll make me delete it for
financial promotion. But yeah, I mean, it's kind of
like the the years you can currently get on Jane.
It's kind of in things that are not inherently risky or not
inherently more risky than doingit on Robin Hood.

(57:35):
Is is is insane. Exactly.
So Fernando, kind of like when Ikind of zoom out a bit, kind of,
I heard 22 somewhat different stories about kind of like who
you guys are catering to, right?Kind of like on one hand you're
catering to people who just wantto let their capital sit there

(57:57):
and not be sophisticated traders.
And on the other hand, you're, you're kind of looking to cater
to protocols. So kind of like if, if I were
kind of a business person kind of I would, you know, I would
kind of differentiate they theseinto kind of like B to C&B to B
to C kind of branches. How, How do you think about them

(58:20):
and how, how difficult is it to kind of like corral them into
one product suite? That's yeah, great question.
And, and I agree with you that that impression might be
floating around for, for listeners or, or for you.
So the way I would frame it is like the end goal is really to

(58:44):
be a, a platform for other, others to build on top and
innovate using their own AMM ideas.
So that the the focus is for others to build a balancer.
And I would say that we what we're doing by having our own
types of pools or joint projectslike like the Cow AMM with Cow
swap and investing or, or being very closely related to quant

(59:09):
AMM and gyroscope. What we're doing is like we're
trying to give examples of successful projects or, or or
protocols that are built on, on Bouncer.
So with the priority fee hook, for example, our main objective
is to showcase how to use Bouncer B3's hooks and make sure

(59:30):
that other Babs or, or teams know like have an example of
something that works. So yeah, it's really like
bootstrapping Balancer V3 or Balancer in general for others
to look at us and see there is like cool things that we can
build on top of balancer. So once we have some traction
and lots of teams building on top of Balancer and, and, and,

(59:54):
and kind of creating cool stuff,then I think more and more our
focus will kind of transition tohelp helping others, like
unblocking them as opposed to our team.
And there's like many companies or teams in the balance
ecosystem as opposed to our teams directly involved in new
projects, like we want to be enabling others to build

(01:00:15):
interesting stuff in the balanceecosystem.
So that that's how I would if itmakes sense how I would frame
it. Absolutely.
Then I want to zoom out even more.
So we kind of started off this episode by kind of elucidating
how AM Ms. were initially kind of this stopgap thing that kind

(01:00:38):
of enabled us to kind of do on chain trading without opening
ourselves up to being to being sandwiched to death.
Now that kind of we have much more advanced cryptography in
principle, we could put central Ledger order book exchanges back

(01:01:03):
on chain. So do you think AMM are going to
be an interim solution or is there is there kind of a long
term space for them in the ecosystem?
I think it's the it's the latter.
I think there is long term spacefor them in the ecosystem.
There is always going to be likethe fast trading like high

(01:01:27):
frequency strategy teams or botsthat are probably going to use
more concentrated liquidity or or obese centralized order limit
order books that that is just more efficient.
And if you can do that on chain,it's it's even better.
And you have like chains like Solana that want to be, you

(01:01:50):
know, like the, the ones where, where people can do that.
So it, it brings with itself scaling problems.
There will be L twos on, on Ethereum that will be kind of
more suitable for that. But I do think there's always
going to be some space for passive LP's who want to just

(01:02:12):
deploy capital to, to let's say L1 or an L2 that has higher
fees. And they, they don't want to be
like actively trading or managing their positions.
So even in, in today's landscape, let's say in the
future, nothing like new is created.
There's no breakthroughs, which I doubt, I'm pretty sure not

(01:02:35):
gonna be the case. Even in today's landscape, I
think there is space for AM Ms. But given that AM Ms. are
evolving and there's like ways you can mitigate LVR and, and
MEV, this is going to be, in my opinion, even more so the case
that there is space for AM Ms. This is my kind of bat.

(01:02:56):
I could be wrong, but I, I, I, I'm pretty sure like some people
called AM Ms. like dad, there's just like X * Y = K and that's
it. And then Unisol V3 came and then
like lots of things that we're doing came.
And I'm sure like in four years it will be hard to recognize
the, the space and how much it will have evolved.
So I'm I'm on the not saying Amms are going to dominate and

(01:03:20):
be the one in all, but I'm sure there's going to be room for
them in the future. I'm pretty sure.
And going on past data in four years is going to be when we
will have you on again. So kind of we.
We can. We can.
Kind of take take up where we left off then.
Exactly. So Fernando, where can listeners
learn more? Where can they kind of start

(01:03:43):
interacting with the balance ecosystem?
Where can they start building their own protocols on top?
Where can they kind of contribute hooks and so on?
Yeah, I think the best way whereyou can ask questions and
interact is Discord dot balancerdot fi.
That's where most technical discussion take place.
Of course there's our forum, forum dot balancer dot fi and

(01:04:06):
our docs as well. If you go to balancer dot file,
you're going to see all the all those different links.
But also of course the the X handle at balancer is where we
talk about the latest and we have some some spaces and
discuss with partners. So yeah, I think that that's
where you should find us. Perfect.

(01:04:28):
Thank you so much for coming on,Fernando.
Thanks. Thank you for having us.
It was a big pleasure.
Advertise With Us

Popular Podcasts

Dateline NBC

Dateline NBC

Current and classic episodes, featuring compelling true-crime mysteries, powerful documentaries and in-depth investigations. Follow now to get the latest episodes of Dateline NBC completely free, or subscribe to Dateline Premium for ad-free listening and exclusive bonus content: DatelinePremium.com

Stuff You Should Know

Stuff You Should Know

If you've ever wanted to know about champagne, satanism, the Stonewall Uprising, chaos theory, LSD, El Nino, true crime and Rosa Parks, then look no further. Josh and Chuck have you covered.

Law & Order: Criminal Justice System - Season 1 & Season 2

Law & Order: Criminal Justice System - Season 1 & Season 2

Season Two Out Now! Law & Order: Criminal Justice System tells the real stories behind the landmark cases that have shaped how the most dangerous and influential criminals in America are prosecuted. In its second season, the series tackles the threat of terrorism in the United States. From the rise of extremist political groups in the 60s to domestic lone wolves in the modern day, we explore how organizations like the FBI and Joint Terrorism Take Force have evolved to fight back against a multitude of terrorist threats.

Music, radio and podcasts, all free. Listen online or download the iHeart App.

Connect

© 2025 iHeartMedia, Inc.