New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

LI.FI 🛠 Intro to LI.FI - Akshay LIFI, Arjun

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Akshay LIFI and Arjun from Li.FI for a workshop titled "Deploying an app on DeCloud infrastructure protocol". And that wraps up 2022! ETHIndia 2022⎯the biggest Ethereum hackathon to this date with over 459 projects built within 36 hours. 🫂 2000 attendees from 🌆 321 cities that were 🌱 44% new to web3... ...joined forces in Bengaluru to write history. Thank you for taking part in it 🫶🔥 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Applause] [Music] hey guys I'm Akshay so yeah uh just to remind you guys you have to connect your headsets to channel 2. so that you can listen to me not the other session uh but yeah so by the way I'm actually and why you work for le5 and we have great shirts so come to oh we have great shirts come to our booth and pick up the shirts and yeah so let's start um so yeah to begin with I'm just going to give you a short intro about Levi so lifa is a bridge and Dex aggregator so we're kind of like one inch for Bridges we if you are bridging from one chain to other chain we find you the best route through various bridges that we have we currently have 15 Bridges and like countless Texas uh inside le5 so for now uh I'm gonna let you guys scan this for this presentation as well as all the links that we I I will have in the presentation so yeah after the presentation you can get the links and while you're hacking as well so you guys want to scan I'm gonna give five more seconds okay so these are the links that we're gonna be using I mean you're gonna have to use uh if you're hacking with Levi so first of course the website like we have our front end as well if you if you want to bridge from any chain to any chain just like go to transfer2.xyz here and yeah we have a crazy UI through which you can pitch from any token on any chain to any token on any chain so we also have SDK we have API docs examples I'll go with the links again so what exactly is a problem that li-fi is solving right so what is why do we even need le5 so of course you know you can go to individual Bridges individual taxes to do swaps I'm bridging manually and it still can be fine you're still gonna make it right but uh what lifa is doing is that like we are creating all these things into a single interface so that you don't have to worry about the various dexas that are there and the face that they might have to they might be charging you and if they are secure or not like nobody knows right like everything's on the blockchain and like unless you verify unless you can verify you can't know whether the bridge you're using your decks you're using is like right or not so I I'm gonna give you an example of like why a product like uh Levi would actually make a lot of sense so recently you know we were supposed to get merged from much for the hackathon of course and um yeah we faced a lot of issues because there were no aggregators which were aggregating t-shirts for hackathons right so what happened was that like we got designs done online of course um and like we chose and uh chose a printer in German based in Germany and they decide they told us like they're gonna print all those things to us and they're going to ship it to India to Bangalore so that we can deliver to give it to you guys but we face so many issues because like this German company they gave the contract to Latvia then to Bangladesh then to us then they shipped each of the shipments through through FedEx to India and at FedEx I had to go through kycr to pay unknown fees I had to pay I had to make cash payment like FedEx I'm paying like thousands of rupees uh at when when the when they're delivering uh much to me right but I would not have cash at all like they're expecting me to pay all that money in cash and like it was a huge mess I had no idea like this would happen at all so like this whole thing can be I mean all I want is that like as a customer I just want I just have designs for t-shirts I just want to get much at 8th India right that's that's my only goal and like all these extra steps that I had to go through and like this was like very stressful in the last one week um sorry one month and these things I as an end user I don't have to know all these things all these details so instead what you can do is that you can just like so yeah that's the same thing happens with uh swapping as well if you have Matic on polygon and you want to get GMX on arbitrum and stake GMX you have to go to like several steps you can you have to choose a decks then get a usdc use hop to bridge tobitrum again use uni swap to swap to GMX and stack GMX all these steps and each of these tests would have various fees various security assumptions and various and bottlenecks right and as an end user like I would not know each and every detail about all the things that I'm gonna use right so what we do at least five sir we just kind of abstract everything here and all you are going to see is that you're gonna choose Matic that you have Matic on polygon and you're gonna stake GMX on arbitrum with a single transaction that's what we do at le5 I mean that's exactly what I wanted uh for leafy merch as well but like nobody is there working on that so soon I'll be able to do it I guess some aggregate is going to be there if I we abstract away all the nuances all the steps as the steps that you have to take to swap one token on one chain to a different token on different chain as well as do another action on top uh if you wish to like staking GMX here so you guys are with me still till till now thumbs up yeah great okay so uh I I'm gonna talk about so this is a core protocol right like we help people swap tokens and deposit funds and we have this core protocol um we have several products which are you which is using this protocol right you can build so so many things on protocol protocols and li-fi is also a protocol that means you can build things on le5 as well so that's why we're sponsoring this hackathon and I'm also going to talk about the bounties that we have several products one is transfer to dot XYZ which is our front end uh if you are uh I mean if you're you know if you want to go to arbitrum and steak or buy something on arbitrum and nft you can use transfer to dot XYZ and then like reach to arbitrum using leifi in the back end and buy an nft similarly we have a widget which as a Dap um so I mean of course Europe builders on hackers right so if you are deploying your smart contracts on arbitrum then that means that you would have to all of your users would have to transfer funds from where they have funds in to orbitrum to use your dab right so it's it's a hassle for a new user who is not like very degeny right so what you can do is you can just like plug le5's widget onto your website and directly like let users swap from any chain to your token on on your chain and we have a widget and we also have SDK if you don't feel like you know you want to have a widget uh which is like built by us the UI is built by us you can just use our SDK and you can build your your own UI and you would have of course have a lot more you know customizability options and like a lot more linear it's a lot more learning to use your own SDK and UI we also have apis so it's like you know it's kind of going bare bone from the widget uh with the widget is where you know you just have to you can just plug it in in five minutes and start using it it's very easy right it's like the wrapped version of li-fi as a protocol and the SDK is it's kind of like in the Middle where the functions are wrapped if your developer you know the functions are wrapped and you can easily just like call functions and perform actions or perform swaps but apis are like Bare Bones where you get apis and you would have like full freedom to do anything that you want we have like apis and uh you can just pull our we have unlimited There's No Limit right now at least so we can use our apis so I mean even if you go even down below uh the apis you can also interact directly without Smart contracts so which are li-fi smart contacts EOS smart contract can directly interact with Leaf as smart contract and perform actions so for example if you have our yearn and if you are an yield aggregator right and you want to move your funds to arbitrum and then deposit into a pool and then get the yield back to let's say polygon right so you can do all those things using a smart contract and you would need li-fi smart contact for that so these are our various products I'm gonna go through this things uh in this session of course each of these things so that like you guys can decide what you so that you guys can decide what you want to use uh in this hackathon I mean uh I do want to touch upon the ideas before I dive into uh anything to build on so that like you guys have an idea of like what is li-fi what can I do with Levi how can I build something cool here and Miss Levi alone enough to build something a few if you use li-fi alone of course you can build just by using li-fi you can build so many cool apps right and we have bounties which supports I mean we're just gonna of course give you foreign if you want to swap from one token to other token you're just like passing these two tokens as parameters to our SDK and you're fetching the codes for these tokens and to show you we to show you an example of user SDK like we have built of course our front end on le5 SDK as well so this Frontier that you see is built on the fire SDK and you are choosing a token like let's say oh I like GMX a lot so I'm choosing GMX and arbitrim and I'm gonna get eth on optimism I'm going to swap 20 tokens of course the internet is very slow here so I might not even get routes but usually you get several routes uh on the right side as you swap and as a user you can choose what route that you're comfortable with it can be you know based on your favorite bridge that you trust or it can be through like a native bridge over to Native Bridge as well so yeah the SDK works is where you pass these two parameters GMX and orbital to Ethan optimism and 20 tokens right you can pass these three things and we're gonna fetch you like so many codes can be 10 20 based on the chains and uh tokens that you have chosen uh yeah oh yeah we found one route uh but yeah so we usually we find so many routes to do these swaps but oh I have disabled other Bridges so yeah another cool feature about li-fi that I kind of have to show right now is that we have a feature to enable and disable Bridges at le5 we have several Bridges 12 plus Bridges and I had disabled all the bridges because I trust connects and Stargate a lot more but yeah I mean I like all the bridges to be honest so now we'll get like a lot more routes so I'll come back to this so to to start with what can you build what can you as a hacker build uh with le5 using just the SDK right so on the front end you can just like build a cross chain yield aggregator so usdc of course everybody wants to hold you or CC these days because nobody knows how down we're gonna go from here so if you're holding EOS DC and you want to earn some in yield on usdc uh then you can use li-fi and aggregate so I mean like you would have to like go through uh various dabs various chains various ill aggregators and find the best yield and then deposit into the deal right so instead you can just like build this interface on using leafy where uh you can aggregate yield for usdc on various chains Moon River Moonbeam which are new chains and and they're gonna offer a lot more higher yields than orbital optimism which are like old and secure right um but yeah so you can aggregate this like uh different yields on different platforms and you can just say give your users just a single button to to deposit into this walls uh through le5 so as what you can uh imagine instead like usdc on orbitrum usdc and optimism and I usually just like it's gonna select one usdc on optimism which is going to give you five percent yield unheard of uh and yeah like the users can select UCC on optimism and just click deposit and it's just gonna the li-fi is gonna Bridge the funds from wherever they have the funds in for example polygon raised to optimism then deposit in the pools and yeah you can just do that in the single interface that you are going to aggregate on your front end I say one of the easiest things you can build uh on le5 and yeah so we're also partnering with partnering with ether spot with a sport is a smart contact wallet and so it is what helps you in automating these things um kind of like vaults so you can use that as well to make it much much better so you can use Levi and eat a spot together again so leafy of course uh it's also a great Standalone product but it does it works better with smart contact wallets right so you can use leaf and Andy the sport you can build a bar you can borrow crosshain you can borrow assets Crossing so I mean like one of the things that are in hype these days is that cross chain borrowing where you know you can deposit you eat on ethereum and you can borrow ustc on arbitrum or optimism right so this thing is being built on layer 0 and like or axilla these different messaging protocols but I'm not gonna go deep into it but uh these Protocols are great but they add another security assumption to you as a user right so inside what you can do is that you can still have the exact same experience but you can build that with leafire and anti-thustard with a lot less security assumptions than building on Cross chain like fully native question so yeah we also uh have partnered with go pocket wallet so you can if you wish you can just like build a wallet on your own and integrate li-fi and make it cross-chain wallet from day one uh and yeah question models are great we we have a few wallets that have integrated le5 uh they are Frontier they are Omni these wires have integrated le5 and through this like people can do a lot more caution things and deposit into different chains and do a lot more things yeah of course so another thing is multi-hopping that's something uh you can build with le5 SDK again which is that which means that uh if you for example uh let's say you have found some Phantom and you want to get your funds on our launch right so this is very hard because there's not much liquidity between these two chains so ideally you would have to go through I go from Phantom to eat then to Avalanche so this is called multi-hopping you are going through a different chain to go to a different chain so this thing can be built using defy and currently we don't have that we are applying to have that so uh we are offering so I have to update this we're offering 2500 for using SDK plus widget SDK or widget 1250 and yeah you can find these like prices on each Global um website though so we're offering these bounties uh in this hackathon so please build on the FI and of course you're gonna get these things so I'm gonna talk about contract calls as well so I gave you an example when I started this presentation which is that you know you can stake on GMX right so usually you would have to swap on GMX just swap to GMX on arbitrum and then perform another action to stake into GMX so which can be automated using extend contract calls that we have which what it does after the bridging happens after the swapping happens it calls another function which deposits once into GMX on arbitrim so like the user the end user is going to be only performing only one action which is going to be let's say like usdc on polygon you're just doing that that's it and everything is else is going to be taken care by Bridges and Levi so that's something you can check out as well of course if you build only on Crafting contract calls which is a new feature that we have we have separate boundaries for this two thousand dollars thousand dollars five hundred dollars and we also have widget brownies which are kind which I combined with the first bounties now so that's gonna be another fourth prize here seven units okay so I don't have much time but I'll be in our booth so you can feel free to ask me you can come drop by we also have a game in the booth so come come by the booth and play the game you can earn some tokens too uh so I'll be near the booth you can ask me for any questions that you have about cross chain even if it's not related to le5 anything Crosshair multi-sham bridging I'm open to answering any of the questions that you guys might have so I I want to touch upon before kick me out I'm just gonna talk about uh how we can start uh building right now so uh we have examples so of course in this presentation we have something called we have widget examples which are like very simple to start with right and of course after you are familiar with the widget you can move on to sdks apis and contract calls as well which are like a lot more complicated but widget is just like five minutes a lot more complicated I mean like five minutes to two hours to probably one day right not not too hard for a Dev so uh we have examples for example create react app you can check this out I use next next.js and yeah so this is pretty simple because this widget is also an SDK on JavaScript it's a JavaScript on typescript SDK and you can import the widget and you can just plug it in on your UI it can be anywhere on a new UI so uh a few things that I want to touch up on since I don't have much time is that this widget is like fully customizable and you can just like do so many things with this widget because this is kind of stuck yeah so this widget you can control all the UI elements that you can see on the widget from outside the widget which is which is very useful if you are building something um like something like this so we built this recently and uh is it uses only five widget and I feel it's like very useful for sure because it Aggregates a few things okay yeah so this is like one a basic example where uh you know I have a few buttons here if you guys can see I'm not a great front-end Dev sorry so what I can do what we can do is I can just control the wallet uh control The Witcher from outside the widget that means that you can uh you can build like a lot more things on top of uh this for example usdc can change the token eth from outside so I mean a better version of this is obviously this just gonna this is probably only got one yeah it's slow as far oh no they climb they climb always okay so this is something that I built that we built a few days back a few weeks back which is an aggregate I mean which is a way to you know store your friend's address or your centralization address on our tap and you can easily send money from any chain that you have to that centralized Exchange in a single transaction so for example if you want to add a new wallet let's say binance I trust binance and uh I want to get eaten by binance and I have some mattress and let's say binance Main I have this address that I've just added and of course I can save this address on this website you can just like build a simple dab which is like very useful currently what we do as uh digits when we one off ram money from one chain to binance for example we have to let's say I have optimism funds I have to bridge to BSC chain or like polygon or ethereum to deposit into Finance but instead what you can do is let's say I have funds on even like a even let's use chain like it's our lunch right I have a wax on our lunch and I I won't eat on finance right so you can say have such a way that just like selects everything is populated oh I have to connect my wallet oh yeah that's not working because I just disconnected my frame wallet so but yeah so the ideally if you have iwax on our lunch and then if you have 20 of that uh you want to get two binance on you're gonna get to binance you can just like build a simple app like this where I just like sends you uh to binance you can just like bridge in a single transaction which is I feel very cool so yeah you can you can build something like this it's like a very challenging trap and you can also build a dab where you know you can add your friends as receiver addresses and send funds to your friends that's also something you can build but I think uh I'm happy to answer any of the questions that you guys might have in the booth feel free to reach out to me on Telegram at Akshay underscore le5 and Discord join our Discord and ask for support as well I can also show you a few examples that are built using le5 one is that so recently metamask integrated li-fi to support bridging inside metamask so if you go to put a portfolio Dot metamask.io you can see le5 being used in the back end so these are these guys use API because metamask wants a lot more freedom right so metamask wanted API so like they have integrated our apis we also have dodo actually integrate using us they are using our SDK we also have a super fluid using gas that also they're using our widget so we have like three examples of different apps using leafy and if you are building any project and if you aim to deploy on any of the L2 chains or side chains that we support I mean currently we support evm we are going to expand to non-vm as well uh feel free to reach out to me reach out to us we're gonna help you guys integrate uh li-fi into your tab so that you can help your users on board in a much much easier or seamless manner to your chain and use your dab Without You Know Much hindrance uh so yeah so I'm gonna give you guys like two a minute to scan the QR code join our Discord you can also scan this QR code instead to get this presentation and get all the Links at once so if you have any questions I I'm happy to answer right now yeah huh I can't hear him though it's true uh let's suppose you are saying uh supplying token from one second uh one chain to another chain let's suppose at the same time second chain got like a very high fluctuation Okay and like second transaction got failed how you are handling that yeah so of course so this happens a lot uh you would know especially in crypto right so what we have is that we have slippage parameter that we set um I mean of course you have access to set the slippage on SDK API and the smart contracts so if you set slippage like 0.

