Initiation to DeFi with the GTON Capital Team (for Traders, VCs and non-devs)

ETHDubai 2022 · 30 Mar 2022 · 3:03:06

GTON Capital contributors introduce DeFi through Uniswap and SushiSwap liquidity pools, Aave borrowing, Curve and Convex incentives, and DODO market making. Live demonstrations cover swaps, liquidity provision and lending on Fantom, followed by token sale and treasury considerations, and deploying and verifying Uniswap V2 contracts on a test network with Remix.

Speakers

Topics

From ETHDubai 2022, hosted by DeFi Dubai.

Transcript

um [Music] i myself haven't haven't been awake since the very morning so i hope that gradually we'll get into the rhythm so uh let's first make sure that you have arrived at the correct workshop it's called initiation to d5 as you can see it will be largely high level overview of different protocols several popular ones and uh their usage patterns and it is dedicated to non-developers at least the first part is we'll be talking about unit swap sushi swap ave and probably gearbox if you have time and the second one will be done by my colleague here alex he will talk about dodo curve and convex

also an absolutely identical workshop about the same protocols will be hosted today after lunch by the same people okay hopefully everybody's where they want to be right now uh so again we'll start with the very basic stuff can be boring at first then we will uh dive into some developer stuff as well so um right um let me first start about talking uh start my talk about myself i'm really happy to be here among uh all the wonderful people uh who contribute to this industry um my name is ilya i'm core contributor to jiton capital dao maybe yesterday you participated in our party in the evening

so we are one of the platinum sponsors and co-organizers of if dubai and i myself am mostly busy with like research papers testing different models writing documentation stuff like that and uh just a quick overview of what we've done so several years ago the founder of gc uh gton capital alex pupashap he created venlab so we were like a web 3d development team um and i've been working there as a researcher for several years so when lab created different moocs for web free developers on steppik and coursera and um it was a success lots of devs joined so uh we started like with education and um

so one of the crucial projects that we did was neutrino an algorithmic stablecoin um with uh billions locked in tbl and uh now this point is fully owned by waves protocol uh so currently we're building a dao which revolves around the concept of algorithmic governance tokens um i won't give too much ddr ddl about gc dial in this talk just won't have time but if you're interested you can check us out at gtan.capitol or tomorrow you can just join our team at the booth and uh is that is there some feedback okay so uh this was the most important thing i wanted to say but

i screwed up so okay g10.capital tomorrow we'll have a booth um you can just you know come up and talk to our team members um um yeah we're awesome very welcoming so uh first i'd like to start by um it's interesting like the stuff i say gets repeated okay anyway uh so why am i in crypto you know i think the world will be just a better place if people shared more about their motivation and their intentions uh so a couple of key points here i see the current d5 ecosystem as many sort of simultaneously ongoing experiments in governance and monetary

engineering and which all attempt to answer questions such as uh how do we create aligned communities um you know in terms of game theory and uh how do we maintain corrective incentive strategies stuff like that so this is important because it is a way for us to see into the future see how our society could work cooperate collaborate you know incentivize different agents etc so another point here is earning a gift maybe some some of you have heard about effective altruism you know if i get lucky and earn a lot i'd like to you know donate parts of my earned capital to effective charities uh

you know for instance it is done by the founder of ftx and alameda i'm back from free it's definitely one of the people in the industry i'm inspired by uh also complex systems research you know every project uh every crypto project gives rise to you know a level of complexity either like from the interaction of uh people as rational agents or of models and assets as sort of dynamic systems so um and uh i like to look at the world through the lens of complexity and uh i find this particularly interesting from the research standpoint also ai safety some people say that blockchain could help us in ai safety research through decentralization could be true

we will see so to summarize okay no that's uh but all jokes aside crypto has both experimental value and if monetary gains come along the way that will be nice too yeah quick introduction um i'd love to know about your own incentives and motivation but maybe we can talk about that after the workshop so again um this workshop is called initiation to defy i think a more apt title would be demystifying defy let me explain why so it's dedicated to people who um while having sort of a high level understanding of what crypto is who you centralize exchanges

but they have not yet been able to dig deeper into decentralized finance maybe you've done like a swap or two maybe used a bunch of protocols you know you want to do it with more confidence so right away if you are much more advanced much more proficient the first part definitely will be boring but then we will dive deeper into the uh developer stuff so maybe that will be some you know of use for you so my talk will be protocol centric we will review several protocols and uh through that review process we'll we'll be able to sort of uh grok the uh the most useful d5 primitives um right so uh

i hope i can show you how d5 you know is a subset of the crypto world how it is different and free and elegant stuff like that so um yeah and again if you want to go hardcore my colleague alex will be starting his presentation in about an hour here which will be more depth oriented uh okay so uh talking about the prerequisites that are important to know before you enter defy just understanding what defy is as a concept understanding how it is non-custodial and permissionless um just a broad understanding why why you need it personally because i think sometimes centralized exchanges they you know do what they got to do and they

uh they actually fulfill every need maybe you can get by you know just by using binance but if you if you want to try d5 you know you got to be familiar with metamask because the main wallet defy i won't talk about it much as i assume that is it is in a way like a universal kind of knowledge um and there are tutorials and also i think there's a workshop called metamask today if i'm not mistaken yeah um right so let's start with uh the first protocol on the list the pioneering protocol is called uniswap and you know as it usually is the case with large d5 projects such as uni swap the name itself it can mean a bunch of

different things in different contexts so it's usually important to clarify what you mean when you when you say like uni swap so sometimes it means uni swap labs which is the company that developed the unit swap protocol and the web interface um it could mean the interface itself that you can use for interacting with the protocol the interface is only you know one of many ways a user can actually interact another way is for instance to call the functions on smart contracts directly by writing scripts uh i think alex will be showing that um also uni-swap governance a governance system for

you know governing the universal protocol and it is enabled by the token uni finally the default meaning for today's talk is the protocol itself so it is represented by several smart contracts on the ethereum blockchain and together they implement the so-called automated market maker concept so that makes you swap an amm dex so i will primarily be focusing on that today and what's interesting is that in most d5 projects the separation into like the builders the ui the dow the smart contracts exists same things with gta capital where i contribute and you will see this pattern everywhere

right so now let's see the definition of unity swap or like one of the definitions of units while breaking down into pieces so the unit swap protocol is a peer-to-peer system designed for exchanging cryptocurrencies so peer-to-peer here means that all the participants can enter into the system on equal ground and they sort of interact with each other to produce value without any intermediaries now the protocol implements so-called automated market maker as a set of non-unbreakable smart contracts on the ethereum blockchain [Music] the market maker concept as a sort of building block of crypto today and try to get intuitive understanding of how it works then

there's like non-upgradable smart contracts uh essentially means that once they're deployed the uniform smart contracts will function perpetually as long as ethereum exists so uni swap is ethereum based but sushi swap which we'll be reviewing today as well has liquidity on multiple different chains so if you're into using uh some other chains for some for some reasons then sushi swap is the project to go um all right so let's talk a little on the point of permissionlessness why why is it important in um in defy so uh uni swap is designed with several ideas in mind it's like censorship

resistance security non-conservative approach which means that your assets are your own and also the lack of any trusted intermediaries who may restrict access so you know it means that anybody can trade anybody can set up a pool become a liquidity provider etc uh not the same with centralized exchanges uh people again can get censored people can get restricted from using centralized exchange it happened already multiple times so you know in my opinion some of these whereas the restrictions of

a traditional centralized exchange do not and uh although traditional exchanges they are currently crucial for crypto uh because they allow to bridge the gap between the uh fiat world and the crypto world they and the amanda x's are built on completely different principles and um to understand how amm such as the unisport protocol um differs from a traditional exchange let's look at two aspects we'll realize how permissionless systems differ from conventional permission systems and we already talked about how permissionless design means that the services are open for the public nobody can restrict anybody can swap

provide liquidity stuff like that um but now let's focus on how the automated market maker design deviates from traditional order book exchanges so uh among the people here who trades stocks somebody one person good so you're probably familiar with order book systems or those of you who have used centralized exchanges crypto exchanges so most financial markets they use this kind of an order book where buyers and sellers just create orders those orders are organized by price level and also time so audiobooks are foundational to financial systems they work great sometimes there are a few important

limitations which sort of stand out even more in a blockchain setting so to sort of counteract that the unisport protocol proposes a different model instead of an order book uses an amm the particular amm approach that that is used by uniswob is called constant product market maker and we'll see what is meant by constant product so if you look at this from a very high level perspective an amm replaces the buy and sell orders with a liquidity pool of two assets and their price is determined relative to each other on account of the existing reserves in the pool

so uh essentially when you as a trader exchange one asset for the other the relative prices of the two assets in the pool shift and therefore that's how the like a new market price for both is determined um so we'll review this model in my in more detail later um so it is important to know here that a pool is just a smart contract so you can either use the use weapon interface and like through through the through the niche version we'll be calling functions on the smart contract for instance like swapping tokens just calling a swap function while providing liquidity is calling the deposit function

and yeah so just how regular users or traders can just interact through the interface which in turn interacts with the underlying contracts developers they can write scripts to directly call the functions and that's how they can integrate unispot functionality uh into their own applications and they don't rely on any intermediaries in that process right so unit swap uses what are called liquidity pools but why do we use pools so the thing about order books is they are centrally operated they require essential operated infrastructure so if you try to create a decentralized

version of an order book on an evm blockchain for instance you instantly encounter the problem of you know exorbitant gas fees because every time you need to change your order as a as a trader or a market maker to cancel you need to pay a gas fee for you know to proceed with smart contract interaction so not not optimal for the end user at all and if you look at the implementation of order books that's that's the big problem so so as a liquidity provider to another book you are required to actually actively manage your orders continuously update in response to how the market changes

also with with an order book most of the market makers they use sophisticated infrastructure and algorithms therefore this sort of limits your participation if you don't have access to those kinds of scripts stuff like that so to sum up if we want to create a liquidity protocol which would be blockchain native we should take advantage of what blockchain has to offer right of the inherent blockchain features that's how we got the pool model there are multiple versions of the uniswell protocol v1 and v2 are open source and they're licensed under

gpl v3 is also open source with slide modification so you you know even though v3 is currently the default version for unit swap most of the forked exchanges like sushi swap or any exchange which is uh popular in other blockchains such as phantom for instance like spirit swap or pancake swap on bsc uh most of them are based on smart contracts of v2 um and it seems that you can't just fork if i'm not mistaken can just fork v3 for for a year uh yeah just for two years maybe after that so they just said like we want the

