"Soon, Nobody Will Use Centralized Exchanges Because They'll Have Lost Trust in Them," 1inch Co-Founder Says
Sergej Kunz, 1inch co-founder, is certain most volume will go to dexes and dex aggregators.
Hello Defiers! I’m sharing with you a conversation I had with Sergej Kunz, the co-founder of dex aggregator 1inch. I was interested in his story after writing about dex aggregators last week and finding that volume on 1inch had greatly outpaced volume on other platforms. In this interview, he attributes his early success to the algorithm his team developed to provide the best prices, and their aggressive strategy. But this strategy — embodied in their logo’s “manic unicorn”— has also stirred up some controversy in the ecosystem along with a debate on open source versus copyrighted code. Sergej is eager to put that to rest though, and wants to keep delivering new features and a better user experience. Read below for more :)
This interview has been edited for brevity and I’ve bolded my favorite quotes.
You’re a paid subscriber so you’re receiving access to the full interview. Hope you enjoy!
Sergej Kunz: In September 2018, I started to do security audits on Ethereum smart contracts on live streams on YouTube. I was a software engineer for 12, 13 something years, but I was not an expert in Solidity or dapps. I made contact with Anton [Bukov], he's my co-founder, and he joined the live stream and started to share some information and taught me a lot.
We wanted to show people how to read smart contracts, how to understand them, because if someone tells you a smart contract is safe, it's probably not true; it can have backdoors and if the source is not publicly available, none knows what's happening. We did the audits in Russian language because we are Russian. It was a fun time. Also a little dangerous time because we did some audits of ponzi schemes and those projects started to write to me things like, ‘we will kill you.’
We did more than 100 security audits, we did audits for three, four hours, overnight as well. We had a lot of subscribers, about 12,000. Now we are not active there anymore because we started to participate in hackathons. In December of 2018 we were in ETHSingapore hackathon, and won three sponsored bounties, MakerDAO, Set Protocol and Kyber.
image source: Twitter
Camila Russo: Before we get into that, I wanted to ask you about your transition into blockchain. Why did you decide to focus on this technology?
SK: Because it's cool. It's a new edge. It eliminates a lot of third parties which are not necessary, like banks, and the community is great. At the hackathons I saw this excited, very nice community of Ethereum. And I met also Vitalik in Singapore. The community and the technology are really great.
CR: Great. So you had this YouTube channel and then Singapore was your first hackathon. How did your story develop from there?
SK: We started to participate almost every month in hackathons. A month after Singapore, we were in Berlin, in February 2019 we were in Stuttgart, where I'm from in Germany. It was a hackathon from Daimler, Mercedes Benz. It was a very hard one and I didn't sleep the whole weekend. We delivered the product on time. It was a kind of smart car, like rent a car which you could unlock with ether or any token on the Ethereum blockchain. It had a monitor and a touchscreen and everything. We got the mobility prize.
Then we were in Paris. In Paris we didn't get anything. We created the QR token, but I don't think many people understood what it is. You can print these cards with a QR code and a Merkle proof on them and you can just give it to someone and they can take it and get tokens in their own wallet without paying any gas. I had a small printer and we were running around the hackathon saying, ‘I have a money printing machine!’ Then I went to New York, and the next one was in Minsk.
Arb Bots and ETHNewYork
CR: So around when did you start thinking about 1inch?
SK: One or two weeks before ETHNewYork Anton and I were playing with arbitrage bots, trying to find the best price on the market and sell it somewhere else for the best price. And we thought why can't you just put this technology in front of everyone, and now everyone can do arbitrage trades. They buy or sell for the best price in the market by splitting orders across dexes. We were talking with Vitalik about this and he said, he thought Totle was doing something like this, but he didn't know if they were splitting orders. Either way, I thought, I'm going to build that.
Then I was talking with Liam [Horne] from EthGlobal and I told him about the idea, and he said it's not possible. Show me when it's done. And I did, and he was just really excited about it. I showed swapping 100,000 Dai to ether with really high slippage on all the Dexes but on 1inch it was the best price with really small slippage. We reached two million in volume one or two months later.
At the hackathon it was a full working MVP, using Kyber Network, Bancor and Uniswap. So three dexes were integrated and over the time we integrated more dexes, we improved our algorithm, also if sometimes it's impossible to swap one token with another one, because there's no trading pair, we swap to ether and from ether to the token.
CR: So you build 1inch basically over the weekend at ETHNewYork?
SK: Yeah. At the hackathon we built a very simple mathematical formula with the algorithm and we improved it later with a dynamic algorithm by Mikhail Melnik, who also built a lot of statistics for Uniswap, and Bancor. We were on almost no sleep at the hackathon, trying to finish on time, hopefully get the main stage prize.
CR: Did you get it?
SK: No. The thing is, there were different judges’ groups. And I pitched to one group, who said it's incredible, it’s useful, it brings value for Ethereum, but the other group didn't understand it. My English is not the best one and I cannot explain very well. I have problems with pitching skills. But if Anton is with me, then it's less of a problem. We participated in hackathons for nine months, almost every month.
CR: I think that that's super interesting. What did you get from that experience in participating in so many hackathons? And also, how were you able to come up with new ideas each time?
SK: We had tons of ideas, also we were talking with the different sponsors, with different people and decided at the hackathon what we are going to build. The value we got from the experience is getting faster at delivering. You can see how fast we are now at 1inch delivering features. We deploy almost every day new things, and this energy comes from the hackathons. At hackathons, you have only two nights and one and a half day to build something and to present it as an MVP.
For example, we build a streaming solution in this time. We were able, on the first night to stream the whole hackathon to the internet over Web3 technologies. We integrated state channels to offer the ability that if someone produces content over YouTube, someone who watches it can pay for each kilobyte they watch. They had to connect to MetaMask and they had to open a state channel on Raiden Network.
CR: That's very cool. And so like what happened to all of these different projects that you built across nine months or so?
SK: They're live and you can use most of them, but we don't work on these projects because we're concentrating on 1inch right now.
Open Source Dilema
CR: Okay, and about 1inch, I'm interested to understand the difference between your platform and other dex aggregators.
SK: We solved a big problem, the biggest problem from dexes, which is that there's not enough liquidity on each dex. We combined all the liquidity into one place. We invented a special architecture for the aggregation of swaps, and also integrated a proxy smart contracts, which has specific components to protects the user from losing money. And this architecture design, which we invented, is now used by Dex.AG and Paraswap. We got into a big discussion with the community after we said Dex.Ag copied our smart contract.
[I reached out to Dex.Ag for comment on claims that it copied 1inch code under copyright and they pointed me to previous statements. Dex.Ag tweeted on Nov. 21 a statement, which said attacks on the dex aggregator were “counterproductive, unfounded and unnecessary.” The legal counsel of Concourse, which owns Dex.Ag, said on GitHub the company “didn’t steal any code,” responding to a petition from Kunz to remove code.]
CR: That's interesting because this space is very much about open source, and the risk or downside of that can be that a competitor can copy your code. So how do you deal with that?
SK: We decided to try another way and published OneSplit. This is an on-chain dex aggregator. We published a Gitcoin grant for that and we were funded with $8,000 and got an additional $2,000 from the Ethereum Foundation.
We are actually not on-chain with 1inch. We have centralized off-chain books from Ox and AirSwap -- AirSwap isn't integrated anywhere else -- and we of course also have all the on-chain swaps. We are now handling all the on-chain swaps with OneSplit, which is open source. 1inch also uses a proxy smart contact which protect users from loosing money. We have different validators there which verify that the user get not less than expected. This is under copyright.
But OneSplit is an open source project and any competitor should use it, fork it, change it all you want, they can contribute if they like, whatever. It was only a waste of time to argue with people about a license and copyright and so we just say, use it. Use our technology. We have now enough users and they use us because we have nice features, we have more integration than others and we are very easy to use.
CR: So aside from that proxy contract, is 1inch fully open? The frontend and backend?
We are decentralized. We have no backend systems and the website is deployed on IPFS. So if someone goes shutdown or domain 1inch.exchnage, it's still possible to use the 1inch.eth.Link. But the 1inch front end is closed because if someone can copy your frontend, your page, then they can create fake pages for phishing. So we decided to not publish the whole page, but some parts of it are easy to find in our GitHub repository.
And as for our backend, we only have smart contracts. It makes no sense to use a centralized backend on dapps. Stay decentralized and you can scale. If you have, I don't know, 1,000 people with a centralized backend then you have to scale it and pay for it. We only pay for Etheruem nodes.
We had some problems in the last three weeks. There were some guys who started to make a lot of requests on our Ethereum node to overload them to damage us. I'm now blocking it through a cloud provider, but it only affects people who don't connect through MetaMask. If our centralized gateway for Ethereum is down, you would be able anyway to work with 1inch because you connected through MetaMask.
CR: You mention you developed a special algorithm. How does it work?
SK: What we decided with our algorithm is to split the whole amount of tokens users are going to swap. You have thought 1,000 ether, we split it to 100 pieces and we ask for each piece on each exchange for the price. And then we would have our dynamic algorithm go through the metrics and find the right combination. We didn't use any existing algorithms for that. We built our own.
This was our main differentiating factor, until other competitors started doing the same. Now our thing is the liquidity which we can provide. We have the private market maker guys. We improves our processes and OneSplit’s multiple splits are not yet covered in competitors. We will work on our improvements and we will also roll out new things and we will not stay on the same place. We aim to always be the fastest.
CR: I noticed that your volume quickly started outpacing the rest. How were you able to achieve this?
SK: The higher high volume is due to out strategy; how we publish and produce features and promote them. We invented the splitting function across dexes. From our point of view, we invented it, and we were the first who started to offer it.
The thing is how we work. We are very aggressive. Our unicorn logo is a manic unicorn. We are crypto maniacs, so we decided to create a manic unicorn, opposite of Uniswap's unicorn, which is really lovely. We publish every feature on Twitter and we promote it there and we publish in GitHub channels, we get feedback, we react on the feedback and we can provide better prices in the market and I think this is the main thing.
Image source: 1inch
CR: What advise would you give to other developers?
SK: Be fast deploy as much as you can, deploy it or deliver features as fast as you can. I sometimes work on weekends, sitting on the couch with my sister and typing up new features and publishing them the next day. Soon you have a cool thing which can help your users. Just be really aggressive in what you do. Deliver 200%. Like, if we hack in a hackathon, we don't sleep almost.
CR: Can you tell me more about the latest feature you introduced, limit orders? It seems like dexes have been slow to implement this, is it because it’s hard to do?
SK: Actually, it's not hard to do. We built a limit oder solution at a hackathon in December. We got a $1,000 prize for it.. We wanted to roll it out, but we had the pain point that we had to audit the smart contract to protect our people. But the audit is very expensive so I thought, we have great protocols in Ethereum, why not use something what already exists, and this is Ox
Maybe we will roll out our own solution this year when we have money for the audit, but for now we use the Ox protocol and Ox Mesh, which also has the benefit that we can share out orders with everyone. That means our limit orders can be taken by Totle, by Paraswap, by Dex.AG, if they implement Ox Mesh -- I think for now only Totle is. But they can take it and we can share the orders and we are happy if someone will take these orders our users s will be happy and we have fewer competitors.
CR: So about your business model, you say you don't charge fees, so how do you plan to monetize this?
SK: We do already. We have affiliate payments from private market makers and we also get affiliate payments from Kyber.
CR: So all the orders that you route through Kyber you get a fee or a percentage of that?
SK: Yeah. Kyber charges fees and we get part of that.
CR: Could that skew incentives to make your algorithm pass orders through Kyber?
SK: We offer the customer the best price on the market. Of course we can earn more if you just put everything through Kyber but then user won't get the best price on the market, so we wouldn’t do that.
CR: And the second way you said you're monetizing was through my market makers. How does that work?
SK: We say, okay, here's the user they're going to swap 1,000 ether to Dai. Can you provide a rate on that? They answered with the rate and we calculate through our algorithm if it's profitable to swap with them. We do that with Ox relays.
CR: And then when it makes sense to to do the swap through these market makers, you get a fee from that trade?
CR: What’s the very next feature that we can expect to see on 1inch?
SK: Our algorithm is great at splitting but right now, we don't respect gas usage. Sometimes if you swap on Kyber, that's half million of gas, and on Uniswap it's only 100,000 gas, maybe less. But the algorithm doesn't look at that. So the very next thing is, we’re going to introduce an algorithm that respects gas costs.
Taking Over Cexes
CR: Lastly I wanted to ask you about kind of the Dex aggregators in general. They're still bringing in a fraction of what dexes themselves are bringing in, and volume is of course even lower compared with centralized exchanges. Why do you think this is?
SK: The thing with Uniswap, Kyber users and others is probably that they haven't heard about us. We have zero money for marketing and we achieved these numbers with zero money for marketing. Only our aggressive strategy on Twitter the same with centralized exchange users, they will come to us as soon as they hear about us.
And as for centralized exchanges, they still have some benefits, they have nice graphics, but everything can be solved, I'm sure of it. We implemented this limit order solution and it's so simple to use. Kyber already implemented graphics, it's using TradingView and looks good. But our UI/UX is not that bad I would say. It's a hackathon project and we had no money for a UI/UX guy.
We are looking right now for funding to improve some of these issues. We have interest from venture capital funds and we need to find the right location of where to incorporate but we will solve it this year.
We eliminated the biggest problem of dexes which is low liquidity and a high price slippage. Soon I think nobody will use centralized exchanges because they'll have lost trust in them after they get hacked all the time. They will swap on dexes or they will swap on aggregators.
The Defiant is a daily newsletter focusing on decentralized finance, a new financial system that’s being built on top of open blockchains. The space is evolving at breakneck speed and revolutionizing tech and money.
About the author: I’m Camila Russo, a financial journalist writing a book on Ethereum with Harper Collins. (Pre-order The Infinite Machine here). I was previously at Bloomberg News in New York, Madrid and Buenos Aires covering markets. I’ve extensively covered crypto and finance, and now I’m diving into DeFi, the intersection of the two.