🎟️ Weird DeFi — Issue No. 82

đź“°News

This week, the total value of the Dai stable coin held in PoolTogether— a smart contract based "no loss" lottery built on Ethereum— reached $1 Million for the first time. PoolTogether is one of several new projects in the Decentralized Finance ecosystem I affectionately refer to as "weird DeFi." These projects are incredibly cool, but also doing things that seem downright strange, especially to anyone not paying close attention to the crypto world. Link.

To be honest, almost every project in the DeFi ecosystem seems strange to "outsiders" at this point. I learned this recently when I tried to explain Dai and MakerDAO to a highly intelligent, but non-crypto savvy acquaintance. Projects in the "weird DeFi" category take this to a new level. They seem almost to defy explanation. But they're real, and they're working...at least for the moment.

In this edition of Build Blockchain, we'll look at three of the most interesting of these odd-but-compelling new projects: PoolTogether, Aave Protocol flash loans, and Sablier streaming money. Let's dive in!

PoolTogether: A No Loss Lottery

Up first is PoolTogether, the aforementioned smart contract lottery which recently crossed $1 Million in funds held. People have been using crypto for gambling since the early days of Bitcoin, but PoolTogether is different. Unlike typical lotteries, which pay out the winner using sales from the losers' tickets, PoolTogether pays out winnings using interest earned on every participant's funds. Link.

Image

Here's how it works. When you "buy" tickets to PoolTogether, what you actually do is contribute your funds into a collective interesting earning pool. Specifically, the pool is earning interest using Compound, another DeFi smart contract protocol that enables collateralized, peer-to-peer loans. Compound loans earn interest continually and can be redeemed in any fraction and at any time. As such, any PoolTogether user can extract the full value of their funds at any moment. While your Dai is in the pool, though, it provides a chance to win all the interest earned that week, with odds of winning that are proportional to your percentage of the total pool. Link.

PoolTogether is a great example of the composable nature of smart contracts. It leverages the existing functionality of both Dai and Compound, and would not be possible without their existence.

Aave Protocol Flash Loans

As mentioned, PoolTogether uses Compound to earn the interest it pays out as winnings each week to a lucky participant. Though Compound is the most popular money market protocol in the ecosystem, it's not the only one. Aave Protocol launched recently, and offers a lending service which is similar in nature. Aave also adds another spin: the ability to issue so-called "flash loans." Link.

Image

A flash loan using Aave is one that lasts no longer than the transaction in which it's issued. For all intents and purposes, that makes it instantaneous. A user can execute a transaction which takes control of tokens, uses them for some other purpose (like arbitrage on an exchange), and then repays those tokens with a fee before the transaction is over. If the coins are not returned by the end of the transaction which was executed, the entire transaction reverts, preventing any action the user might have taken with the borrowed tokens from being included in the chain. Link.

If the idea of an instantaneous loan that literally can't exist unless it's paid back doesn't bend your mind a bit, I'm not sure what will. What makes it possible is Ethereum's concept of "internal transactions." Recall that on Ethereum, transactions submitted to the blockchain often do more than simply move tokens or coins between addresses. Each transaction submitted to the network can call smart contract code, which can itself execute many internal transactions which make modifications to the state of the network. If anyone of those internal transactions fails, the entire parent transaction is reverted, along with any changes wrought to the network's state.

Sablier Streaming Money

The last of the "weird DeFi" projects to discuss is Sablier. It lets you "stream" money to another entity by depositing Dai, or another token, into the Sablier smart contract while specifying a receiving address and a length of time. The contract unlocks the tokens proportionally as time goes on, and the receiver can decide how often to make withdrawals. Link.

Image

An example is in order. Let's say I've hired you to do some subcontracting work over the next 10 days, and we've agreed you'll earn $1000 for the project. Rather than waiting to pay you a lump sum at the end, I stream you $1000 via Sablier. That means after each day, if you'd like, you can extract $100. It also means that if you need cash for lunch four hours into the gig, you can pull out $16.67. As the payer, I can cancel the remainder of the stream at any time.

There are a lot of potential use cases for a tool like this, but the obvious one is payroll. For low wage workers, who often deal with cash flow issues, such a system could be a godsend. It could completely eliminate the predatory practice of payday lending.

Keep DeFi Weird

I hope it's clear that while I've been referring to these projects as "weird," I mean that in the best possible way. There's a very good reason for the strangeness. Decentralized cryptonetworks have given us a set of new primitives to work with, namely: digital scarcity, unstoppable code, and immutable data. What's more, these networks are permissionless playgrounds for developers and entrepreneurs. When you put powerful new tools in the hands of creative people, on a system where literally no one has the ability to stop them from building what they want, you're going to get a lot of wild experimentation. This is a glorious thing! Link.

This isn't to say these projects are perfect as they are. PoolTogether, for example, uses a proxy contract controlled by a multisig. That scheme allows the project's founders to confiscate the lottery funds, if they choose to be nefarious. This ought to move in a more secure, decentralized direction. The point is that the ecosystem allows this kind of inventive exploration in the first place. This is a feature, not a bug.

I'm excited to see what kind of crazy stuff folks create in the coming years. I expect things will get quite a bit weirder. Some day, though, I fully expect all this strange stuff will just start to feel normal.