community to start building it first and then um and generally like the way the uh launch of v3 went uh you know it was deemed a bit controversial so their launch strategy cetera so that's why i'll be focusing on the v2 model used by the likes of sushi swap for instance um right so uh let's talk about the participants of the uni swap ecosystem so i would say there are like three types of users um liquidity providers or lps traders and also developers so i'll be focusing on the first two um how does uni swap actually attract

liquidity providers so uh they are incentivized uh to deposit their like payers of erc20 tokens to liquidity pools and then traders can exchange those tokens for a fixed fee 0.3 and this fee gets redistributed among liquidity providers and that's exactly how you actually can earn as an op also there are several different types of liquidity providers there are passive lps they just deposit tokens they accumulate trading fees over long periods of time but this strategy it is negatively influenced by

effects such as impermanent loss we'll talk about that as well so professional ps are different because they can develop some sophisticated custom tools and they focus on market making as their primary strategy so they can track liquidity positions across different uh d5 projects and in order to be able to sort of reshuffle and optimize their strategies and also counteract in permanent laws so finally tokenized projects where they become market makers for their own tokens when they release their tokens they conduct for instance ido's initial dex offerings and uh they uh become lps for their own tokens to create uh sort of liquid

markets uh yeah for their token right um if you talk about traders there could be just speculators that use unison-based tools and products and they swap tokens they use the liquidity provided by lps and they earn some profit that's simple there are also arbitrage bots arbitrage bots have to have certain degree of autonomy and they essentially earn profits by looking at prices across different uh exchanges different platforms maybe different blockchains and uh when they find an opportunity to make a profit they swap that's how that's how it works so this

is actually really helpful because you know it sustains sort of an equilibrium of prices across different markets um and uh yeah so arbitrage is actually a very useful thing so tap users they buy tokens and you swap and uh they use them in other applications on ethereum because most of the adapts they're actually composable you can use for instance i'll be showing you how you can take a loan on ave and you can actually go to uniswap and put it into liquidity so everything like works uh as sort of a money lego i would say so uh

right and for each type of trader uh if you do a trade you are subject to a flat fee for trading on the protocol so for unity swap is 0.3 as i said all right so now we've set up sort of a background let's dive deeper into the nitty-gritty um unfortunately i can't point to i don't have a laser pointer but anyway so uh each unit swap smart contract or pair of assets it manages the liquidity pool and it is made up of reserves of two erc20 tokens so you need both tokens here uh some projects such as dodo and i think i

think bancor they allow single-sided liquidity you can just put one token and right so anyone can become a liquidity provider you can just deposit two tokens an equivalent value in return for so-called liquidity pool tokens or lps so these two these tokens are sort of represent your share in a pool and they are used to track liquidity shares think about them they can be burned and redeemed for liquidity for the underlying assets at any time right um so how are we doing

is it good do you like it i just need to drink some water the party yesterday it was crazy i mean actually let's do like a quick um instead of you know back and forth questions and answers uh who here actually used unit swap what are you doing we're talking about basic stuff but no i mean i'm kidding um so who here are you know liquidity providers nobody so you you only use unisport for trading right for swapping

okay um just interesting to hear some opinions about why you haven't tried to put some liquidity and uh is it because of impermanent loss is it because the uh um the rewards are not so great or maybe somebody can chip in hmm right right right

yeah got it so uh yeah basically if you do a passive investment strategies liquidity provider um it's kind of hard to counteract impermanent loss because you have to keep track of how much you earn in terms of trading rewards the fees that gets redistributed you have to sort of rebalance and understand strategically and long term understand whether the fees that you will get will actually um you know uh will actually be more than the impermanent loss that that will be associated with putting this liquidity so yeah that so that makes sense to always calculate always find optimal strategies and solutions here but okay let's talk about liquidity

deposits if we just zoom a little closer into how liquidy supervision is done uni swap as an amm is powered by constant product formula a legendary formula x times y equals k so uh pairs they act as automated market makers and the pool accepts one token for the other and uh the important thing is here that the relation determined by the constant product formula should remain the same so k is sometimes called the invariant because it's constant so yeah basically formula states that the trace that happened must not change

the product of a pairs reserve balances so why was this formula chosen this formula has a property that larger trades uh it's it is a useful property uh larger trades they will execute worse rates than smaller ones uh actually exponentially worse rates right so therefore therefore the pool uh won't get rid of liquidity instantly there's a certain although like there's a certain low slippage area where price impact is minimized there's a certain um interval of assets that you can trade without uh very large slippage so basically

um it also means that if there's larger liquidity in a pool you will get a better trade right so for any project like a tokenized project that starts market making it's important to manage your liquidity and that's one of the one of the ways to actually manage participation of people in your in your project you can tweak liquidity so withdraw put it back in and that's how you essentially create a strategy for market making um right so uh this one

you mean i think i think it's probably an error just taken from the university communication but but i mean yeah the math doesn't add up i agree i think that the reserves they're like bigger because it says here 1210 anyways we'll just go ahead um still still doesn't it still doesn't add up because it has to be uh 1203 plus the fee right

but you know uniswap is open source you can just find the documentation fix it uh anyways but thanks for noticing that um right so where was i at again you get your lps you can burn them at any time to receive the underlying assets um plus as soon as you burn your lps you get the proportional fee allocation that has been collected while you were an lp so one of the important points about lp

tokens is as they are themselves they are tradable assets you can sell or transfer those security tokens in any way you want so basically if you send your lp to another address they will own your liquidity in the pool it's really important because you need to protect your lp's as much as possible in a project setting this would require using a multi-signature wallet if there's like a large amount of liquidity so you know lps are really precious so talking about permanent loss now if you are a liquidity provider you wish to earn trading fees you may think oh i may put my liquidity

forget about it well not so fast there's the thing which is called permanent loss it happens when the price of what you deposited changes compared to when you deposited uh the assets in the pool first so the larger the change is the bigger the loss so in this case in permanent loss essentially means that there's less dollar value at the time of withdrawal than there is at the time of deposit and when one of the tokens that you deposited grew you may actually be better holding those tokens rather than putting them into liquidity pool so you need to always check whether the trading fees that you may get will

counteract being permanent loss and sometimes it's just better to hold rather than deposit so uh right now let's talk about swaps another d5 primitive which is used everywhere um you know just a simple way to trade one your c20 token to another and uh again the formula itself it states that when either token is purchased a proportional amount of the other must be solved in order to maintain decay constant although in practice unit swap also applies a 0.3 percent fee to trades and it is added into the reserves

so there's a little uh like bias there as a result actually each trade increases k but this the surplus it actually functions as a payout to lps right and it is realized as soon as the tokens are burned and as soon as all people draw their portion so right let's imagine a situation where i as a trader i want to sell my three token a so if i put three tokens the mm needs to determine how much it will give me to keep the total product intact uh so right if there are like 1 200 and 400 token reserves it will give me one token

pretty simple uh okay again just uh room check how's it going so far i mean i'm trying to understand whether uh you all know about that and we just spend this time for nothing but um so is there like anything new you've learned so far somebody okay sure can you say it again oh that's awesome thank you

right so unit swap v3 is a bit different now it actually um uses what what is called concentrated liquidity uh so it allows an lp to uh set up a certain interval of liquidity uh and the trades that are going to be happening in this interval uh his or her funds are going to be used as much as possible so it allows you to set up along the price curve to set up different uh different spots which you prefer your liquidity to be used but i won't be showing v3 today uh actually all the practice is going to be

using sushi swap which still remains a uni v2 type of project and one of the things about sushi swap is it is present on very many low gas feed chains like phantom bsc so if if you want to get into trading and liquidity provision and ethereum is maybe too expensive for you um or if you want to test some things then sushi swap is the way to go right um do you have anything to add i just want to drink some water uh yes so i want to add that actually although this

is named like uh for non-developers it's no so it's for the stream yeah okay okay okay okay so now i hear myself yeah and so the thing is um it's actually really easy to deal with the code with like select deployments etc uh currently so i'll be showing you how to

uh like get the smart contracts for example the unit swap p2 and deploy them yourself so for example you might need this uh for test net deployments to uh if you are building your new infrastructure and you need to test out how your smart contract is going to be interacting with the union swap pools it's very easy to do so like it's a matter of like 10 minutes to deploy such a contract on on the test net so yeah i hope this would be really helpful does it work okay hey you can as alex said you can be a

you can write a script and you can interact with smartwatch directly for end users it looks pretty simple if you are liquidity provider you need to have a pair of equivalent value in your wallet and you need to deposit it if this pool already exists the rel the relative value is determined already so you have to conform to what the pool says is the proportion so if you create a pool you are uh the first person to actually determine what the the rate the proportion between the two assets is um right so uh for end users swapping is also really intuitive

this is the actually like most of the projects they just fork the uni swap interface uh where a user just picks an input token and an output token if there's enough liquidity if actually if this pool actually exists if it has enough liquidity they can do the swap so they specify an input amount and the protocol calculates how much of the output token they'll receive then uh another thing is that they usually need to approve being able to sell their tokens and execute the swap after that and they will receive the output token as soon as the transaction is executed right so uh

i'll be showing you all that at the end of my part of the speech now let's talk about ave um who here actually used ave to to land some tokens one person two people three four good one person from my team amazing uh right so let's start with the definition again so we actually went through all the basic stuff so maybe now we'll just go faster so akin to uniswap ave is a decentralized non-custodial liquidity protocol basically represents another basic building block or primitive

landing right so users can participate in ave as either lenders or borrowers lenders they provide liquidity to the market they earn a passive income they have to monitor their health factor [Music] they have to make sure oh no sorry i'm mistaken so lenders provide liquidity right to the market to earn a passive income and the borrowers are actually borrow in two fashions are there over collateralized or undercollateralized the second one happens in one block um so

again the funds for loans are stored in smart contracts so called landing pools uh works pretty similarly uh principal is pretty much the same so there are two basic parties they want to provide something another gains from it so right so in order to use ave you simply deposit an asset in some amount and after depositing you will be able to earn passive income based on the demand from borrowers so additionally um if you deposit assets you become a borrower yourself so you qualify to become a borrower yourself and you can use your deposited assets as

collateral it's an interesting point that you can actually earn interest by depositing funds and it may pay off the interest rate that you accumulate by borrowing so uh yeah right right

uh it's pretty normal i mean uh i think uh sushi was like a pioneer of staking urlp for not mistaken but the thing is like with pancake swap uh you add liquidity and they can add your lp tokens to farming and get additional rewards so a lot of liquidity providers to do that so right now yeah it is quite a basic thing um so right and the amounts that you earn as an avid depositor or the holder of a tokens uh they evolve through time so there's like an apy that you can sort of analyze but basically this interest rate payment uh

