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

Loading player…

Dive into the 1Inch API - Kirill Kuznetsov & Petr Kololev

Ethereum DenverSat, Oct 9, 2021, 12:00 AM

This talk is from ETHDenver & ColoradoJam , the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Learn more: ethdenver.com Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Kirill Kuznetsov & Petr Kololev, 1inch This talk was recorded Sunday, February 7, 2021. ETHDenver 2021’s content themes included DeFi & Money Legos, NFTs & the Creator Economy, ColoradoJam & the Next Frontier of Statehood, Protocols & Interoperability, Open Source & Public Goods, The Ownership Economy & Digital Orgs, Usability Design & Adoption and Legal, Privacy & Identity. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2021 event was February 5-12 and hosted virtually in 2021 with 5000+ blockchain enthusiasts, developers and community members from 80 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/AxFmNdCVnU 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/

Transcript

so we're going to move on to um one inch and looks like we've got peter and carrill who are going to be joining us hello hello can you hear we can we me hear you nice to meet you again yeah of course how are you doing everything good yes all right we're gonna dive into the one-inch api so let's go dive down let's go yes perfect okay so you can share the screen i will take a brief intro so we will uh this discuss about how can you do the trades by api so one inch is dex aggregator and you can do the swaps and to integrate your frameworks and dabs with one inch you have to use first our smart contacts and all our smart contracts is open sourced and audited well so feel free to check it out netherscan and about uh api will go with a brief announcement so one more thing that i want to say yes today i am without t-shirt of eth denver sadly i got to put it but we have surprised like for people who uh listen and watching us now uh we will give away three unique eth denver style one inch t-shirts for the three the most interesting and best questions about api so feel free to leave the comments and we will answer it later and leave your handles there we will send you nice t-shirts okay let's get track your turn okay let's start we have uh there are two types of documentation that we have uh the first one it's a git book documentation and here you can find the link to the swagger uh api and let's look at the api there are two methods that we need to check the first one it's quote and swap let's try this to exchange one token to another you just need to pass the addresses of these tokens um to the fields for example i want to swap to get port for exchange perfume to die yeah i have my shortcuts here and for example i want to change this amount let's execute and here we are what we have here um the information about source and destination tokens uh destination talking amount in die in a way and the path that goes through wrap desert a protocol next to sushi private market maker uniswop and psm and other other are complicated path and um on the ui it's it looks like this this our exchange path um we split search amount amount among different taxes and bring all uh liquidity from the market to to allow user to get best rates during the swap and let's look at other parameters anyone who integrate who integrates api can set the theme they can charge fees you can set up to three percent uh of search token fee also you can provide the list of protocols for example uh i won't swap only with rappeaser and kyber and you can receive the quote only with kyber uh it's up to you but if uh you will uh set this field to empty uh you the api will use all supported protocols it's about more than 40 protocols and another option it's gas price to find uh the best uh path with them taking into account gas costs you can set up your custom gas price to find the best buff with the best gas costs uh you can set here gas prices for example current these amounts and these values and by default the api um searching path with with the fast gas price and let's look in other other options uh complexity level it's a maximal number of uh connect connector tokens that are used in the path for example here we can see that our path goes through usdt to die through usdc to die and to usd to die you can set up to five connector tokens you can just need to pass here token addresses that you want to use as connector tokens by default it's about 10 connector tokens inside our algorithm pathfinder and you can set your own the next interesting thing it's parts and main road parts as you can see on the off uh ui um the this percents its uh main road parts you can split your source currency by several parts and find different best paths during one wall path for example here we have three different paths uh this this and this this is the main road parts uh parameter and if you want to split uh in this path uh search currency of each hope uh by different parts too you can set parts parameter and your source currency will be splitted among different dexes on the choosing token pair here you can see that we exchange 15 percent of wrap desert on sushi swap 15 on uni swap and above changed and other on private market maker okay this we're here we received the quote and let's look how to make a swap with the api you just need to use the swap method and also pass here source talking and destination token addresses amount for example i want to swap one ethereum and we need to set to um two more required parameters it's uh from address and slippage from address this is the address from which the call data will be executed if you want to make a swap using your meta mask or other wallet you need to set here your wallet address in case if you want to um proxical data through your smart contract you need to set here your smart contract address and the slippage parameter it's a percent that you are okay um this is the percent uh that determine the minimal return for example uh you see this quote amount of diet and if market moves fast this amount can be changed and to protect yourself from the front runners and fast market movements you need to set slippage uh parameter here and you will receive uh at least a minimal return if you will receive less than minimal return then your transaction will be failed it's a protection of losing your funds and other parameters for example it's destination receiver uh if you merchant for example and you want to proceed cryptocurrency through your shop for example you can exchange um client clients cryptocurrency to your own uh during their purchasing for example and you can set the receiver of destination funds also here you need to set your referral address if you want to charge fees or you can just set it to empty uh also you can enable chi token burning here uh to make your transaction cheaper uh chiga stocking allows you to reduce gas costs all their transaction and also you need to approve chi token to one inch contract address and have enough balance of qi token on your from address and also you can enable a partial fill mechanism or disable it's a unique feature that supports only by one inch for example we have this difficult path and for example market moves fast and we receive on the first road less amount that we wanted and in this case this road will fail fails and for example if uh two other roads is okay then this uh roads will be executed and your transaction uh will execute it partially uh you will exchange 50 of your source token uh to destination token and other funds will um will send back to your wallet address and also if you want to proxy uh call data through the um your smart contract address you need to disable the estimate because if you haven't funds or a loans of on your or from address then the estimation will failed to avoid this you need to set disable estimate to false and uh let's try to execute for example let's try to estimate from the zero address because zero address um has enough funds for estimation let's click on execute and here we are here you can also so you can look at the token source and destination docking information your expected amount the path and the transaction object this object contains of all uh required fields for transact for sending transaction it's from this your wallet address to this one inch contract address call data and also gas and gas price that's all you can find the documentation on the one inch dot exchange website on the api tab and here you can learn more look at some examples response body request and other needed information thank you um i'm ready to ask you all to your questions okay so looks like sergey personally already uh asked for one question that probably you can also comment something about loop for trades like for doing arbitrage is it allowed or not but yes so there is a one question like about hiring so feel free to send us a message if you think that you can help us in some way but i i would like to say that we are supporting many hackers around the world on hackathons and if you do some hacks in this hackathon or another and we like your project we can support you and like provide some grant program or something like this so feel free to bring us if you have some nice idea that it integrates well with one inch api and works well with our dp solutions and makes work better so we will support you what next regarding the bounties okay about the bounties and um it's better to ask us on discord so we can make a discussion um yeah i think i will tell you more about what we want to see on ui and dashboard [Music] in the discord so send us a message in our one inch channel uh what volume that one inch can handle per second but i will ask like he say is it okay to provide proof of concept video using certain data science tools yes unless you have you provide also the code it's open source or you can provide it to us directly and we can review it so yeah video will be much it's bonus for you so but you have to provide the code as well just video is not enough what volume that one inch can handle per second uh one inch accumulates uh all liquidity existing on the market and uh all existing liquidity we can use it and it's big huge huge volume it accumulates all the community from different sources will ethereum 2.0 affect the gas token um it's too early to think about this question because we haven't workable smart contracts on ethereum uh the second and we will explore this later okay this is a nice question i like it like what one thing would you design differently now versus like six months ago kirill can you say about your challenges and what you done the biggest one in the our api maybe like our latest major release 2.0 can you briefly discuss what we improve improved yes uh six months ago we um had nothing we accommodate less liquids even now uh currently we design our pathfinder algorithm and um this algorithm allows us to allow us to find uh the best path for taking into account gas costs between different taxes and our we boost our response time we we reduce latency and we made a lot to give our users the best prices on the market and fastest api yes we have better prices now we have for usable user interface with different uh graphics uh source pop pop complicated paths and other useful things for traders yeah so regarding this question and also like our like plans or roadmaps so just keep in touch with us in our announcement channels and medium everything that you have to know will be there so this is our main thing how we interact and if you have some proposals we can uh we have also our forum you can find it on one inch exchange website and we can discuss some proposals and also if someone propose something nice we can say oh that's nice we will gonna check this out and probably will implement and i would like to say like the team did great work to make their uh our [Music] backend system much faster than any other competitors and that's what helps us to provide the best exchange range on the market you can just go and check it is the goal for one inch to accumulate weight like a unisop one inch it's a dex aggregator that accumulates all existing liquidity on the market and our goal to find the best prices the best rates accumulate all liquidity on the market if you're talking about one inch liquidity protocol uh yes this is a new generation protocol that allows you to protect from front runners we have changeable parameters um like swap fee uh decay time and uh virtual balances and our decentralized organization dao can manage these parameters with user stakes and we can find the best parameters for each pool for stable tokens for different tokens and liquidity providers can decide which parameters will be the best for this pool and also also our protocol is very useful for new tokens launch because liquidity providers charge a lot fees on the fast moving market yeah wow guys i really like your questions is a lot of thoughts so we have five minutes more what i want to add like actually i like this question and send your handles or send these questions to this court and say that it's you so we can contact you back and discuss about these t-shirts uh what i want to say also yes so one issue is also provided liquidity protocol and we just give daffy users one more option to stake their liquidity and in some cases when the market is very volatile uh liquidity protocol operates better than useful but users are able to choose like where they want to stake the token some union swap that was first or some solutions that now do different strategy and provides for liquidity providers more options to earn money oh about limit orders question here you did you mention limit orders like each one each supports zero weeks limit orders how limit order protocol is planned for this year uh oh so sorry is it we plan to build our own liquidity uh limit orders on this year and we have a cheaper uh more usable and we want to drive the market by our cool solutions okay we have five minutes more and career i think uh it's uh not about one inch api but it's also related probably you can't tell some words about cheat token because it's also like invention of one i can i think it will be worth to mention shitake and it's utility token that allows you to reduce transaction costs by burning this qi token you can approve your chi token to the one inch contract to the rest and if you have enough qi token on your balance and you enable qi token then uh in the end of the swap that she talking burned the burns and some um memory area in the blockchain um um clearing and uh by burning she talking you just reduce the transaction cost by destroying contracts on the network research source code yeah an article okay so looks like all the questions and answers so i hope you enjoy it and feel free to ask us about any questions if you want in discord or telegram so we are ready to help with all technical things and let's get biddle something great hug and go together to the bt future and build cool stuff yeah we ordered owners before we've been in all the i think all of the eth denver before at least i am and kill two yeah we won i think almost all the ath dinner i super excited to see your hearts now so let's get rock and thank you john for organizing all these things yeah you got it thanks guys we appreciate you

Automatic transcript — names and jargon may be misspelled.