DeFi'reum

LisCon 2021 · 20 Oct 2021 · 19:04

1inch co-founder Anton Bukov gives a talk titled "DeFi'reum" at LisCon 2021 in Lisbon. The title combines decentralized finance and Ethereum. LisCon is described as a gathering of builders, thinkers and creators.

Speakers

Topics

From LisCon 2021, hosted by LisCon.

Transcript

hi uh i called presentation diphtherium this means defy plus ethereum because uh ethereum was initially born on uh if i was born on an ethereum chain now it's expanding to other chains other side chains layer tools but it was born here and most of the protocols i will discuss uh works on ethereum and ethereum compatible chains so yeah let's start uh hold this presentation is about uh classification of existing protocols and how they differ from each other so i

found the multiple categories like deconization which includes stable tokens portfolio management smart contracts farmings nfts also exchanges category which includes the access actually order book uh basic taxes and liquidity based indexes and some other kinds uh also money markets uh also known as landing protocols where users they mutually fund each other bridges derivatives and also aggregators uh different aggregators dex aggregators

api aggregators bridge segregators so what happens uh with uh stable tokens how it works there are several types there is a visualization for custodian where some funds is located in some custodian like bank bank account or something and the same amount or less is issued on chain as a erc20 tokens there are stable tokens to different assets like us dollars euro btc or gold and also synthetic assets like uh s as usd as something

there are also uh kind of decentralized table tokens where which use a collateral exceeding amount of printed minted tokens and this allows them to have like not use any custodian service they works on oracles and have liquidations one of such systems was a maker dial which allowed to print die stable token for a eth collateral but now they support much more different collaterals and

there is one more case where collateral is on other chain for example uh rapid btc works like this btc is being locked on blockchain bitcoin and wrapped btc erc20 token is being minted by uh by multisig on ethereum uh also part of technician is uh portfolios management uh projects some of them are instant rebalancing like unisop version one version two balancer power pole curve what they actually do they keep uh your portfolio in

balanced state every moment it's balanced but when price moves it's a subject for arbitrage to get some profit and rebalance it some of uh projects they have more complex rebalancing strategies like token sets and the power pool version 2 it's like mix of instant rebalancing and more complex rebalancing thing and some of them also do this for diversification like btc plus plus usd plus plus uh here are some order book based indexes first dex was uh first well known the x was either delta and it's works it was well known for its off chain order so

this means you can place limit order by providing signature basic order and do this without paying gas but those who will try to fill your order he will need to pass this order in arguments to the smart contract then oasis app the the first versions of it was uh like the dex which was the only decks who had on chain orders on chain limit orders and it was maintaining their sorted orders and allowed on chain market orders on them also xerox protocol initially they had

idea of different layers like different subjects who were responsible for listing tokens and allowing this exchange of orders but now they move to peer-to-peer model and they share these orders with everyone also air swap project they were like rfq system uh you could use it as request for quote you requested that you want to swap something they could provide you an order and you can partially feel it you had to fill it fully also acknowledge this protocol it's a kind of

thing which allows users to place limit orders but then what happened uh happened auction of solvers which performs settlement so it it do not provides any market order at all comparing to others and the one-inch limit of the protocol we released it we did a lot of guest optimizations comparing to others and also we provided some additional features we needed like conditional feeling it's like when someone will try to fill order there is an arbitrary call which uh decides is it allowed to perform this

order or not it's allowed to build like a stop loss order or trailing stop loss order uh or something like this using this feature and also we have arbitrary price feature so you can drop any kind of auction here you can wrap your dutch auction for example where price is falling every second you can drop it in limit order and the arbitrage traders will easily feel it uh also i'm gonna show some visualization of liquidity based taxes here the first of them was banker uh in 2017

[Music] they built a kind of pools where there were two tokens and uh all of them were pairs to bnc and you were able to swap any token to any using middle token bnt you can stop die together over bt here later later unislope version 1 was released and it was looking like much more simplified version of band car uh with editor in the middle and it became much more popular uh later version two was launched it allowed not only using ever with talking but also talking to token and version three had uh significant differences i

did not visualize it here uh also balance era period the interesting fact that balance here and uni swap they works on the same formula balancer formula use of v2 and v1 i mean balancer formula is like generalized formula for arbitrary number of assets and arbitrary weights where union swap is like a case of this formula where only there are only two tokens and weights are equal and uh yeah you could think of balancer as a multi-dimensional uniform and curve finance is a project which found more interesting and more uh

capital efficient curve for assets of the uh who are effectively stable tokens of the same assets like stable tokens of die of usd stable tokens of bitcoin uh this solution is quite popular right now among different bridges because they breach liquidity and have to swap to some kind of native assets and stable tokens on the target blockchain there are few solutions which works as a complex rebalancing strategies like token sets and powerful v2 they do change proportions of portfolios on some