it depends on the utilization level of your deposit right so uh actually corresponds to the average borrow rate times the utilization rate so the higher these two factors are the higher the yield for you as a depositor um right so each asset in ave it has its own market of supply and demand has its own apy which evolves with time so uh you can use like the dashboard to find the uh the average annual rate over a certain period of time like the past

30 days you can evaluate the evolution of the rate and determine if that deposit would be actually profitable or not for you right so uh why actually borrow yeah sure uh i'm actually not sure i think we will um clarify that when we see uh oh really

cool thanks for that point yeah i didn't know that um interesting yeah there are a bunch of details i will also i think we'll go over i'll be showing the dashboard itself i'm not sure i'm just do it i'm sorry it's actually

basically like the price for lending the token and the price for getting the token because there hmm

oh yeah that makes sense yeah okay yeah thanks for for those additions uh i think it's quite important so um yeah i was talking about like why do you actually need to borrow so for instance you hold a certain token and uh you can earn some profit uh when the price rises up right but if you sell it means that you close your position on that particular asset so if you if you want to like long the asset um even like further you won't be entitled to the potential gain in the future so by borrowing you're able to uh obtain this working capital and uh

you like without selling your assets right so usually reasons to borrow it's either some unexpected expenses or maybe leverage or new investment opportunities um right also this wrong slide number sorry yeah yeah okay so uh the uh the health factor essentially represents the safety the safety of what you deposited um and uh what you deposited against the borrowed assets so the higher the value of the health factor is the safer the state of your funds and there's a liquidation scenario and

you need to be able to protect against that so as soon as the health factor reaches one uh the liquidation of your deposits will be triggered and uh so depending on the value and the the fluctuation of value of your deposits the health factor will either increase or decrease if it increases it will improve your borrow position uh and uh because it makes the liquidation threshold unlikely to be reached right so if it decreases yeah vice versa the risk of liquidation increases so uh if you want to avoid the reduction of your health factor you need to

add some more funds like to repay the loan or deposit more assets uh that will increase the health factor so out of the out of these two available options if you repay the loan fully it will increase your health factor more so um right uh actually i'm not sure to be honest yeah there's a certain threshold when draws below that will be liquidated um yeah so that's it now um i'm going to be

showing you some some practical stuff oh give me a second i need to set up screen meanwhile if you have some questions maybe you can i don't know address that to alex because i need to do that hold on so no questions maybe maybe you want to add something that i missed alrighty

oh yeah definitely so there are different aspects that you can borrow so for example uh this is happening like when you uh kept one asset for example ethereum but needs to make trade in some other small amount uh

permanently yeah yeah of course so it all depends on the market so they have to have liquidity in that token basically like the is [Music] yeah we can just go ahead and

look at squishy see how it works right so first and foremost uh sushi implemented a new kind of interface new kind of protocol which is called trident they actually allowed to i think if i'm not mistaken they allowed to use their land their own landing protocols called bentobox right from the interface here in trident uh let's start with legacy first um this is actually the uh interface that you will see in many many

different kinds of exchanges and i specifically started with like a fresh completely fresh setup i only have my metamask account here funded it with some some tokens so we're going to be doing some weird combinations of liquidity pools give me a second uh right so maybe so why am i not showing you unit swap because i want to uh actually use some other blockchain other

than ethereum for this demo makes sense right so right here you can find a very wide selection of different blockchains actually like with gton capital uh we started on phantom i think it's a great ecosystem we are partnering with we we've partnered with lots of projects on phantom and uh probably going to be showing you uh we're going to be doing transactions on phantom actually ave also allows to use phantom uh right so since it's a fresh setup of metamask i don't even have the network added i

did that on purpose to show you that as soon as you want to interact with the new blockchain most of the projects they actually like right now they allow you to as soon as you switch to a blockchain in the app they provide you with all the necessary like uh credentials and rpc url and uh you can just approve and switch and then you will be able to see that network and interact with it through uh through your metamask interface right so uh don't look at this i haven't back up my secret recovery face because this

address is only for the demo i'll just uh won't use it anymore so i've already pre-funded my account with some ftm i'm going to use that to pay for gas fees here so let's do oh actually by the way let me show you um one of the important things here is that i don't see any other assets here only ftm only the native token but i know that i have a bunch of them on my account so if i go to ftm scan you can see there are there are a bunch of tokens like curve band cream i need to add those tokens into metamask to be able to track their movement and

understand how much i have on my balance right so it doesn't work uh all the time i hope it works right now so if you find this token on any scanner uh you can actually um instantly add it to your web3 wallet to metamask for instance so if you go here yeah it needs to be connected to phantom first right now they're they're on my address on phantom network so uh

they're just not um depicted in metamask so it's uh on the blockchain itself that's the thing the metamask uh connects through an everest another financially watching your shows so um um right yes so so you've done something on

the go right you're going to be there i could have just bought from this open somewhere maybe i've never interacted with her right maybe i just swapped like on sushi swap right so uh this particular uh case in this particular case i just sent it for my other address so uh this is completely fresher for us so i haven't really used that information what uh right so

yeah it doesn't really work so okay it doesn't really work but we can actually i'm having a very weird situation here right now so i want to import import myself just by using the address i can't do it because it doesn't allow me because i haven't backed up my screen that's [Music] like everyone on the embarrassing is gonna see it yeah [Music]

so the guys are a little bit screwed we'll see if someone pulls them out like 300 million yeah yeah probably but maybe they're going to return funds so okay yesterday the party i was talking to some people uh that are like doing some development and basically uh they accidentally found a vulnerability in the account like got like 50 million out of this but returned it

nevertheless so yeah there are like white hats as well so hopefully this is a a good hack and not a better one i'm still doing the thing what sort of thing uh yeah by the way so the password is supposed to be like uh mar all capital mar 22.

by the way uh does everyone have laptops with you because yeah well on my part we're going to interact with the code and i'm going to ask everyone to try and do it yourself because really it's not that complicated like all the stuff that uh developers pretend that it's very complicated it is actually not so the hard part is probably like making sure that the protocol is sustainable etc and like uh like little quirks etc but that there are a lot of cases when you need to like deploy a simple erc20 token something and this can be done really easily like from

already available stuff that's already on the internet it's easy to interact with the contract as well so get it listed anywhere like in case it's something open source so good stuff so uh managed to do that so if uh if you don't see your token you can just import it to do so the the easiest way is just to go to the scanner of the blockchain of your choice to put your address or just view it in explorer right and

if you find your tokens over here like i want to use let's say i want to use curve right now and i need to add it to my metamask so i copy the address go to metamask and i'm importing it by putting the token contract address uh it already fills the all the necessary uh fields here right token symbol second decimal so i'm adding the custom token and right now i can see that the balance showed up in metamask so now if i want to send it somewhere i will be able to choose it from from the menu so essentially um what i wanted to do just show you some

simple swaps let's find the crv token here by the way not all tokens are actually white listed sometimes you need to maybe add it from some token list or maybe like add a custom token if you want to but if you know that this liquidity exists on sushi uh but it's not whitelisted you need to add it uh yourself yeah yeah so you just find it and like basically either in the documentation of the project that you of the token that you want to use or uh uh use use the scanner but when you like an explorer right so but with explorers

it's important to know that sometimes you search for a token and there are multiple versions you need to make sure that you find the official and correct version because sometimes there's like there are scams associated with it the tokens are named the same but they're completely different so you have to make sure do it correctly right so uh let's just do some swaps um so there are some important things here for instance in this settings menu you can disable

multi-hops which means that uh it's not going to be using any routing so it's going to be doing a direct swap from one token to another because sometimes it is more effective uh in terms of liquidity to to use more to use a more complicated route and if you want to trade directly only in a single pool then you need to disable that option then here's slippage tolerance so slippage basically happens when you initiate uh a transaction and uh the price in the pool changes and you can get a lower value or a higher value depending on what happened between the time of

the initiation of the uh transaction and its finalization right so uh if you raise your slippage tolerance uh to a higher level you actually can be uh prone to different kinds of attacks like sandwich attacks uh where uh so when you initiate a transaction another actor like malicious actor can uh initiate other transactions which will be changing the the price in the pool and you will get a lower value essentially at the very end of it so that's why you should you should be careful with setting your

slippage tolerance so basically slippage and so if we like just theoretically try to swap like a large amount um you can look at the changes here in the price impact factor uh price impact essentially shows how your own trade will affect the uh the value in in the pool right so price impact and slippage are quite similar but really not i mean uh price impact is about your own trade and slippage is about the trades all the trades that happen in the pool except for your own trade but that can

influence the result of your transaction also uh when you do a swap uh the decks it actually guarantees that you will get a certain minimum and depends on your slippage setting but if the amount that you will get as a result of your swap falls below this level it means that the transaction will fail and uh will be reverted right uh also here it shows liquidity provider fee that we discussed it's what you will pay into the pool that will get redistributed uh to uh different lps right

so for instance if we as you can see right now i can't do like a direct swap of curve to sushi it says here that the price impact too high there just isn't enough liquidity right so if we uh enable multi-hubs uh we can see that it creates a route so it will do uh several several uh exchanges right through uh wrapped ftm usdc and then sushi but we can find some some other token which has a higher liquidity changes to a swap so first and foremost have to approve

the usage of my crv to the smart contract so [Music] let's do just that so we need to sign wow new gas experience so i'm giving permission to access my curve token standing what's up with phantom is it okay right now is it what's happening yeah i just just now phantom mostly works like if i face issues it's mostly on polygon unfortunately oh yeah i

talked to apollo and yesterday with a bunch of people they all said like basically the transactions don't go through like get lost etc yeah and yeah unfortunately this is the quirk of polygon yeah in general but it happens like like yeah okay it's happening to every like basically every chain yeah now and again so let's just try do the swab um actually if you enable an expert mode i think it doesn't show you this window to confirm uh interesting it says here not a number i think i found a bug in the front end of

oh maybe it's like the dots instead of something really yeah because it's uh sometimes the comma sometimes the dots i'm always confused with that no i mean just i'm trying to swap like one curve it doesn't let me see let me debug this for you but it's just to confirm for the percentages so so basically they've got something off with their math yeah that happens in javascript okay let's try yeah i think it's just just an issue

with that particular calculator but anyway like still doesn't work yeah maybe like use oh maybe maybe as well right so finally yeah so here i can manage my gas fees if i wanted to happen more quickly or or risk losing the money the gas fee yeah because yeah you learn it the hard way so if you send not enough gas especially like on ethereum your transaction is going to fail and you you're just losing the money

all the transaction fees are gone yeah and it's better to do it on the start yeah and especially like also when you are dealing like with programmatic uh programmatically like sending transactions sometimes yeah you can up and unfortunately send too much gas for example of course the miners are easily gonna eat it no problem so be careful like [Music]

