Loading video player...
Hi, if you're looking to build on top of
VI over the weekend, today I'm going to
show you unis swap before along with
hooks. Basically, some sort of like
scripts that you can add to the life
cycle logic. Meaning that before and
after the swap, you can add your custom
logic. And that way you can build tons
of no novel applications for the space
out there along of course with like some
resources, possibilities and tricks for
you to get ready before ETH global
wenosirus. Um during this hackathon we
have $20,000 in prices and two main
tracks focusing of course in this hooks
that I just mentioned. But before diving
in, please let me introduce you the
UNISA Foundation in Brazil of a more
open and fair financial system. The
UNISAW Foundation supports the growth,
decentralization and sustainability of
the UNISWAP community. Um, we are
focusing on five key pillars, protocol
and innovation, developers, governance,
research and security. And through our
grants, we're supporting our community
for sure. So now we can dive in into the
UNISAP B4 protocol or the version uh
port of the protocol. Um, but first
let's introduce what it's unisop as a
whole. At some point, if you've been
here for a while, maybe you interacted
with unis swap interface built by unis
swap plus. It allows you to trade or
swap tokens, meaning e forc
for die, you name it. There's plenty of
possibilities, but as a core, unis swap
is a set of smart contracts that allows
you to um exchange cryptocurrencies or
ERC20 tokens. basically allows you to
build this liquidity pool concept, a set
of smart contract that from one side
connects liquidity providers and on the
other the traders. So that way anyone
out there can swap tokens in a
decentralized way. Uh as I mentioned um
we have uh four versions of the protocol
at the moment but the first version of
the protocol it was launched back in
2018. Um and then back in 2020 the B2 uh
was launched with like the possibility
for you to trade any ERC20 uh to ERC20
token and like a fee tier fixed from uh
zero uh.3% and like a price curve with a
constant product curve meaning like all
of the liquidity was spread out around
the curve and that way the liquidity
wasn't that efficiency as it could. then
in V3 version back in 2021.
This inherit all of the V4 uh V2 and V1
versions allows you to um trade ERC22
tokens. But now you have this price
curve um concentrated liquidity. Now all
of the liquidity as you as a liquidity
provider, you can set the range where
you're going to allocate it. And of
course that allows you to have more
liquidity efficiency, price execution
and you name it along with like more fee
tiers not just uh 0.0% but now you have
other um options. But earlier this year,
we introduced uh Uniswap B4, a
decentralized automated market maker
with this concentrated liquidity uh
feature, but also these five new ones
such as the single door architecture
that it's basically one contract meaning
all of the pools, all the tokens, all
the transactions happens in one
contract. And of course this is super
positive for gas efficiency matters
along with like some continuous VX
spectrum or dynamic speeds meaning no
more fixed uh fears rather you choose
the rules and you play and you
understand how to how do you want to
interact with your users or your LPS you
name it. um also ERC6 uh 909 or flash
account and that it's basically these
features that allows you to have a more
trading uh real trading experience in a
decentralized way from internal token uh
currency transfers uh to arbitrary and
operations with many minimal token uh
transfers of course super positive for
gas efficiency um and then hoops what I
mentioned at the beginning of this talk
which is basically this arbitrary logic
attached to the life cycle operations
meaning before and after the swap you
can decide the rules. Um but let's uh
dive in a little bit into like what I
just uh mentioned in practice. Um back
in the day in B3 if you wanted to swap
let's say ETH for D you had to go first
in the life cycle operation from ETH to
USDC then USC to die or on the other
hand ETH uh to USDT or USCT to die now
and before everything happens along in
one contract one transaction. So that's
super positive for the ecosystem. And of
course here you can see it in practice.
Um but now if you go back to hooks uh as
I mentioned these are just external
contracts that modify the pool behavior.
Meaning um that before and after the
swap as you can see in this swap hook
flow um the system is going to check the
before swap black and then if you add
any some sort of like custom logic that
I'm going to mention about these
functions available it's going to return
that and then execute it. But then after
the swap, it's going to check this uh
flag. Check after a swap flag. And if
you add any some sort of like custom
logic, it's going to return it. If not,
just going to end the swap. As I
mentioned, these are like 14 hook
functions. Um, and I'm just going to
show you some of them here. Before,
initialize, after initialize, add
liquidity, remove liquidity, swap, um,
donate, and you name it. Uh, you just
got to turn it on and off. Important
note in here just uh only one uh hook
can be add per pool but then one hook
serve many pools meaning that it's
composable if at some point you create
something super valuable the ecosystem
anyone out there can also use it and
leverage it of course doing always uh
your own research and check uh the
security purposes. Um, so I I showed to
you like uh this um template. It's
basically all of the functions that we
have and you can turn on and off. This
is basically part of our V4 template. We
developed this for you to create your
first uh hook with all of the steps and
instructions for you to build it. But we
also have in this space the open
Zeppelin uh host library, meaning they
have these base hosts that you can
leverage. And now jumping into uh the
prices. I'm going to show you these
resources in like a little bit. Um for
this uh hackathon we're focusing in like
two main um prices or tracks. One is
like the unisoft B4 stable asset hooks
$10,000 in prices. Important to clarify
you can either to create your cost hook
or you can also leverage the OZ library.
We are looking for logic and the best
way to implement it. Um so yeah projects
here uh here should explore novel
applications of hooks for synthetic
lending creditbacked trading or
optimized uh stable AMM logic no
interface required but of course we are
going to audit the code and then on the
other hand as per the second track we
have unis swap v4 vol hooks $10,000 in
prices and here projects should explore
innovative hood logic that can help
liquidity resilience mitigate loss
versus rebalancing or LVR or improve
capital efficiency for these uh volatile
pairs. Again, not interface required,
but we're going to audit the code. So,
now that you understand from a broader
perspective what is like unisoft as a
protocol, some of the features that we
have in the UNISOP V4 protocol along
with this hooks concept and how to use
them uh these tools that we have uh for
um you know like hack over these uh two
tracks. I'm going to show you two like
some resources for you to get ready. Um,
so the first one and the most important
in my opinion is this UF hacker toolkit
that is going to include all of the
resources that I'm just going to mention
this presentation and even uh more tools
and tricks for you to hack. Um, you can
score uh scan this QR code and all of
these QR codes are the same. So it's
going to take you out to the hacker
toolkit where you're also going to find
this unis swap docs for sure. Um but
also uh like to recommend you like this
how to build a custom hook video from
the open sabling team. It's like super
short. You can check it before the
hackathon or doing it. Um and yeah, that
way you can like get ready and prep. Um
if you have more time before after the
hackathon you can also check um unisop
course by separ. Um but some of my mo uh
most stronger uh recommendation is like
for you to check the unis swap hook
incubator hook directory which basically
unisap hook incubator is our uh
incubator for uh developers to
understand how to uh create hooks from
uh the whole perspective and then cheat
them. Um so there's plenty of
possibilities, plenty of ideas, plenty
of projects that maybe you can get some
um inspiration and of course after the
hackathon you might be able to join uh
the incubator and yeah as I mentioned
before the UNISB for template that is
basically um like a template that you
can use not just to create your first
custom hook but it is going to allow you
to run your own scripts and tests so
that way make sure that your project is
working uh properly along with the Oz
hooks library that I also mentioned um
previous which is basically a set of
like base hooks that you can leverage
again we're looking for the best logic
implementation around stable and
volatile per uh pairs so yeah um we're
also having this unis swap workshop uh
on Friday 5:30m local time and the
workshop room 4 where we are going to
dive in and guide you throughout this B4
template how to use it or even how to
explore and interact with this OC um
hooks library along with of course
answering all of the questions you might
have. My name is Angela Kandle. I am the
developer community manager here in the
UNISA Foundation and you can find me
either in Telegram or X as at Okando
Crypto. But yeah, TLDDR my goal is to
support you and help you throughout uh
this builder journey and process. So
we'll be available 247 in our Hooyo
Telegram group. You can scan this QR
code and of course IRL with our whole
team in the UNISA foundation booth
during it global wosar. So yeah, stoked
to have you and see you soon. Bye bye.
Thank you.
Join Angela Ocando for a workshop titled "Introduction to Uniswap v4", featured at ETHGlobal Buenos Aires 2025! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇦🇷 *ETHGlobal Buenos Aires* This workshop is specifically for ETHGlobal Buenos Aires, a 3-day hackathon held November 21-23 at the Centro de Convenciones Buenos Aires, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! Watch the full ETHGlobal New Delhi 2025 playlist here: https://www.youtube.com/playlist?list=PLXzKMXK2aHh76O7FfAHPJkZcqTIfYpoyf _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city