Saturday, October 19, 2019

The ZimDai Stack - A Technical Breakdown

Here we'll go over the "tech stack": the set of technologies that allows Dai to function and guarantees it will always be available in Zimbabwe.

Much of this isn't relevant to customers or even to agents, in terms of how it's used. This is more for those of us who need to know how something works before trusting it.

The short version is:

  • Cryptocurrency technology at the base
  • Ethereum, a particular cryptocurrency that enables "smart contracts"
  • Dai, a "stablecoin" built on Ethereum smart contracts
  • DAIHard, an unkillable entry/exit mechanism, also built on Ethereum smart contracts

Cryptocurrency

Most people have heard of Bitcoin, invented back in 2009. This was the first cryptocurrency. Since then, many more have been developed and the industry as a whole has matured greatly.

Generally, the drawbacks of cryptocurrency are: - Volatility: the value of any given cryptocurrency faces huge spikes and falls - Difficult to enter and exit - Not as simple to use as "regular money" - Lack of adoption (no one else is using it, so why should I?)

But there are some important benefits: - Global monetary system - Uncensorable - Unhackable - Resistant to regulation and litigation - No one controls it (like the Internet itself)

Cryptocurrency is a huge subject, and could fill several books. This article would be a good starting place to learn more.

Ethereum and Smart Contracts

Ethereum is a cryptocurrency that enables the operation of smart contracts. You can read more here, but the basic idea is this: a smart contract is a piece of code that lives at a specific Ethereum address. Like other addresses, this address can receive money.

When the smart contract receives money, it will do with the money whatever it was programmed to do. A simple example might be a "splitter" contract, that splits the money in half and sends it to two other addresses. Another example might be a simple time-lock contract, where it will hold the money and not allow withdrawals earlier than a month.

The most common use of this technology is to build a new coin without having to build the whole blockchain technology from scratch. In fact, as of January, 94 of the top 100 cryptocurrencies were actually built on top of Ethereum.

Because these smart contracts store and execute their code directly on the blockchain, technology built on them inherits many of the benefits of cryptocurrencies: unhackable, unstoppable, and resilient against regulation or goverment shut-downs.

Dai

Dai is another coin built on Ethereum, but with a particular advantage: it is pegged to the US Dollar, such that 1 Dai always equals 1 dollar. This is achieved not through a simple IOU system (such as TUSD and USDT use), but is has a transparent system that generates (or destroys) Dai to maintain the peg, which nobody owns and anyone can interact with. This effectively eliminates the general "volatility" issue most other cryptocurrencies have.

Here is an overview of how the system works. In the end, it incentivizes people to put at large amounts of collateral "behind" every Dai that is created, and if the price of ether falls, the system will begin liquidating this ether collateral to protect the value of the Dai. You can see some interesting statistics of the entire system, like total issued Dai and collateralization ratio, here.

If you have Metamask or another "Ethereum browser wallet" installed, with some ether in it, you can go here, deposit some ether to create a "CDP", and generate a smaller amount of Dai. At any time later, you can return the Dai to get your ether back. All of these rules of depositing/withdrawing/generating Dai are written in Ethereum smart contracts, meaning that it doesn't rely on some company or individual to keep running.

DAIHard

DAIHard is another system built on top of Ethereum smart contracts. But rather than being another cryptocurrency, this is a more "user-facing" app. Its purpose is simply to provide an unstoppable, global mechanism for a user with Dai to sell it for local currency, or for a user with local currency (and a small amount of Dai) to buy more Dai.

The tool is essentially a matchmaking platform, where Dai sellers can connect with Dai buyers, where they've agreed on a price, a local currency type, and a means of transferring the local currency. Even though you're dealing with a stranger, the system is built such that scams should always be harshly punished, and therefore should rarely ever be attempted.

Our launch post is a pretty good intro into what DAIHard does and why it's important in general, and this usage video should give a good picture of how it's actually used (although the interface has changed slightly since then). If you want to get technical about why the threat of burn exists, and how we can expect the whole thing to work, see the game theory post.

Finally, you can go see the app itself, but if you want to open or commit to any trades you'll need to install Metamask or some other web3 plugin.



No comments:

Post a Comment