Star Wars meets Blockchain: The Mandalorian and Interplanetary Chain Code

Recently, Disney+ launched a new series to build on the Star Wars universe called The Mandalorian. It follows a Mandalorian bounty hunter (think Boba Fett) on his adventures tracking down various characters for their bounties.

During a meeting with his handler in trying to acquire new bounties, the Mandalorian makes mention of “chain code” in the terms of taking on a vague underworld contract.

Chain code has never been discussed or defined in the Star Wars universe and the show doesn’t explain it at all, but I firmly believe that they are referring to blockchain (and you will too).

Chain code is code run on the blockchain

That’s the literal name of it IRL.

Also called Smart Contracts or dApps, chain code refers to any code that lives on a blockchain and does stuff automatically.

A great example of this would be to, say, put bounty money in escrow that would automatically be released when the subject is captured and returned.

It allows the bounty hunter to feel secure that payment would come through when terms are met.

Blockchain is the solution for interplanetary transactions

If I make a deal on Coruscant to deliver a prisoner to Naboo, I wouldn’t want to wait or rely on intergalactic transmissions to ensure payment. It would make more sense to confirm against a node (computer) on Naboo that has a copy of the chain code.

Since blockchains are immutable, append-only ledgers that are distributed identically across the galaxy, I can rest assured knowing that I will get payed for my bounty from the chain code and that my handler will be notified of the hand off.

If I were using standard centralized servers, I couldn’t guarantee that my handler didn’t delete or alter the contract – or that the government didn’t seize the assets and shut it all down.

And on top of all that, intergalactic communication take a while even at the speed of light. This distance requires asynchronous systems to have any type of reliability; otherwise I’d be waiting hours for communications to confirm.

In short, chain code via blockchain is the only reasonable solution for bounty hunting baby yodas.

DAI: An Actually Decentralized Stablecoin

Quite possibly the biggest concern that non-crypto folks have with cryptocurrency (read as Bitcoin) is the extreme volatility and the prospect of “going to zero”.

Now, I have deep faith that the value of Bitcoin, Ethereum (and a handful of others) will prevail, but the true on-ramp of the masses will not be speculative assets, but rather stable assets – those designed to maintain a specific static value over time.

Stablecoins remove volatility from the equation and are designed to prevent the value of your coins from moving with the rest of the market.

As with Tether, USDC, and others, DAI is a cryptocurrency that is designed to be pegged against the US Dollar.

1 DAI = 1 USD

The usual method for pegging stablecoins against a value is to back them up with that physical asset. For coins like Tether (USDT), reserves of cash are banked away in the same way that the FDIC would insure accounts: for every USDT issued, a physical USD sits behind it to cover liquidity in the case of a “run on the bank.”

DAI, however, is not backed by a bank account. It’s backed by economics (more below).

You might think this is a bad thing, but I’d like the chance to argue that this method is superior.

Issues with USD-backed stablecoins

The biggest flaw I find with USD or other currency backed stablecoins is that this creates a single point of failure for the system.

  1. It’s a single company in charge of the currency
  2. It’s a single bank in charge of that account
  3. It’s a single country’s government that regulates that bank

If that government decides to make cryptocurrency illegal or seizes the assets for reasons, what fate would befall these bank accounts and companies?

If a CEO goes rogue or is coerced into distributing funds, what trust can we have in the stability?

If companies refuse to agree to 3rd party audits, how can we know that these stablecoins are even backed at all?

In order to trust in FIAT-based stablecoins, we must trust in corporations, banks, and governments to get it right. I personally would like to trust them less.

DAI isn’t backed by USD

.. and that’s a good thing. So, how can DAI peg against the dollar?

Simply put: supply and demand. Here’s how it works:

How DAI get’s created

Unlike other stablecoins that are issued by a central issuer, DAI can only be created by staking collateral. (there’s a lot here, but we’ll cover that in another post)

Practically, in order to create DAI, I need to lock up some other valuables as collateral like ether into a vault (and can only retrieve that collateral once I pay back the DAI that was created).

Now, let’s say I create 10,000 DAI with some amount of ether. The worth of this is $10,000.

If the market value of DAI grows to $1.01, I would be incentivized to sell my DAI because it is worth $10,100; earning me $100.

This increases supply of DAI in the market, driving price downward.

But, I still need 10,000 DAI in order to unlock the ether that I put in.

So, if I see that the price of DAI has fallen to $0.99, I can buy 10,000 on the market for $9900; effectively earning me another $100.

This increases demand for DAI in the market, driving price upward.

Now that I can redeem (burn) the 10,000 DAI to unlock my ether, I pocket $200 extra (minus fees) and repeat the process.

In fact, I can specifically create new DAI when the price is above $1 with the express intent to sell it high and buy it back when it returns to $1 or below.

This both increases supply of DAI in the market, driving price downward, and increases demand for undervalued DAI as the collateralized ether will need to be unlocked, driving price upward.

Pretty neat and done completely without a bank.

In short, economics, profit, and the market combined with how DAI is collateralized drives the price to $1 – and has effectively done so since Dec 2017.

Combined with the new release of multi-collateral DAI (ETH, BAT, and other ERC20 tokens on the horizon) and the release of the DAI Savings Rate for hodlers, DAI is a pretty great stablecoin.

More Reading

We’re only scratching the surface here. DAI is a part of the Maker DAO ecosystem and there’s a ton more to explore around the economics of DAI and it’s relationship with Maker.