in order for you to be able to use it so i think yeah that's a nice gesture um right so uh yeah transaction submitted we can see it um in the explorer we can see how much we uh gave how much we got the contract we interacted with um the gas feed that we that we paid and uh the actually we can see the exact signature of the function and the data that we that we sent to the uh to the smart contract of sushi and uh yeah basically it also allows you to add the token that you just swapped to to metamask and use it

somewhere else so uh yeah maybe we can also add some liquidity so just find some combination um so if there is no uh full existing we will be creating it but if there is some liquidity then we will just have to put the uh the amount the amount that's already provided in the pool in the exact proportion so i don't know let's do some some here actually i think phantom and sushi has

generally low liquidity so maybe we can just add some so it does show the share a pool actually works pretty much the same you can tweak your sleep installer and setting um yeah right so let's just try to do that so the important thing to note here is

that uh some new tokens actually were minted in sushi they caught they're called slp or sushi liquidity full tokens right so uh these tokens they it's not that easy to actually manage them you can also like import if you go to your address let's just do that so it's from where it's from yeah basically what's happening like when a new pair is created uh on chain so for example uh someone creates a pool of tokens on sushi and basically deploys a new contract that's got its specific address and this contract itself is an

erc20 token yeah so basically that's why you can easily like transfer it like deal with it like even in metamask so for example if you import this particular address of the pool and you've got the tokens then you can just click on it transfer and send it to anyone else of course you're losing money in this way yeah so this is the uh contract slp and they represent the uh the share in this particular pool so for every pool as alex mentioned uh there's a separate slp right so any questions anything you want to

to get more in depth with and just let us know right now um and in the meantime you have a question yeah so is this basically how much you're going to get from that uh yes mexican song because i was thinking like if you're if you put in if you put in a trade right and say when you put in a trade

miners can look at the block and improve the block right yes when they see your trade come through let's assume you've got a thin liquidity pair and what they can do is they can wipe out the size of one of the liquidity in fact effectively the price difference you're trying to put in there they could then right they could find the pair themselves wipe out the side of the liquidity so screw themselves over but they know that you're plugging the gap with your trade that's coming in yeah you're bringing their tokens back in value and then therefore they can then pull their power out and profit off your trades they can literally make you lose a lot of money exactly so and i'll show you an example of that because i was doing a trade of

our own broken recently and if you interact directly with the pool so there are people like bots who are really monitoring the member and if they see this particular type of like uh white order then they they just bind off the pool before yourself so it was happening in phantom and the guys front run we buy like i think four blocks or something and basically after that my transaction failed because i was out of the slippage tolerance so for these purposes actually to use aggregators and not like work directly with the pulse because aggregators find like the best routes so that

you like basically don't get front run and are you able to interact in the same block and change your slippage on the fly yeah sure that intersect second trades yeah that's basically what arbitrage are

doing so yeah they try to prevent that because obviously if you're if you say if i'm like doing a launch invest so then you're really at risk of people just like really messing around with the value of your token on the swap platforms so how do you prevent that

kind of abuse because you're going to have a load of flow people buying into that token once it goes unchained to how do you prevent all the people who combine through the blocks just completely screwing up your investors yes so basically if uh you're not oh yeah yeah okay so um in general the question was like how to organize uh the token sales so that if you create a liquidity pool for your token and like uh people start to buy an in so how to make sure that uh someone else uh doesn't like drop the price of the tokens and basically removes all the liquid tokens out of your pool is it

correct more or less so yeah yeah that's why actually i think that launching through liquidity pools on ams is not the best idea because this is exactly the issue that you're going to face so there are other options uh for raising the money so uh different routes so for example what we've done uh we've created a token a contract where anyone can deposit like uh any amount of like what listed liquid tokens that are of interest to us so for example all the uh stable coins and then like there is a an allocation for like this early bird people who are investing in that contract and those

tokens are proportionally distributed between like all the deposits and that's why we've done it in stables so that it's uh easy to calculate like the exact share that they're depositing uh also there are other ways that i'm going to talk about but there are instruments that allow you uh to make like pools where you can uh provide single-sided liquidity yeah yes so yeah one one of the platforms that does is that i'm going to talk about and basically you can deposit uh only the token that you've created and set the price the price is basically controlled by uh by an oracle or you can just just

uh put it yourself there and then uh yeah yeah so no no liquidity needed uh to start the token sale so otherwise like if you're launching the token like on an imm and expect to raise some money then then you basically have to already have some money and this is not the case like for for the project so that's why i like different launch pads are working and that's why there are instruments that you can use like the pmms yes that's exactly what we did with gtom actually launched on a dodo pool first and uh people are starting to bring liquidity there and uh we set up a an optimal price and uh i think alex will be talking about some dodo so in more detail um i actually only have three minutes

left i think uh i need to show like let's do it quickly let's do something on ave um so yeah av actually hosts their they're fronted on ipfs which is nice so we're doing pretty much the same thing and i have some crv token um okay so ava also exists on multiple blockchains let's try to use phantom here it's actually a new version of av3 i'm

not sure what it yeah um right so let's just it already shows me the apy i i can actually expect from depositing this particular token we also do the approval and supply so as you can see uh they already minted

some a tokens for for myself it's called acrv um you can add it and manage now as soon as i supply some assets here i am qualified to borrow some of them try to do that so it will correspond to the uh if i borrow at the same uh the same sort of value uh if i don't actually

put into consideration the risk of liquidation uh then they immediately state the liquidation risk is high so they recommend to borrow a lower amount and uh they compute the hmm yeah actually two um so that's that's what i uh told

previously that um you can actually deposit and pay uh and receive some interest rate from borrowers right actually borrow and pay out that particular interest rate and if there's a discrepancy between the two you can actually balance it out in a way that would pay pay out your like whatever interest you have today right so that's one of the strategies that people can use uh yeah sure so um i'm being asked to just repeat your

question so you asked whether there are some protocols actually i'm not sure have you heard about any protocols that nullify the difference between the borrowing and yeah i'm pretty sure that there should be some aggregators but yeah and uh i think there was some question about that like the arbitrage uh on the london platform and i've heard stories of it as well so basically there are cases when you can borrow the money from uh from the service yeah yeah and then then deposit the same money on the same

service and get higher if you uh yeah so so yeah it's possible to do so but basically the assumption is that the market is going to correct that so it's not going to be like an open position for long and they people won't be able to do this kind of things indefinitely uh probably so yeah i've heard like the stories of like millions of dollars being borrowed from the platform and deposited back and i'm not sure i don't exactly remember the details but i'm pretty sure like there are definitely

people that are doing that and they're monitoring for such opportunities and they try to uh to get the money and get their turn this way but i think that's why the repair is supposed to be dynamically adjusted so that it's like you you're not uh i think it gives you two options you can either go with a variable or stable api and actually consider that in your long term strategy which one uh makes more sense yeah and that's why like for long term you can probably uh get yeah let less fee yeah but anyway uh yes so there might be such opportunities but like people are doing this um all of

this stuff automated so so if you try to do this manually and especially like on bigger chains most likely you're not going to find the opportunities [Music] yeah i think so you you can just go to the pool and basically like a look at one particular uh token because yeah the the conditions may write markets here to analyze uh all the different assets to uh to clarify which actually it really works on the supply and demand

principle right so uh for each asset there there's going to be a different supply and demand in terms of borrowers and depositors and that's how you can actually uh by considering different assets you can find the one that suits you the most right so on ftm there's there aren't that many uh options to be honest but yeah so just just to show you the principle i have some um ave tokens here right and i also have uh i just borrowed some dye and i can just go ahead and use it uh whatever i want so um yeah unfortunately i don't have much time left but

actually i don't have any time up for my presentation but hopefully i just you know to get the gist of how it works i hope it was helpful maybe some other questions before alex starts his own part no questions so yeah we can switch then okay uh

i'm going to talk like briefly about the curve convicts and uh dota and then uh i'll show you how to run your own like forks of basically any tokens and how easy it is to deploy to any chain right now like giving chains of course uh yeah but let's start with a brief introduction of myself um let me find yeah the presentation so that's it yeah nice so this is me okay i need to do the trick

okay yeah makes sense and it didn't work but anyway let me see let me uh maybe maybe this is how you present that's how you log in okay okay oh here it is the english it doesn't switch the language fortunately ah come on come on come on

but anyway okay let's just use another user so here for example okay so my presentation is about uh oh it's showing okay uh it's about dota curve and convicts and my name is alex uh i'm as well working at gton capital and basically i'm a development lead there so so i'm running like the development processes improving everything like uh doing code audits and uh in general i'm involved with the development as well so participate in smart contracts

uh creation a little bit of front end etc when needed uh and my background is actually uh not in computer science so i've got the management marketing uh bachelors from graduate school of management and saint petersburg state university then i've got my masters from london school of economics i it was closer to like computers and stuff with like degree in management information systems and innovation uh after that i worked briefly at google but since i've got business education i uh i was basically at the starting position where everyone starts it was customer support so i was talking to

people on the phone and said uh like a phone email chats uh for one and a half years it was like the uh the first time that i was talking so much on the phone so i've never spoken that much in my entire life uh but then i've decided that i don't actually want to pursue a career in that sphere in general like the corporate stuff uh wasn't of that much of an interest for me and especially given the fact that google already at the time was quite a big organization and like i realized that the time it took for my senior colleagues to grow is going to be exponentially more for me so i would have to spend more years doing the same

stuff same boring stuff up until like get promoted so then i left and actually uh the first projects that i was working on i wanted to get under the startup sphere so i was on the business development part with uh with our founder alex so it was one of the projects that we've done with a friend of ours it didn't took off but anyway like it was a good starting point and then like when i left i didn't know what to do so for half a year i wasn't doing anything then i contacted him and we decided to continue doing some sort of development work i was supposed to be looking for

the client etc and he was supposed to be the coder but there were no clients at the time so we've decided to do our own projects applications etc so i started gradually doing some development work so that's how i became a developer myself and like i got a lot of experience with mobile development ios applications uh this is my main role also i was leading team of developers service and android and stuff and i think this experience really helps uh when running teams especially like uh the new like startupish uh teams that we've got in defy uh with this experience of like

the development that is not connected to blockchain but at the same time you know how to set up processes so that people uh the developers uh work and deliver and the code is like readable easy to use and so that anyone can pick up and work in the code base that's been developed by other developers so recently i've joined jiton capital and currently i'm very involved with the development side of things so uh we are launching some defy initiatives uh we've got the staking contract life already uh for the well basically our organization is dow so we have to replenish the