5 percent the final transaction is gonna I mean the contract is going to make sure that the deviation isn't like more than 5.5 percent for the end token yeah if it does that is like okay for one chain but when we are going to another chain it is not an atomic swap yeah yeah so like how you are handling that thing so even even for the destination change so this slippage is actually for cross chain that means that as you can see here GMX and orbitrum to Ethan optimism this tokens right like 20 tokens is like thousand 75 right so the final amount should not actually go below 1075 dollars with 0.5 percent slippage so if it does the transaction fails and you get the money back on uh where you are right that's like any uh the slippage got it got it yeah but I can play around with the slippage to make sure yeah I will get to here with sure yeah okay one more minute uh any other questions okay let's see so yeah uh I have this link over there as well and uh yeah just like go through these ideas and you guys can definitely come up with something much much more creative for sure if you have any ideas and you are just like if you're still brainstorming as well and you want to build down cross chain Crossing is like the need for the near future right so uh people would want I mean it's ideal to build on Cross chain because there's a lot of Need For You from end users to you know bridge between chains because the chains are exploding right now right so we have all this optimistic Bridges so the optimistic uh chains roll ups like optimism arbitrum Boba and we're also gonna have ZK Roll-Ups in the future so that like before the chains consolidate the chains are gonna explode in the near future in the next one year or two years so I think like it's ideal time to start building on Cross chain or building cross-chained apps solving cross-chem problems because yeah everybody's facing these problems all of us so yeah I mean I wish good luck to you all of you in this hackathon all the hackers I'm happy I'll be on in our Levi Booth we have a game and we have much really good much by the way uh yeah I'll see you guys over there thank you

Automatic transcript — names and jargon may be misspelled.