While some argue that it’s easy for me to sit here and take pot shots at DeFi projects (and my readers), I demur. Balancing my firebrand nihilism with some level of subject matter competence is no less miraculous than the fact that 90% of DeFi projects haven’t collapsed before the altar of the Peter Principle.

That said, there are a few projects that even I must admit, are pretty good. And 1inch is one of these rare beasts.

What is 1inch?

1inch is an aggregator of decentralized exchanges (DEXs). Say you want to sell your HEX shitcoin for DAI stablecoins. 1inch  looks at prices across DEXs, finds you the most favorable rate and then sends your order to the best DEX (or combinations of DEXs). In finance speak, we’d call it a “smart order router.”

Let’s give it a try.

I had a bunch of USDC floating around from my adventures with MakerDAO last week that were burning a hole in my Trezor.  I’d like to trade them for some Ether, and I’m going to use 1inch to find the best deal.

pasted image 0 38
Image via 1inch.exchange

How to use 1inch

At first glance,  there are a lot of buttons to push. But stay calm: While most sites do a poor job at balancing functionality with usability, 1inch has done this pretty well. Things are generally well laid out, and importantly, understandable.

First, I set up my USDC to swap for ETH. I have to do the familiar unlock routine that most all DeFi apps require.  Why is this step necessary?

In short, the way these apps work is that when you do a trade, they need to take a certain number of tokens from your wallet (and then compensate you by sending you the tokens you want to buy).

Transactions in Ethereum generally work when the sender  “pushes'' a transaction, just like an email. I, the receiver, can’t reach in and force you to give me an email, you have to write it and hit send.

The "unlock function"

By default, Ethereum (and most other blockchains) works in the same way. In order to let the app “take” something from me, I have to give it permission. The unlock function does this, by giving the app (in this case 1inch) permission to withdraw up to a certain number of a certain type of tokens (here USDC).

Most DeFi apps set this up as a one-and-done, meaning you give them permission to take any number of tokens whenever they’d like. As you’d imagine, it’s  a security hole, but it means that you don’t have to do this extra step every time, saving you time and money in transaction fees. To help alleviate this concern for the security conscious among us, they also give us the option of approving the sale of a limited number of tokens (the green box).

pasted image 0 34

I, of course, am lazy, so I opt for the yellow box, which allows them to take USDC tokens whenever. This means rather than going through the step of approving this “unlock” each time, I just keep the one-and-done setup.

pasted image 0 36

When I did this, it cost about $0.05 to set up.

While that is running, it’s worth noting that there are benefits (assuming one trusts 1inch) to doing this. You’ll recall that it crawls and aggregates other DEXs; I only have to do the unlock step once, and it works on every DEX that it supports. That means that if I use Uniswap today, and Kyber Network tomorrow, I only have to unlock once. This saves me time, plus the gas fees of doing the approval step at Uniswap today, and Kyber Network tomorrow.

pasted image 0 41

Splitting transactions

pasted image 0 42

While I’m waiting on that, there is another cool feature for geeks like me. 1inch shows the exchange rate that I will get for various amounts of USDC sold. The more (USDC) tokens I sell the less ETH I’ll get in return for each USDC. This is useful if you are trying to trade a large amount of tokens and are happy to split those transactions into multiple trades up over time.

You can also see how they intend to split the transactions across a number of DEXs. Given the small size of my trade they’ll just send everything to Uniswap, meaning there isn’t much benefit in using 1inch, over just going straight to Uniswap, but it does save me time in knowing that I got a better deal than if I had intended on using Bancor for instance. Helpfully, it also estimates what I would have to pay in gas at each option.

pasted image 0 35

So now my approval transaction is confirmed by the Ethereum network, I can get onto the dumping of stablecoins into my volatile ETH.

pasted image 0 37

Gas tokens

It’s all pretty  straightforward, but there is something interesting to note: 1inch uses a special trick to actually reduce the amount of gas I would pay when compared with doing the work myself. It’s known as a “Gas token.”

A new token! I know, but don’t worry. This is essentially a clever way to buy and hold gas when the prices are low, to reduce the amount paid in transaction fees when the price is high. It was first implemented by a team of academics. Don’t worry too much about the details, just know that this makes 1inch cheaper to use.

pasted image 0 40

With that approved, we send it over to the blockchain to let it do its thing.

pasted image 0 39
Image via Etherscan.io

Why I like 1inch

A few minutes later, the result! My transaction was done, and thanks to my amazing gas tokens, instead of paying some $0.27 for my transaction, I managed to get it done for about $0.08.

All said, and done, 1inch is fairly well designed for the average user. It has some security features that people with larger sums of tokens care about, and it actually helps you save money, and trade at better rates. On top of this, it saves me from having to actually look at the horrible pages of some many other projects that should just die, while benefiting from using them when they have good prices.

Disclaimer

The views and opinions expressed by the author are for informational purposes only and do not constitute financial, investment, or other advice.