treasury somehow so we're creating the bonding contracts for that but it's not the insane bonding of olympus thou all that unsustainable stuff it's not for us so we are with reasonable aprs and we try to build a sustainable system where uh the company can survive for long on the treasury that we've got and actually expand like create new projects etc uh and so what i'm gonna be talking uh for you today is i think going to revolve around the experience that we are having so uh because uh we've got like um some treasury funds and we have to manage the

price of our tokens uh we need to make sure that the we didn't uh or lose the treasury funds because uh like when we've done the token sale i've got some funds it's like 4.7 million dollars and the majority of these funds are only for market making so our burn rate for the salaries and stuff is pretty low and the only uh purpose of this money is uh to make sure that the product gets developed good and that we can maintain the token price somehow uh so uh because of this um well currently we are dealing of course with the funds uh on mms but we uh we're creating a new protocol uh that that's

called pathway and it's uh it allows us uh to set the token price instead of like the markets uh uh arbitrary uh setting the price because you cannot always control that and we don't need like some fun format to uh affect us too much so that's why we're creating a system where the price of the token can be linked uh to the fundamental uh factors such as like the liquidity that the protocol owns or like the number of whale users that we've got so we can look for example and change that data and see if like ten percent of like uh accounts that are

of interest to us uh hold it on then it means that we've got bright future effect ahead of us and this should somehow affect price um yeah but the problem is like if you try to set the prices on mms uh it's really hard hard to do so and it's a system that can be easily uh played with by arbitrators so unfortunately those guys when they see any opportunity for for the funds they they don't care they just uh go ahead and try to uh empty a treasury through swaps so uh we've got the algorithm that tries uh to keep the back price uh in place but uh uh when we

were trying it in prod uh we've got some liquidity on phantom uh with uh wrapped ftm and usdc on different pools uh and basically uh when the price was going up uh because of our actions it was like uh automatically dumped back to the levels it was uh because people can buy a low sell high even if it's like a little bit of money but if you do it constantly you can like empty the entire treasury uh pretty soon so that's why we've been looking for other options of how to deal with liquidity provision and so that the treasury isn't emptied and it doesn't affect like the

mood of the investors because uh of course when the token price goes down especially like on low liquidity it might happen so for example there is a bigger account that sells if they'll quit your name and pull is low your price is going to drop dramatically we don't want this uh because it's like and gets a self-reinforcing effect so if it starts it might never end unfortunately uh so that's why we've been looking at uh one of the options that i already mentioned today and this uh dota that's doing the what's called proactive market making algorithm and it's a very interesting thing because it basically like the

demand and supply cup parts are decoupled so that first of all you can deposit uh different tokens uh so you don't have to provide like the pair of the tokens if you want to be a liquidity provider you can deposit only one side uh of it and yeah you can easily earn money out of all the swaps that are happening uh on the platform and at the same time it's there is a possibility uh to affect the price and the slippage of of the trades uh so that you've got basically uh control of uh how exactly the swaps are

going to be executed so you can do it with the same pool uh and you can go anywhere from uh between the uh stable swaps like when the uh token prices doesn't change on every uh trade up to like the amm model where it behaves just exactly like the unisport pools or sushi pools etc uh all this stuff so uh it's very interesting and uh i think it's very much fits of what we aim to achieve because with this flexibility you can really make sure that the price is stays the same it doesn't go below the levels

you want it doesn't go too much high because i want to make sure that uh with each trade we've got like uh uh liquidity of the protocol increasing and not the price increasing because we want to be in control of that but anyway uh so i think uh it's a bit uh hard to explain uh exactly the difference of those uh two types of swaps if we talk about the stable swaps and basically the pioneer in this is curve because curve realized at the time that there is a big opportunity for different types of open operations that work uh good much better for the assets

that are supposed to be similarly similarly polarized and if you take for example two tokens that are packed i'll try to get back to one use dollar then you don't need these big price swings that you might see on uni swap because on unison basically uh the the motor can buy like the price can go like really exponentially really fast so for the stable swaps it's not what you need and basically there's a different math so compared to what ilia was talking about in unisop it's basically

a different curve that allows you to uh and to make swaps uh that try to keep the prices the same up until the the change in volume is really high so here the graph you can see that the uh this is basically the line of the unit open variant uh that we've been talking about and if you take a look at the curve that that's happening in curve basically uh you see so if the prices uh initially uh are similar like one to one one moment so here's the point of equilibrium

and everything is well you can exchange one usd for like one usdt for one usdc for example uh then if you uh change um the amount of token that uh traded for unisov for example the price increase is going to be much higher than uh for this uh different curve uh of the stable swap invariant so that's why like four swaps of similarly priced assets it's much better to uh use uh these type of swaps and say instead of um and this is a really good market uh because uh basically a

stable swaps weren't an existed at the time but at the same time there were many players that were trying to play the uh usd packed asset game so and at the time it wasn't clear which ones are going to survive which one is not so that's why you need some sort of instrument that allows you to swap between those assets easily to manage your risks as well because they were like for example issues when tether was depicts on binance for like like a couple of weeks and no one could do anything about it so this type of situation can lead like to very big frustration especially like if you get back like 80

cents on on a dollar it's not very good so so if you've got your uh portfolio spread between different assets that's got different collateral strategies or maybe some of them are algorithmic then you can do so using instruments like curve that allow to do it with like little slippage and yeah so so this is a great instrument for that uh i'm not sure that it's worth actually going through the interface because if you need to make a swap it's uh really easy like of course you go to there you enter the amount you want to

swap it shows the feed etc so it's nothing different from from the instruments that we've already discussed what i wanted to talk to you about is basically the interesting uh uh strategy of like community building that curve has done and basically if you've heard of curve wars it's basically like the way for different protocols to try to fight for the rewards that a curve provides so basically uh when you uh lock liquidity and curve you get crv tokens and these cv tokens represent

your position uh so initial intention of curve was to get people to lock these tokens to uh get uh the so-called ve crv basically it stands for uh world escrow siri and uh with this log you are able to uh to be casting rewards for like which stable uh pools are going to get more incentives out of like the uh an emission of crv talking that that is um uh that's currently happening so the there is a mission schedule for the crv token for 300 years so they are thinking ahead here and of course like the majority of uh tokens

are getting distributed now and then like over time the the amount of rewards is going to decrease uh and basically uh these crv tokens are the incentive tokens for liquidity providers so that they don't get only uh the money from the fees uh of the swaps that are happening uh with their liquidity but the same time some uh some other incentive that's this already be token it basically has some price and it can be either like exchange for uh more liquid assets like stables for example or yeah you can also like reinvest it lock it back at curve and

like vote for the pools that you are staking in and basically get more money out of it but uh it's interesting that given this mechanics uh some smart people came up with their ways of actually not really gaming that but taking this to an advantage so that people can can have more flexibility and care less for the money that they deposit at the same time get bigger rewards so basically the main problem of ve crv token is for example you get the maximum rewards if you uh deposit the tokens for four years but you have to realize that the entire dfi

exists for three and basically you don't look at tokens tokens for a lot of money also they are diluted uh over time so so you don't have any uh flexibility here you can cannot uh transfer those tokens uh anywhere and this is one of the main issues uh again because if you lock the crv uh it's permanently locked to your account so uh basically for four years you don't have access to the funds all you get is like very high rewards even if you go for example to the curve website okay so we have to connect here

uh and uh yeah come on yeah yeah and it doesn't switch automatically okay so so uh anyway here you can get the information on uh like the rewards that are happening right now in real time etc are where the uh currently all the wards are uh concentrated so basically if you've got uh liquidity in that pool you are going to get high

rewards uh and yeah so now what i was talking about yeah so the thing is uh the initial uh vcrv model it's um like a little bit less flexible for liquidity providers uh so people came up with an idea of like pulling the funds together so that you uh you can get some other tokens a high reward for it etc and at the same time the tokens might be transferable so uh currently the winner of the curve wars and basically the words for the emissions of curved tokens uh with the convex protocol

and so what they've done so basically uh no you can get your crv tokens but stake it not on the curve website but on convex and this this makes it so that the guys deposit the survey on their behalf but on their own account and they always uh deposit those funds for like four years they do risk etc all on your behalf so so you don't have to worry about it and you basically get the highest amount of rewards uh out of that like this big pool of people who have

deposited their crv over there and this is uh this way even you don't have um like a lot of money uh to get high rewards but you can do so deposited uh depositing it on convicts at the same time they also provide additional rewards in the uh convicts talking and uh there is an interesting thing called bribing where you can basically get additional rewards when you may cast your votes on convicts so convicts serves as a proxy for awards so basically you decide which pool to attribute your uh crv awards to and then uh they cast the vote and provide you uh

with these some additional perks if you voted correctly uh like for for the tokens that provide incentives so for example here you can uh see that the frags has got like a majority of the uh of the curve uh their incentives uh not the majority but like the biggest part uh 20.2 percent and that's because uh they provide bribes for those who vote for them on uh on convicts so basically if you cast the world uh like which can be done once uh per protocol for uh

for one protocol per epoch then uh at the end of it you get some additional rewards for example in this case like in frax tokens and the if protocols wants to get bigger exposure get bigger rewards in survey tokens then they can do so also funny thing that currently uh like uh frags is getting more money out of crv tokens that they're getting uh from their pool uh compared to the amount of bribes that they are giving away so basically they can like deposit 10 million usd uh for bribes and get like 15 20 million uh out of it i don't

remember the exact figures but yeah uh it's funny that the rewards are basically in a token that might change in price over time but currently it seems so that crv token is getting a lot of traction so it grows in price and if you do your strategy correctly and when your funds correctly so you launch a new uh token you list it on curve you might actually uh first of all attract more people to using your token then get more rewards out of it even if like they are not that many swaps but basically if

you've got enough crv uh for the actions that you are doing then you're all set and you're profitable in this bribe investment uh yeah and so uh but anyways so a curve um like uh we won v2 et cetera they revolve uh around this stable swap environment with some modifications for triples so-called so basically the suppose of three tokens where you can deploy it like two liquid tokens and one of your own and this way you can uh

like get a good market for the token because any token listed on crv is basically getting a lot of attention and uh traders can see the opportunity of like uh dealing with your token if there are several pools they make arbitrage earn out of it and everyone who's depositing liquidity is uh getting constant flow of money in terms of uh of the fees of for the people that are the end users that are using uh curve uh for the swaps uh also it's interesting to know so so if you take a look uh for example at protocols like uh curve and convex like

um at one point of time at least i remember like in december or something the tvl of uh curve was at around like 24 billion dollars uh it will at off uh convicts 20 billion dollars and well of course as uh always in the fire you have to realize like th this is not all real and liquid money and like tvl that some uh convex has got in uh survey counts to both of them so but the main market uh for this entire like like some sort of pyramid if you think about it because like there's uh one protocol another protocol on top of it uh but all

