Cardano and Midnight II

The following is very much still in DRAFT mode which I may or may not edit further. Apologies in advance for any grammatial errors. Wrapping my head around all this is already far more work than I wished to do on this. Consider this an opening POINT OF VIEW for the community to debate around.

Image source: https://uxplanet.org/complex-products-25b3793f8f49

I didn’t think I’d be writing another Cardano/Midnight blog post let alone within days of the prior one but here we are. This will be an analysis of the Big Pey interview with Charles Hoskinson, as it relates to Midnight. If you haven’t watched the vid, watch it from the 17:16 min mark here.

I also highly recommend watching this. Go on. Click on it. You’ll recognize it.

As with my prior blog post, I have no desire to spend too much time on this so I shall try an keep my thoughts as brief as I can make it.

Not having a technical white paper is ridiculous

Let’s start by acknowledging how ridiculous it is that we are trying to piece to gether technical details from an interview. I almost didn’t want to write this blog post as it shouldn’t be up to me and other social media commentators to try and piece things together. There really needs to be a whitepaper for Midnight.

Here is a list of resources I had to go through in trying to piece together what Charles was saying in the Big Pey interview:

  1. The Interoperability section of the original whiteboard video
  2. The Minotaur paper
  3. The Cardano Computation Layer
  4. The Cardano Settlement Layer
  5. The Partner chains blog post
  6. Web page about consensus on Substrate
  7. Blog post on Babel fees
  8. The Cardano Summit keynote
  9. The Kachina Paper

When it comes to enterprise use case, there are dozens of examples where building on Cardano L1 does not make sense

When you look at things like privacy, or Internet-Of-Things, or World Mobile, or what people want to do with decentralized large language models, there are a dozens of use cases where that doesn’t make a lot of sense unless you have a purpose-built blockchain specifically for that and the issue.

Cardano by itself is not good for problems where some parts (think of some regulatory need, KYC perhaps) need to centralised and some not.

The original vision for Cardano was to do what Midnight is now designed to do

If you watched the whiteboard link that I highly recommended (second link in thie article) you will have seen how Charles says the hope is Cardano will be the glue that can be the regulatory compliance layer to other chains.

However it seems a new chain, Midnight, has been created to be the interoperability and regulatory layer that was initially envisioned. Watch the whiteboard link I provided up to the 33:38 mark, to see if you agree with me.

I don’t think its a big deal – the whiteboard video was from years ago and plans evolve as you learn more. But it’s interesting that substrate was used as the base for Midnight and not some derivative of Cardano.

Midnight is a chain that provides regulatory services to DApps built on other chains, starting with Cardano

Midnight seeks to provide the services that enterprise DApp need to meet regulatory and other requirements. But it also wants to go further and demonstrate how some of these requitrements can be met in a privacy preserving manner using things like decentralised identity and zero-knowledge proofs.

“So the point of midnight is to showcase first the entire partner chain concept (all these larger order things like the centralized llm and iot and other stuff alongsideprivacy preserving Technologies showcase how that works in general as a partner Network) and then more importantly to really start imagining what a fourth generation blockchain needs to look like something that’s not a layer two or aside chain but both at the same time and merges the idea of identity and privacy”

Partner chains (a deriviative of the Substrate SDK) replaces the Cardano Sidechains SDK

Partner chains are described as a framework for building side chains.

“With partner chains, networks will have the power to build their own computation layer leveraging a modular framework and existing components, yet still leveraging the CSL for settlement across chains. Midnight, the recently announced IOG data protection-focused blockchain, will be the first partner chain to implement this new framework.” [source]

While not officially a replacement, for all intents and purposes it sounds like Partner chains replaces the Cardano Sidechains SDK.

Substrate describes itself as

“Substrate is a Software Development Kit (SDK) that allows you to build application-specific blockchains that can run as standalone services or in parallel with other chains with the shared security provided by the Polkadot ecosystem.”

In this case Partner chains can be described as:

Partner chains is a Software Development Kit (SDK) that allows you to build application-specific blockchains that can run as standalone services or in parallel with other chains with the shared security provided by a mix of POW and POS ecosystems – starting with Cardano.”

Predictable Pricing

“So basically what happens is that you pay the Stake pool operators and the Cardano Network as a whole, the inflation of the system in exchange for decentralization and security and infrastructure and liquidity”

Initially I found this incredibly hard to parse. What did paying the inflation of the system mean? Thankfully @0x_cardano gave me a pointer, and based on this I think it means new Dust tokens are magically created (Dust inflation), and those are then used to pay SPOs. But I know from the Key note that SPOs recieve payment in Ada, therefore Babel fees must be at play to automagically convert the Dust tokens into Ada through liquidity providers.

The benefit of this is that enterprises can get predictable pricing – they pay a fixed amount and that gets converted in the background to the token of choice that the security provider (aka validator) would like.

Borrowing the security of the main chain

You’ll hear the phrase “Borrow the security of the main chain” mentioned a fair bit. Here is what I think it means, and it pretty much ties in to my prior blog post.

It means borrowing the SPOs from the main chain and getting them to perform Midnight work in addition to their usual Cardano workload. This implies (at least to me) that Midnight will have its own consensus algorithm (guessing it’s probably not EUTXO).

Indeed delving into the substrate documentation I see this:

All blockchains require some type of consensus mechanism to agree on the blockchain state. Because Substrate provides a modular framework for building blockchains, it supports a few different models for nodes to reach consensus. In general, different consensus models have different trade-offs, so selecting the type of consensus you want to use for your chain is an important consideration. The consensus models that Substrate supports by default require minimal configuration, but it’s also possible to build a custom consensus model, if needed. (source)

Validator selection

Not sure how SPOs get selected to perform the validation – it must be based on stake, but you wouldn’t want a validator winning both a Cardano slot battle (i.e. the right to produce a block) and a Midnight slot battle. Close to no information has been provded about how this will work so we are left to guess.

When it comes to where the transaction settles (which blockchain ledger records the transaction) it sounds like that will be on the Midnight ledger (see comment on Midmight tokens down below).

Finally its possible to have a more than one validator, validating a transaction:

Slide 1

“So it’s conceivably possible that you could actually borrow consensus from Bitcoin ethereum and cardano and pay inflation to all three”

Midnight validators will have access to multiple ledgers

One of the things Charles talks about is how they still need to figure out how to avoid needing a copy of every blockchain ledger in order to validate a transaction. This implies then that a Midnight validator will be able to query other ledgers in order to validate a transaction given to them.

But how would a Cardano SPO know how to validate an Ethereum transaction?

Short answer – it won’t. The service running on Midnight, writen in Typescript, is what the SPO would run. The service would be designed to perform a certain type of action (e.g. allow transaction if the person has a valid KYC certificate) and the typescript/ Partner chain SDK mechanisms would be responsible for settling the transaction to a ledger. The SPO simply has to validate the Mightnight transaction not the Ethereum transaction.

How does this benefit Cardano?

Cardano SPOs and delegators to that SPO would benefit from getting more Ada rewards. It may however apply pressure on all SPOs to try and sign up to be a Midnight validator as they may lose delegations if they don’t. Also it would be good to know if signing up to be a Midnight validator will be permissionless.

Cardano DApps that have to shift to being regulatory compliant can make use of the services being provided on Midnight. However it’s not clear whether one can just built a DApp natively on Midnight and have it use Cardano or some other chain just to record (settle) the transaction. I’m guessing the answer is yes it can, at which point I can only imagine its easier to tap into the liquidity of other chains if building natively oin Midnight than indirectly through Cardano-Midnight-Ethereum.

It’s likely that IOHK will launch a Partnerchain for Data storage next year

Storing all sorts of data permanently on a blockchain doesn’t make sense as you end up with a ginormous ledger full of redundant data that no one is using.

Charles suggested having a partner chain that acted as a data storage service (think IAGON) would be a better solution, similar to how AWS cloud storage works.

It also sounded like IOHK had made a strategic acquisition in this regards and was planning to announce something next year.

Midnight itself has two ledgers

Eran Barak explained during the keynote that Midnight will have two ledgers: One is for storing private information and one is for storing public information.

Midnight is a dual coin system (DRAFT)

At first I thought the dual coin system was related to the dual ledger system but I’m beginning to realise they may be two separate concepts.

Let’s start by documenting some source material:

Here is my best attempt to explain it, in the form of visuals. Note that this it still a best guess and it would require somone from IOHK to confirm its accuracy. [EDIT: I’ve removed the explanation I came up with due to conflicting and confusing messages coming from CH and the Midnight CEO.

Kachina

An angle that I’m yet to figure out is the Kachina research.

As explained by Pi, this is about enabling transactions to have access to a private state, and a global state.

“Fundamentally, Kachina models smart contracts as “interactive state machines”, with a shared “public state”, a per-user private state, and a transition function that is allowed to update the public state under some conditions.” (source)

“So, with a transaction, you can prove that you know *some* private state, in the list of “current” private states (without revealing which one) such that running the code of the contract (increment the public balance, decrement the private balance, fail if <0, etc) is valid” (source)

I did however receive this tweet that I will reference here for now:

Conclusion

Having spent hours going through all the various materials I can find on Midnight, here are my views:

  • Midnight has its own ledger (a private/shielded one), and a dual token system as described above. For all intents and purposes it helps to think of Midnight as a separate chain, that wants to borrow the processing power of Cardano SPOs
  • Cardano SPOs may face pressure to adopt Midnight to avoid losing delegators
  • Midnight will have its own DApps that may compete with Cardano DApps (very speculative – would be good to get more clarity here)
  • Cardano can benefit from utilising Midnight services to be regulatory compliant but I’m not sure if they form the first wave of developers building on Midnight to take advantage of this
  • The Midnight token (not sure if Dust or the unshielded one) will be inflationary – think Dogecoin where new coins are being minted all the time. Something where you really want to spend it, and not use as a store of value.
  • This will then be converted into Ada using Babel fees, where Ada is considered a deflationary token – so you generate new wealth through the crypto magic internet money system, and then convert it into the asset the partner would like to get paid in
  • I predict Midnight will seek to bridge to Ethereum within a year give how large that ecosystem is.
  • Ultimately Midnight is fairly neutral for Cardano. It will provide additional tools, both around regulatory compliance, but also making it easier to exchange liquidity between ecosystems (Eth to Unshielded token to Ada)
  • But its up to the Cardano ecosystem to go out and grow its own ecosystem and attract new users/liquidity. Otherwise it risks being a cuckold chain – the backend infrastructure provider to Midnight, who’s going on dates with Ethereum and others.

Published by ReddSpark

Follow me on Twitter: https://twitter.com/Redd_Spark or YouTube https://www.youtube.com/@ReddSpark

Leave a comment