[Music] different conditions yeah this is uh visualization of farming so users have to put it's farming of some liquidity protocol like union swap you have to put your different assets into the liquidity pool and you would get rewards in the same assets but if you would put your pulled liquidity into staking pool like farming pool you would also get extra farming reward on sliders taking reward yeah but uh like an official naming of this process was farming so this

idea lowered uh money uh amms automated market mixers liquidity-based indexes to attract more liquidity from users and stimulate this liquidity this is what actually exploded the tbl of all the d5 in 20 20 20 because first this farming appeared in synthetics protocol in the beginning of 2020 and also money markets they could be used for borrowing quality rises borrowing you could provide either and borrow some stables of usd you can do the opposite you can also build leverage you can have it on your

own or you can use any existing framework and there is also lottery based on leaning protocols like lottery when you where you can can't lose that's how it looks like there are different pools of different assets and what you can do you can characterize your asset and get depth in another asset so your position cost of your position would be the subtraction of your collateral and your depth and you have this depth on your hands you can use it as you as you wish but what you also can do you can uh use these borrowed assets

to swap them into collateral again and add collateral and borrow more you can spin up your position to churn for example 1 000 bucks you can turn it to 3k or box of header and 2k bugs of usdc depth so you will still have 3k minus 2k it's 1k but now you have 3x exposure on acid it's like 3 3x long adder to usdc and you can do the opposite you can open long usdc together it will be short in header so uh it's possible to spin up this position on your own using any lending protocol but you can also utilize any

leverage framework with flash loans to have it with one single swap inside instead of spinning up your position with multiple swaps and transactions uh and the lottery idea was pretty simple they just put all the funds into uh money market earn extra interest and they made the they forward this interest to the winner so they made lottery where winner gets interest so you can deposit funds participate in lottery and then you can withdraw your funds you can't lose here so it's maybe the only positive cash flow

lottery and the aggregators of the xs the idea how they should work how they work it initially and how it works now so the first idea was to just select the best price find the best market that's how early version of kyber decks initially was working they had multiple different resources and they selected best of them on chain but what one inch did in 2019 on hackathon we came up to ideas that the more slope on each decks the worse is the rate but if you would just split your volume

among multiple taxes your exchange rate will be improved and you will get better rate and uh it was like you could imagine is this as a glasses where hate of each glass is a price on this market and white of this glass is liquidity so how it could happen this is not really good solution this solution is much better so when you swap on multiple markets you shift the price to the same new price this uh allows you to avoid any back running so if you do aggregation aggregated swap

and some back running happens uh like fully unchained someone earns on arbitrage this means your aggregation was not successful so successful aggregation means that there is no room for arbitrage right after your trade for on-chain arbitrage it could happen off-chain with other taxes but actually professional market makers connected to aggregators they could also breach centralized exchange liquidity so if you are swapping like a huge amount of money and really moving the price on the market the market makers they could also sell you uh from their resource and they will

immediately hedge their position on other uh environments like on centralized exchanges other chains so actually you can shift price not only on one blockchain but on uh other sexes as well and uh it was how it started but how it's going now the process of aggregation it's actually a problem on a graph where nodes are different assets and edges are different backs different poles and what happens you have to find the best multi-path from one asset to another asset using some middle assets and you have like a

multi-edge graph and some nodes of it are also dependent like curve three pool have three assets and uh yeah it's presented as multiple edges here but yeah they're dependent it makes everything much more complex to find the best road yeah that's how one inch uh internally works so yeah the question is simple so right now one inch does aggregation across texas per chain do you see a future where one inch does

aggregation across multiple chains at once one one okay yeah it's a good question i get it pretty frequently now yeah everyone heard of cross chain cross chain swaps cross chain aggregation bridges bridge segregation but i believe its journey for separate startup because what one inch have it's uh fully atomic aggregation and it provides extra security layer in own smart contracts but what you would have if you have like a uh aggregate cross chain not all bridges

are equal it's hard to aggregate them you have to describe users how they differ from each other and users should decide because sometimes uh the time of bridging is more preferable sometimes the uh reliability of bridging is more preferable if amount is pretty high you can wait for hours but it should be safe for you and uh cross chain swaps um what what i actually said uh we have all on one inch all the liquidity from other chains and centralized exchanges and using private market makers and their competition to each other it's getting better and better and uh it's still atomic for users this is really important but if you would try to build some cross chain

aggregator it would be insanely complex and your funds can be stuck in some middle assets like if you're swapping pc20 on one chain to in c20 in another chain probably you have to swap it in some middle asset like coin like b or other for example in the middle but you could stack in this asset just imagine you are swapping usdc from one blockchain to another blockchain and you got stuck in nether for 20 minutes it's too volatile for you you can have unexpected losses here it's like a lottery so yeah this is like a really complex question and uh it's a journey for separate startup i believe we have a grants program one inch so if you are building something

like this yeah come to us apply and let's talk yeah thank you