of them might count the money that they've got like basically locked in each other as tvl so uh it's interesting to see that basically uh the the base of all those particles is uh curve and its use case of people really using it and doing some swaps and basically uh the inflow of like real money comes from i would say the swaps itself the the fees of all the trades and um there's a lot of value that's uh that's a bit on the side and it's the value of the um of the crv token

which is not directly attributed to uh to the swaps and to the uh the real money made on the service uh but anyway uh we uh from here uh okay i've got some uh some tools that you might use uh i'm gonna send you the uh link to the presentation later and you can take a look at the resources that i have mentioned here but they're they're an interesting instruments like um impermanent loss calculators for like uni sushi style uh pools and for tri crypto pools so

we've already mentioned permanent laws uh but yeah we didn't talk too much about it but when you provide liquidity in any of the protocols uh the problem is that uh you deposit two uh all three assets into the pool and when the prices change you can it actually leads to the fact that people try to buy that uh uh the higher priced token from the pool and this way uh you end up with more of the cheaper tokens and less of the higher price tokens so this

call them permanent laws in theory like if the prices and prices are more or less in the market they fluctuate but they stay the same it's not a problem especially for for example the pools on stable swap platforms like curve then it's an issue because you expect both tokens to stay relatively the same price and permanent loss doesn't affect you but if you've got for example the uh two tokens that fluctuate a lot in price like for example bitcoin and ethereum uh this might really affect you and when providing liquidity uh you really have

to incentivize buy something other than the trading fees because like if there are high price swings uh then you might end up really losing the money uh the money in like uh dollar equivalent uh so that's why of course uh some of the protocols uh try to are trying to bribe you with bribe you but not not in the way of life convicts uh style but uh i mean in their own uh platform tokens so that's uh these tokens got some market of its own and you are getting the fees plus this token which might amount to the to more money

than what you might potentially lose on impermanent loss when you're providing liquidity uh so uh anyway we can switch to like the main event of uh an interesting kind of new protocol because not that many people know about it it's currently relatively low cut it's called dota and this this is a very interesting approach to market making because it allows you to basically proactively uh influencing the price of the tokens uh on a pool and adjust the slippage accordingly uh well a it's been up for quite some time and actually

if you go to the dodo website and try to trade so it's got a very good like routing system uh that allows you for swaps that are cheaper than on the alternative so for example like i can i can show you what the price difference of the swaps happened here and on other platforms so for example for uh our own token jiton uh it's actually uh not listed straightaway here but yeah i've been

i think i've been adding it manually and so so you can see the swaps for busd to jiton okay and let's compare it to pancake swap okay we're going to trade swap and we try to find the pair that we need here it is and enter the same amount of tokens and see how much to be usd 10b 515. okay so so you see for the same swap here for example on

uh pancake swap uh you can get 515 juton versus like 5 15.8 here 5 15.4 here 5 15.8 over here so um the guys are basically like serving as as an aggregator as well as like like a good uh platform for launching your own uh tokens here uh but basically like the main stuff uh oh yeah i see detail going up surprisingly on b chain which isn't our main chain currently so we don't have that much liquidity and basically that's why like

any any uh purchase of jiton here affects the price somehow but anyway so the guys got really uh really good routing system that allows for better better prices for for the tokens you're buying although you have to take into consideration the fact that these sales can actually uh be costing more because of the smart routing of course so yeah here's the same example like previously or when i was trying to do some swaps and yeah see the price difference but let's compare the transaction of the

pancake swap which basically is a uniswap fork at its core and uh it's very simple routing and you get your final token the way like you want to go and the uh the transaction fee for the separation was 0.37 cents uh i've done the same transaction for similar amount of tokens and with dota and it cost 1.23 so probably it's not going to be profitable for smaller trades but for higher trades especially if you get better rate you can take this into consideration and buy through instruments like dota also

yeah yeah so so the thing is like uh what what's happening here is uh the routing is smart and tries to give you the better price but uh every additional call on any blockchain costs uh additional amount of money if you compare the three transactions that were happening in here to the like i don't know like 10 11 transactions over here that's why we've got the increased price and basically it's like increased threefold over here what yeah yes so this is the model for the aggregators and actually like my advice is to always use aggregators instead of like simple

trades or with the uh with the pools because as i mentioned before there are big front run issues so anyone can try to change the price within your block and like try to at least hit your highest slippage so so that they uh yes so this is exactly what happened here so i was going to show you so basically uh i i was trying to make such a transaction to buy jiton off of the pool uh it was spirit swap on phantom and it failed so basically what happened uh so i send the transaction with the like

this parameter there's the parameter called amount out minimal and basically this is what sets the price tolerance for you so this is the minimum amount of tokens you are supposed to get for transaction to go through but uh what happened here uh like you see uh this transaction failed on on the block like that ends on 607. uh okay so here's the transaction that happened on block 601 so basically the guys looked at the mempool i i have seen my transaction that is not for such a big amount of money it's like

uh it was a time like 250 usd or something uh and they they tried to buy like small amount of jitong so that when the price goes up i have to that they can basically dump it on me somehow uh there's also really interesting things so uh if you go to the explorer and okay so let's for example check the explorer of our own token this is the stakes token contracts and we can check the the original jiton that's not done sting

talking yeah sticking talking over here so basically uh what i like to do is like come here sometimes look at the transactions uh that are happening to our uh our token and see irregularities so for example there are some people that try to constantly buy uh jiton at lower prices and try to sell it but with a gap like for example the gap might be around like one day or so and so they do it in constantly for i don't know for like half a year already and so this is like small-time arbitrage but they they had

taken some profit uh on it and also the same happening on all the trades that you're doing so for example when we tried our pathway implementation that was working with impulse and basically what we do we change uh the liquidity uh in such a way that the price goes up so for example we remove the liquidity from the pool uh make a small trade uh so that the price is basically uh changed and the way that like the uh we've got the desired price for jitton token and then we put the liquidity back in and in the same proportions that are currently in the pool so that the price stays the same

after our small trade uh so basically we can move the price this way easily like like anywhere in the world actually anyone who's got the liquidity in the pool can do so so you can theoretically set any price in your pool but expect it to be corrected straight away with the people that realize this opportunity if they see that you constantly do it they're going to buy low sale high and basically you're going to lose your liquid token so you're going to be the one who who who suffered the impermanent laws uh you've got more of your own token in the pool less of the liquid token so for example usdc in our case

so yeah and when we were trying to do so we of course uh saw that people are instantly selling giton like even in the same block so for example which makes change uh the price change and like some of the guys uh react in the same block some guys like in the fall doing some trades in the following ten minutes uh so people are constantly trying to make money off everything uh on the blockchain and you have to realize that it's happening uh not really like someone manually maintain it so it's it's all done automatically it's all done on like basically uh all of the interesting tokens that got liquidity so when providing

liquidity when dealing with the pricing of your own talking you really have to pay attention to the market situation so you have to be prepared for anything that they might happen etc and like you can just leave your token unmonitored so that's why as i was telling you we uh as we thrive to um that like to try and control the price of our token uh we are switching to the instruments that allow us more flexibility and uh dodo is this exact instrument oh my god i can see myself yeah yeah so uh interesting thing so i can show you the

experience that i've been running um so just to mention about were you talking about arbitrage on phantom that we experienced right yeah so there are like only a bunch of addresses that we just analyzed on chain that actually take most of the arbitrage rewards so they have i think they have some bots they may be looking mempools of nodes and that's how the camera okay yeah that's basically how they get this advantage always so uh you have to manage your arbitrage strategy when you launch a project on amm basically that's what that's trying yeah uh and so uh

the dota is an interesting instrument that is very well suited for the token sales for example that we talked about already because it allows you to easily deposit only one side of liquidity and then like it's not going to be that the price of the token is zero because the price is set by you when you create the pool yourself uh at the moment of the pool creation so for example let's go to dodo anyone can follow me if you'd like and do the same the thing is that the interface that i was dealing with is actually the old version on the interface so that's why i'm switching to that one

and it's still available through the interface you can easily set all the parameters and see basically what's happening to your token okay so let's go provide liquidity and let's take a look at the pools that were created um i'm gonna switch to the account that i've been dealing with already got some bc in it okay okay and so this is the pool that i've

been creating uh previously but i've removed all the liquidity from it so we can try to create a new pool to a different token so for example previously we used to have a pool of uh duton to usdc and now we are going to create the token they pull like chiton let me check return to sdg and you see that there are different uh types of pools so uh it really depends on what exactly you are trying to do but you've got also the additional uh selection of the way to

provide liquidity so standard is basically you provide both sides of liquidity but you can select a single sided one and that's really great because if we want to do provide only liquidity in one token because we've got one token we just issued it then we can go here set only like uh 100 g ton and this this tells you what exactly is going to happen to the price of the asset if you uh if someone buys it etc so uh these are the problems that we control the initial price and the slip slippage coefficient so the initial price can be set to like current you

don't price like for example the uh two us dollars and this means that people are going to be able to buy it only for to use the t no less and sleeping coefficient really shows you how the price is going to grow depending on these parameters so the higher it is the less slippage you've got but uh anyway so the interface is really easy to read because you can see like uh when you sell this amount of detail for this number of usdc what's the token uh price

is going to be so if you're doing a token sale it's really easy to adjust the way that price is being affected over here yeah so i'm not sure also how much in detail so we should go into here because like it really depends on whether or not you are interested in such instruments or we can take a look at like some other practical stuff that might be really cool like for example uh deploying your own uni swap style liquidity poles so basically you can get the industry standard that's unit swap v2

and deploy it anywhere so for example on test net so uh funny story like when you talk to developers they always tell you that everything is like complicated that too much work etc this can be done so uh like as this is like a panel for vcs or some people that potentially are going to work with developers and you have to understand that not everything that developers are saying is true so for example when we when we wanted to uh create our own infrastructure on testnet uh so if you go to like cli test see legit on capital uh it's basically

like the interface for interactive with our smart contracts so uh when we we are developing our own products it's uh the core thing to realize is that when you are building in defy or like in crypto in general the core of your own your entire business is smart contracts so you shouldn't uh like develop these products as uh in traditional markets so so everything is done simultaneously you work in the interface etc so you have to set your priorities straight so that's why we've decided to focus completely on building the smart contracts first uh for all the contracts that we might need

so basically for the defy product that it's like in the field of d5 2.0 uh with the focus on particle old liquidity basically so that we don't uh don't rely on the rented liquidity so for example uh if someone has got the money they deposit this like uh money in the liquidity pool it's called borrowed liquidity and at any moment uh in time people can come and take this liquidity uh out of the protocol and basically uh well the protocol can even be dead because of this because this might highly affect the price so for example

if the record liquid is removed then any sale leads to the sharp drop in price that's going to be reflected on like all the trackers coin gecko coin market cup and people can start panicking and telling that you you are rugging us etc so they're going to sell the token so that's why we are switching the narratives to actually protocol on liquidity pol so that the protocol has got the majority of money so the majority of money and the liquidity pools is provided by us and not by other people uh so this way we are more flexible at what is happening uh to to the price we're more stable

because we always know that the the liquidity is not going to be removed overnight yeah but anyway so we are building infrastructure of like the stuff that allows us to increase increase the treasury so that we can manage the funds correctly to make new products and grow the token uh so we are building the base contracts that are staking for to get some rewards for digital holders bonding that allows people to buy bonds and basically it's discounted jiton we take the current market price uh that's done on chain through the our uh decentralized oracle's network and we

are selling uh you jiten a discount relative to the current price or which is basically for people it's not guaranteed profit because uh the price of jiton is volatile but you are fixing the price the moment of bond purchase so if chiton goes in price you are profitable if not then you might lose money even though you are getting more done compared to what you could have bought right now in the market so anyways uh the these are the ways uh to increase treasury et cetera so uh fun internet to work with but uh you have to realize that you don't need

a ui for this straight away because uh for people like for the interested people they're going to learn how to work with our cli interface for example while [Music] we might have spent like an additional two months working on the ui and if we don't see the market traction then anyway it's not going to move us forward anyway so so we test everything on cli and then once the infrastructure is done once like all the investors can while they already can interface with the contracts uh in this way the retail people are going to come later when we build the ui

so here uh you can see that there are several ways to interact with the uh with the infrastructure that we already got so you can tap the help command and see what's available so i will get easy stuff like for example the join command allows you to connect your meta mask i'm already connected here so that's why nothing happening but if i try to disconnect and try type join it's basically going to do the same stuff um that's uh that's done on every other like crypto website basically it connects the state of your website to the state of

your wallet uh and then you can do stuff like uh budget on cell digital etc and so uh initially we've when we've been developing the new feature for example that we wanted to allow people to easily buy our token because previously you have to basically find some ftm tokens fund them to your account because we are doing all the swaps on ftm and people would have to go to the external service uh you have to guide them through the whole process of how to give the approve etc so they basically have to rely on like a new interface that they might not be familiar with so this is

like the sales funnel and we are losing people here so we've decided to add the functionality of buying the tone straight away on our website and basically what you have to do is like say we by 10 with ftm it's like human readable stuff okay and it's not active here maybe we've been expanding our ui so basically the number of uh commands has been growing and that's why we've created the subdirectories for this stuff uh okay so by buy isn't here so it's probably in this taking stuff so so the terminal the style navigation is like we

go to the directory staking which was actually uh mentioned here and you can go to this taken functionality then type help help and see the available commands here so you see the by command is actually in the uh in this taken subdirectory so i can type by 10 with jiton b is ftm of course and yeah my account is not funded on phantom testnet

most likely because or not yeah so here it is so at first i give the approval on the fast phantom test net you see uh for the tokens to be traded and then okay uh yeah because it's ftm it's native token you don't need the approval so i was mistaken we we've got the same so for us it's if we can do the same with usdt for example so in our tests like you uh we need to replicate the entire

infrastructure that we've got on mainnet so before going live and allowing people to basically trade with their own money we needed to make sure that the ui is connected correctly to uh to the interface and that the transaction transactions uh go out perfectly so uh when i told that we need to test this functionality developers told me that this is uh this is very complicated we can't create the pools on test net it's impossible etc then i've gone i have gone on and like basically done it myself and it turns out to be really really easy so so with the current like

advancements of the tools that are available for developers you can basically get any code uh that is of interest to you uh uploaded to online ide called remix basically it can be done even on the computer where you don't have any specific tools except for the web browser and better mask and so i've gotten the unisop v2 pulse code deployed it on the phantom test net created a pool of jiton to ftm and u-turn to usdc and basically connected these new smart contracts uh to the web interface

over here so that we can actually test the entire flaws of what might be available to users uh in our mainnet but on test nets and so prior to if we've got any changes for example we run the suite of tests uh check that everything runs correctly we don't have issues with like uh different um like values calculate calculated uh and properly etc so yeah so this is a story about like how to properly test your applications and that you can easily replicate any infrastructure on testnet without like

uh needing much of like programming knowledge etc uh so let's probably go ahead and do the same stuff uh i'll show you how to create the pools of your own so if you've got laptops you can probably take them out and try to follow me in what i'm doing but basically all you need to do is like for the pools for example the base implementation is the uniswap v2 and you can google in swappy two contracts uh and probably can add github here but but anyway it doesn't matter

it's the second search result that we are getting and the repository is called v2 core it's basically version 2 of uniswop that anyone can use given the permissive license and you can go to the contract subfolder and see that this is these are basically like the base contracts that are going to be used by people by you when you are uploading it so we can get back to the main repository here click it codes and there is download zip so basically that's what we need the current uh version that's not been changed by the

way since 19th of may 2020 because these are smart contracts they are permanent and people don't make that many changes to the code base once it's deployed also it's a good fact that since like the last commit on 19th of may 2020 no changes needed to be made so uh unisport v2 is basically considered very secure that's why just taking the straight up fork without changing any line of code is like the preferred uh line of action because uh there were instances of when people cloned this repository for example uh and tried

to change only like a small small uh like one line of code and this is the opportunity for the potential hack uh then people were exported for like millions of dollars because of a small change to the contract so if you are changing something then you have to be proficient uh in coding and you have to make sure that you write additional tests uh that this doesn't mess with the logics and also that they previously created tests by uniswop are running okay so anyway yes so it's

uh it's actually complicated better uh because uh well of course the smart contracts by default are immutable so once deployed the contracts cannot be changed and if they're changed it's only through new deployment basically and you have to make sure that people know about this new deployment that the previous deployment isn't exploited so that the funds are extracted from the previous account migrate your liquidity to a new version yes so uh that's why actually there should be some protections in place if you are not sure if your code is a hundred percent like exploit-free then there should be ways to for example stop

the contract uh which we do have in our stake in contract just in case that if we see that the money is being drained from there that we can easily run one command stop it and the new transactions are not going to go through also a good word of advice like if you are dealing with the developers and they are deploying the contracts on your behalf then there should be a way to transfer ownership so for example some of the functions of the contract can be named as can only be run by the admin or owner so so yeah in majority of cases it's good

it's an okay uh way of doing things that developers deploy the contracts themselves but then the ownership has to be transferred to for example a uh company multiseek so that it's not one account that can easily be compromised so if your ownership structure is that uh one account with one seed phrase uh is the sole owner of everything then if somehow someone exposes this seed phrase that one person can easily like rug you and take all the funds and be gone so that's why it's always good to have agnosis say for example

make it the owner of the contract and then interact with the contracts only through transactions uh ongnosis so that for example like four out of seven people have to sign the transaction otherwise it just go through but anyway so we've got the uh ripple here and let's see what the code might we need okay i'm gonna clean up here a little bit because we need to need all of this stuff um okay no no so

this is our old contract of ours uh and basically the the core that you need is all here so the easiest way to go is actually to go to remix dot ethereum.org and basically this is the online id created by ethereum foundation that allows you to run code see if it compiles and also deploy it straight away and the good thing is that it's integrated with meta masks so basically if you add any chain on metamask you can deploy the contract there easily no problems whatsoever

uh so let's see let's just create a new folder called univ v2 okay it's not a folder let's delete it okay the directory can be created here and this is the uni v2 we need we're going to put all of our code here so the thing is uh in the majority of cases the uh paths that the files are dealing with are relative so for example if we add these three base contracts that we are using over here so so we can add files using this a little icon uh

go to core master contracts and these are the three base contracts that are needed for in swap deployment we add them and then you can see that it imports some of the files in the directories on the of the relative path so basically we need this interfaces folder in this in small picture folder otherwise they're not going to see the file that they need and it's not going to compile so basically if we need for example the video factory here we try to compile it okay most likely it of course not gonna

compile first of all i've set the wrong version of the of this solidity and that's why the compiler version mismatch is not going to allow it to do anything and then something bad is happening that it can't actually finish anything but anyway we didn't have enough files over here that it was never going to be compiled so we create three folders of the same names here so the interfaces the libraries i just copy the names and paste it just oh okay it it's great subfolder that's not what we need so we have to check the uni v2 once again press here

and this is how we create a new folder and then the last one is test so again once again select the unib2 create test folder that's actually not needed because the tests are not going to be run but anyway and we upload the files to this particular directory so test we create tests here libraries we add files from the libraries directory uh interfaces we go to the interfaces uh maybe but yeah this is the like the manual path that i'm showing

i'm actually not sure so so yeah there's like an input there is but yeah i've now tried the complete import because i mostly deal with several deployments so here i'm not sure how it's going to mess with the folder structure but yeah probably you can use these github import yourself or do it manually as i've shown you but anyway so now we've got all the code necessary here and we can try to compile okay the compiler is a bit sketchy it's not doing what it's supposed to be doing so let's switch once again so the uh you

remember that we have to check the solidity version so it's uh it's written over here so we need 0.5.16 now the current solidity okay so something's happening and the it doesn't allow me to change the compiler which is really strange so normally you're able to compile it with the selected version of solidity but for some reason that doesn't allow me to change it type library

okay sometimes this happens in programming unfortunately the tools might not be working the way you expect it but anyway okay let's see what we can do here try to reload once again maybe the problem with the wi-fi or something i'm not really sure okay way too perm okay okay yeah it's just some hiccup on the ui but now we're able to select the appropriate commit of the compiler and try to compile it so we didn't get any issues though the

contract compiles perfectly and basically this means that we can deploy it on on our test net so for this purpose i'm going to use phantom test net i've got some test tokens by the way you can test get test tokens uh easily on uh faucet dots uh phantom.org if i'm not mistaken oh just google faucet phantom okay let's do it this way okay from fundamental network

and you enter your address here that you copy from your meta mask for example uh prove that you're not a robot and look at ftms and you are going to get a drop of 550 amps like within seconds you see so i had nine now i have 14. so basically we can use this uh to deploy the contract on using remix so we go to the deployment tab and select the environment which is going to be not the javascript vm but the injected web 3.

basically for these purposes it connects your metamask account uses the network over there and basically allows you to upload code to any evm network that is imported here so uh i'm actually i've selected the raw address i'm not i'm going to do it with a test address of mine or probably we can just send the phantoms like this to the contract that we need it's a deployment contract let's go check

send 10 of them there phantom is really fast in this regard so you can easily send the tokens and the transaction goes away pretty quick so yeah the token's already sent so we've connected uh this account here and now we can run the deploy so for these purposes you have to choose which contract you want to upload and in our case we're going to be uploading uh in swap v2 factory so when you not the interface by the way you have to choose the real contract and i have accidentally using

used the interface which is not correct so let's go and swap with two factory you have to compile it first so i'm going to the factory contract over here in the code then go to the compile tab try to compile it it's compiled well yeah there's also like an auto compile uh i setting yes that as well as well but anyways so we see the factory contract over here selected and just have to uh set several parameters so if you take a look at the code of insolve video factory you have to look for for the constructor and it's got

basically one one address that you have to set and it's fee to cetera basically the contract that's going to get all the fees uh out of the trades that are happening on these decks i'm going to use on my own address that is deploying it so you have to enter the parameter comma separated over here if there are several parameters and then we can click deploy basically this is going to ask you to create a transaction and it will try to deploy the contract on chain so as you see actually the deployment

went through uh this is the information this is the transaction hash that we can see at this nets dot ftmscan.com basically the explorer of the chain that you are using and you can see the transaction what exactly happened here and you can see that the contract with this address has been created uh currently the uh contract is here but uh you can't interact with it easily because it's it doesn't got the interface already available so for these purposes we actually need a plugin that's called flatten

flattener if you go over here uh you can select one contract that you want to flatten in our case it's installed video factory and basically basically what it what it does it creates uh creates a new file with all the code that relates to that particular contract and we can use this code created by the uh um by the flattener and use it to verify our contract on the testnet so if you go over here basically anyone can do this it doesn't matter which account you're connected to you press

verify and publish select the compiler type which is single file solidity in our case compiler version it's 0.56516 if i remember correctly i think so okay and you select the license i think it's like it was mit or something and yeah no no gpl is restrictive and so it's in software 3 that is gpl really yeah yeah gpl is like the contract that means that you

cannot use the source code and if you uh create any modifications to the code that you always have to publish the modification that you are doing maybe there is a different type of license because in univ3 don't even allow forking and creating anything of your own yeah yeah yeah but anyway so so we are back here uh we enter our code uh it might ask for constructor arguments i'm actually not sure if it's gonna ask it in this particular situation but let's see so i prefer that i'm not a robot i am not a robot and then

we see what the result of this compilation is yeah okay so we've got the error here because it couldn't decode the bytecode so in this case most likely the issue is that you need to provide constructor arguments in the api encoded style so for this you go to the instrument okay i think it was over here ibi in code and code parents and there is parameters online this is how you look for

for the tools they do have online stuff for you and basically you can go over here and there's a portion that asks you to if you want to enter your parameters manually so it's a constructor i'm adding an argument of type address one address not the array of address just address and i get the parameter that i've used uh the parameter okay that parameter with my address so i'm entering here remove it and this is the string that we need to use on a phantom scan

and let's see if it's for a fight i hope it is it is so you see basically we've already uploaded one of the contracts that we need okay of course for uniswop you might need something else like the routers that you can find in a uni-swap v2 periphery uh repository of uh of the github organization and anyway so you can already interact with this contract because you've uploaded the source code and so uh here up here the read contracts

methods where you can find like all pairs uh related to one particular address of token or you can write contract and right contract basically allows you to create the token pairs of your own uh in this case actually it's not preferable to create the pairs yourself so it's better to make sure that the pairs are created through uh the peripheral contracts but anyway it's possible to create a pair for new tokens you just enter two addresses and it creates a new token for you uh you might using the preview contracts you can also create pools to the native token which is in there terminology called if but in general like it's just the native token

of the network that you're dealing with and you can basically provide liquidity in one transaction you try to provide liquidity the periphery contracts uh take a look if the pool is already created for that pair of tokens if not it creates a new pair of tokens uh basically deploys a new contract for you which is an erc20 token that i've mentioned before and then you can interact with that pool so this is exactly what i have done in our case uh i've created the uploaded all the contracts that we need like the factory uh periphery contracts created a pool using uh those uploaded some liquidity

in ftm and test jiton token that we had and now we are able to do like just any types of swaps or any types of transactions on testnet currently we are deploying the same infrastructure for data swaps that we are working on and of course we're starting with testnet because like if you've got the new code and you're not sure how it's going to use it you always have to use both automatic testing testing and manual testing to make sure that your code works well and this is better done on test net so you need those skills but anyway just know that this stuff deploying contracts is fairly easy like with you in like 15 20 minutes we've uploaded a new contract

uh easily on justnet verified it you can now interact with it using only one tool is basically the explorer of the network and you don't even need any type of ui whatsoever chat that upload the contract and verify it so i hope this was helpful i think i was told that we are supposed to be ending things now but if you've got any questions so we are ready to ask as well thank you good and if anyone wants a repeat of all of it we're holding this second workshop

a bit later another three hours of fun yes but it depends on the audience so if you've got more questions on the second one you can we can restructure it so probably we'll try to interact with audience first like ask what exactly are their priorities and then uh adjust the presentation accordingly because we've got a lot of information probably like the most hands-on information that we've got it's about our own product and like the way we are developing it so this is what we can talk about share our experience and i think this is like the main stuff that you need because hands-on experience is like

the coolest stuff in the world yeah but but as i'm telling you it's not hard at all so i didn't know like at all like solidity half a year ago and now i'm able to plot contracts etc it's it like once you realize that it's easy it's just all the mechanical stuff that needs to be done then yes but at the same time you remember that i wasn't like computer science major so i didn't have any like uh computer science experience whatsoever so i was learning everything from scratch and especially like if you are

talking only about the deployments so not about like writing the code because of course if you are trying to write a new smart contracts and you want them to be safe then you need a lot more knowledge than that but at least you can start from something so either you can deploy your own your c20 token for example it might be used for any purposes so for example uh you know patrick the main organizer of east dubai we met him at divided by uh meetups that are happening weekly here and basically what he's done uh to know the place where

the meetup has gone to be you have to interact with the contract that's deployed on ethereum or like like arbitrary and avalanche and you basically have to call one function called svp and after that uh you get the you can call the view function that returns the url with the information of the address where it's going to take place at the same time he issues you a hundred dddd token sends like defy developers down or something for now it's not worth anything but at the same time since it's a good community of d5 builders by the way

they define meetups that are happening there they are really awesome you can find like cool people that are doing insane stuff like for example uh creating the first ever uh centralized uh crypt exchange uh here in the united arab emirates so the line sentenced one in abu dhabit like getting licensed is abu dhabi is insanely hard and you can talk to people like this on those meetups but for this you have to know how to interact with the contracts and the easiest way to do so is actually with the scanners so all you need to do is have some tokens of course uh ethereum is

a bit expensive for these transactions but if you've got like arbitrary [Music] or something you you can interact with the contract there it's fairly cheap uh you can participate in the up and also like you can use the exact same skills that you've learned today if you didn't know and yeah go visit the meetup actually like mainly i think we are consumer

app because like we're building defy infrastructure currently of course yeah yeah of course we need like institutional developers etc uh but i mean investors so that we can grow we need uh context in this space but at the same time like the product that we intend to build are easily usable by anyone it's like we we also create in a stable coin uh algorithmical stable coin uh in the nearest future that uh i'll come um like people who work with us actually launched one of the

first algorithmic stable coins called neutrino on waves exchange already mentioned that and so we've got experience in that and basically like at the core of our business is the dao itself so uh surprisingly like we are dow that acts as a dao so we hold votes and we've been even by a little bit by our early investors but uh yeah because uh there was a vote that well we at the team didn't approve of of like the initial tokens unlock because when they we had a good traction at the very beginning and the price of the token

went up like uh a lot and then uh sorry yeah yeah and but they were unable to to sell because there were limits on withdrawals of the accounts that were spread over the year but since those early birds are the main holders of the tokens they were able to create a proposal uh propose this early birds unlocked so we had a we as thou had to unlock the tokens and basically the price dropped afterwards so that's why we had a little bit of a problem with the traction but it's actually good so so you see the dao model works surprisingly unfortunately it's not

always in the favor of the company of the organization but uh lately like all this stuff so uh we've been initially involved with like bridges etc and we wanted to build cross-chain infrastructure but then decided that this is not the focus that we want to work with and so we suggested the private into what the vision that we currently have today and at the core is like algorithmic uh treasury management so uh in different uh in most of the dials right now the treasury is like a little bit shadily managed by some people no one knows what exactly is happening with liquidity we

want to make sure that like uh the team doesn't have access to all of those funds directly we have a really small burn rate right now the the majorities tokens are supposed to be used for liquidity and basically we want to make sure that we don't do this manually so right now we have to manually uh go on like spirit swap spooky swap uh adjust the liquidity of the pools of to usdcftm by hand uh it actually like like sometimes uh arbitrarily because yeah you basically uh uh adjusting everything as you go but we want to build the infrastructure to manage everything automatically so the

smart contracts are run our treasury management uh all the pools are created properly if you get new funds from like through instrument like bonding that this money is used to increase liquidity and is accounted to towards the token price in proper ways so that's why we're using dodo can i just add something to respond to your question yeah so basically we're going to have a bunch of projects being launched like in this year so each of the sub-projects will have its own infrastructure deployed so in principle it means that the

protocol that we built which is called pathway for algorithmic pricing of our governance token can be reused multiple times and we're going to test it during this year and actually have you mentioned our next plan linking store for q4 in terms of gc9 oh yeah yeah the ultimate goal is actually so we want to make sure that with the treasury of ours is used properly to grow the products and so that there's some innovation happening so the best way to provide this is actually that other builders can build on your infrastructure and the only way to do so is actually to having your own chain because otherwise uh other people cannot build new products on you so that's why

our ultimate goal is to make the proper infrastructure for uh creating our own this net i mean the new net called gcnet that we are going to welcome everyone to build upon and if the dow treasury is used properly that we can allocate some funds out of it for the grant programs etc so yeah this is the ultimate goal no no the the treasury is basically other tokens the liquid tokens that we can use to set prices so we of course don't count

the jiton tokens that we've got at our disposal is something that we've got as liquidity but yeah it's used in our operations so we add it onto the pools etc those are that are being used in liquidity pools we count them separately actually uh each month we but we publish treasury reports they are open in our documentation for instance on like a multisig

it's not being used for providing liquidity and uh there's a difference between those assets that we put um no no no no the majority of funds are theoretically for market making yes we're better for for everything and we've got limits on how much we can spend on the team and we try to design a smartphone got

so i was told that we are we've run out of time thank you everyone it was really nice [Applause] thank you for the questions you