Showing posts with label Blockchain. Show all posts
Showing posts with label Blockchain. Show all posts

Monday, January 30, 2017

Corda and the Distributed Ledger Technology

Recently I became involved with SCC's committee on "Blockchain and electronic distributed ledger technologies". During one of the discussions, I've learned about a new term that seems to have become very popular in the banking industry - "Distributed Ledger Technology" (DLT). Apparently companies like Deloitte or even the UK government have picked up on this new thing and seem to be abuzz with it.

Instantly this reminded me of 2015 when big companies like NASDAQ and Overstock expressed their interest with "the Bitcoin technology", but they didn't want to be associated with "Bitcoin", therefore decided to rename this whole thing as "blockchain technology". Maybe this was just another way for companies to invent a new five dollar word and charge a hefty sum to consult on it?

After doing some research, I couldn't find much on what exactly DLTs were - there doesn't seem to be a concrete definition floating around yet. However, a few people pointed me to one example of an actual implementation of a DLT - Corda. Lucky enough, someone coincidentally decided to organize a meetup about Corda around the time, so I had some good opportunity to learn what it's about.

Corda


Corda is a Distributed Ledger Technology implementation by the R3 consortium. It is open source, comes with a Slack, a whitepaper and all that.

Corda has been created from the grounds-up for the use by banks and other financial institutions, prioritising their needs first. This dictated a few important design choices:

  • Private transactions - transactions in the system are only disclosed to the parties involved. They are not globally broadcast for everyone to verify, instead only circulating in very limited circles as small as two peers.
  • No blockchain - since there is no need to let everyone know about every transaction that took place, there is also no need for a blockchain, be it public or permissioned
  • Legal smart contracts - much like a Ricardian Contract, the smart contracts executed on the Corda network have explicit legal prose attached to them.
  • Optional notaries - if two parties don't trust one another, they can bring in optional notaries to verify various aspects of the transaction (no double-spending, uniqueness of transaction, etc.)

Knowing these features, we can try figuring out what existing cryptocurrency project it resembles most. Looking at this chart comparing various projects in the space (provided funnily enough by Tim Swanson a few years back before he joined R3):

Tim Swanson's "Current Cryptoprotocol Infrastructure" from his "Great Chain of Numbers"

It looks like Corda can fall in only one spot, which is the "Ledgerless Crypto Suite", alongside Open-Transactions. Indeed, the resemblance is quite strong.

The following explanation is based on the "Introduction to Corda" presentation and other materials I managed to come by.

Corda's base building block is a cryptographic transaction. It can be a simple payment, or a more complex smart contract. The transactions specify which inputs they are spending and what outputs they are generating (this works just like Bitcoin and is different from an "account-balance" approach of say, Ripple). Each transaction has a hash of a legal prose attached to it which governs how the transaction should operate. The transaction is then signed by all of the participating parties that agree to execute it - it could only be one entity when it is a simple "send money" transaction, or span multiple parties if it is a more complex swap or financial agreement.

The transaction can also be notarised or verified by third parties as needed. This could be as simple as a server doing a blind signature to verify the transaction is unique, or perhaps the whole transaction could be disclosed to some auditors as needed.

After a transaction is signed, that's about it - every party that knows about the transaction records it in their ledgers and the financial contract is thus binding. There might be some follow-up on the smart contract as it matures or other trigger points execute it, but with no blockchain, block generation or the like, there isn't much else to it.

As it stands, Corda seems to fit in as a common middleware for banks and financial institutions to standardise their interactions with one another, especially in the realm of financial contracts. This puts the project in a similar space to Open Transactions or Interledger, not too far from Ripple or Ethereum.

Corda criticism


Due to its focus on catering to the financial institutions, Corda might be seen as "more of the same", rather than trying to revolutionise the field like Bitcoin. Some people might dismiss it out of principle for not fighting to make the banks more transparent.

A system built on private transactions will be easier to manipulate than a proper blockchain. Unless all of the transactions need to be accounted for by some independent auditor, you loose the option to have "negative proofs". Since the amount of parties involved is so small, they can easily conspire to rewrite or delete the past transactions to suit their present needs. This could be mitigated by using a proof of existence and anchoring the various hashes of transactions into something like Factom.

However, if properly maintained, the system can enforce accountability. While the transactions may not be a part of a blockchain, they do form a transaction chain - every transaction spending the previous output. Having any single transaction signed by the various parties could be used against them - they might be compelled to provide the full, unbroken chain of transactions leading up to that transaction. While this might not uncover all of the transaction branches, there is at least some cryptographic trace of what happened.

Linking the legal prose to the smart contract is also asking for trouble. Even now people can have legal disagreements as to which interpretation should take precedent when you have a contract written in two human languages. Woe to anyone who wishes to mix legal prose with a smart contract. This would either require a new profession of some lawyer-programmer, some sort of legalese language interpreter / compiler, or the smart contract will be just a farce that could be overturned so easily it might not even need to exist.

Corda's presentation seems to indicate the legal prose takes precedent over the code. This might mean that there would need to either be some backdoor for third parties to overwrite or amend the contract, or the parties involved would have to work around the code to achieve settlement in the end. All in all, this can lead to a lot of mess in the code down the line. Some might prefer the approach of "code is law", but then we have the story of the DAO as a cautionary tale.

Moreover, the contracts dealing with international law and regulations would be even more complicated. This could lead to fewer transactions taking place between various jurisdictions to avoid the legal hassle.

Beyond that, Corda seems to rely on a few known key actors common to the Crypto 2.0 space. Lack of native currency means the system will need gateways to issue assets. Some design documents mention Smart Oracles, etc.

Distributed Ledger Technologies


Based on the example of Corda and Open Transactions, we can try drawing some conclusions of what the Distributed Ledger Technologies might be as a general term.

  • The technology seems to be focused more on transactions and less on grouping them into blocks.
  • With the absence of blocks, we necessarily have to do away with any form of distributed, native currency - there is no way for that currency to be objectively generated. The system instead uses IOUs for currencies and assets.
  • The system relies on a number of key nodes / entities to operate - auditors, validators, legal authorities, banks, etc. This means the system would be at best "decentralised"
  • Cryptography is still used to authorise various transactions and move the money around.

Conclusions



Distributed Ledger Technologies seem to sound more impressive than they are in reality. Some have proposed to use this term to refer to things like Corda as well as the existing Blockchain Technologies, but it seems to be mostly an unnecessary buzzword. The existing DLTs are not really distributed, but decentralised. The word "ledger" correlates more closely to a block of transactions than what we have in Open Transactions (where you can discard old transactions as they are not needed once they are confirmed spent). So perhaps a more accurate term would be "decentralised set of transactions"? DSoTs? DSoTTs if you want to include "technology" at the end as well...

Tuesday, July 26, 2016

How not to blockchain - a look at OneCoin

In the recent weeks there has been a resurgence of news about OneCoin, what appears to be a high-profile MLM ponzi scheme disguised as an altcoin. From what I can gather, the renewed popularity of the topic was sparked by OneCoin's Coin Rush Global Event:

Coin Rush Global Event

Watching this video as someone that has been around Bitcoin for 5 years now, there are more red flags here than you would see during International Workers' Day in some places. In fact, the video and OneCoin in general are such a good example of how you can bamboozle people by saying just the right thing that it might be a worthwhile exercise to dissect a lot of it.

The Basics


Going onto a cryptocurrency website you want to look for a few key pieces of information:

  1. Who is developing the project / the code? You want to find at least a competent development team identifying themselves. Examples: Bitcoin, Ethereum, Ripple. For OneCoin, the best resource I could come across was OneDream Team's "Top Leaders", which only boasts some news.
  2. Where is the company located? It is especially important for exchanges and other companies you're giving money to, but can be useful for the core development team if applicable. Examples: Ethereum (listed on the bottom page), Bitcoin FoundationBitStamp, not as much for Bitcoin Core (as it's a more decentralised development) Ripple, OneCoin or xcoinx.
  3. Where is the source code? If you can't see the code, you can't be sure what you're installing isn't malware or whether the blockchain itself is really there. Examples: Bitcoin, Ethereum, Ripple, but nothing for OneCoin.
  4. Is there a block explorer? If you can't browse the blockchain data and validate it yourself, how can you be sure everything adds up? Examples: Bitcoin, Ethereum, Ripple lacks a proper explorer, but has a public API endpoint. For OneCoin, best you can get is a falsi explorer (thank you /u/TimTayshun for the screenshot)
  5. Do any reputable exchanges trade it? A coin that isn't tradeable might not be a currency at all, but instead some "funny money". For a smorgasbord of examples, you can check out CoinMarketCap, indexing things as low as $8 market cap for COIN. OneCoin, despite boasting 5.2B USD market cap, is conspicuously missing...


Getting all five of the above points is a good start for any currency, but as we can see, even some of the largest coins are missing one or two of those features. Lacking all five does not bode well.

That's not how blockchain works


Putting all of that aside, let's look at the video proper and see what the event is about. Apparently the big news that day was that OneCoin is retiring it's old blockchain (!) and launching a new one in October so they can make more onecoins (!!). The justification being, and I kid you not, that they need more coins to grow, since there might not be enough coins for new merchants, Latin America, India, etc.

Let that sink in for a bit. A cryptocurrency that is not explicitly tied to a fiat currency is running out of coins for people. So instead of letting free market organically settle on a price it thinks the coins are worth and say, buying the coins from the market to give to the new merchants if they want, they instead decide to make more coins...


The issue is also more complicated than just that. OneCoin on its FAQ page claims its blockchain is mined with a custom solution based on Script and X11. However, you don't mine the blocks directly, instead "you just sign up on the mining dashboard on the exchange in your back office". This might remind some people of Proof of Stake or Delegated Proof of Stake, but no, OneCoin does it differently - "People are signed up and assigned to mining pools on a first come, first serve basis. Whenever a place is free you can join a pool.". The process appears to be:

  1. You send OneCoin money to buy the right to mine the coin
  2. You sign up to mine
  3. You wait for your turn to mine
  4. You get your coins
In other words, it's like purchasing coins from an exchange (send money, get coins), but with an arbitrary wait period (currently 3-6 MONTHS!) between sending money and receiving coins. As /u/TimTayshun pointed out, the block times are also very strange - too regular for a Bitcoin-like mining scheme. The blocks appear to be generated at the 10 minute mark without much variation. If there is any real mining going on, there is no real competition, no difficulty adjustment or anything like that. It looks a lot more like Ripple's Consensus algorithm than anything mining-related.


Splits and tokens


But even all of that is not the whole story. Enter the splits and tokens. You don't directly buy the onecoins, instead you buy packages that include tokens and splits:


Apparently in order to keep the price attractive, you split the tokens as you would company shares. In the end it means that you have a higher quantity of tokens that you can use for mining, but the value stays the same, I think. The splits apparently can only be used on the tokens, not the coins that are mined, and you can combo the various packages in some "strategy" to receive more and more splits.

This seems to accomplish a few things:

  • Make the process more opaque
  • Incentivise people to buy more and more packages to get the best value for their money
  • Make people feel like they are in control of how to get the most money and get ahead of everyone else
  • Widen the distance between real money and onecoins by extra few steps in a freemium-like model

So in other words, the entire system looks like a shady mobile app:

"Money, money, money money money money"

If that wasn't enough, you also can't forget about the match bonus for people you refer:
Because nothing inspires more confidence than a pyramid-like structure with the money flowing to the top...

There is also something about not actually purchasing tokens, but instead purchasing training from OneAcademy that conveniently comes with tokens, BVs and what have you, but at this point I think I made my point. Purchasing any cryptocurrency is simple - you take your money, you get your tokens. With OneCoin, a simple trade is a drawn out process taking many months with zero transparency. Mining is a joke, the numbers are multiplied over and over. But the story doesn't end there...

Show us your proof


During the Coin Rush Global Event, there have been a number of claims made about OneCoin and other coins as well. After hearing a lot of them, one feels the urge to shout "show us your proof". In no particular order:

  • OneCoin has 2 million active users, no other currency has as much - I would love to see a proof of that claim, since it not only asserts a lot of people are using OneCoin, but claims to know how many people are using other cryptocurrencies, which is an information that is hard to come by. Someone estimated Bitcoin to have 50M users by 2015, but that's a guess. How many people are actually active on Bitcoin or OneCoin, that would be interesting to know.
  • OneCoin has 4.5B USD market cap - seeing as the coins aren't actively traded at any reputable exchange and the blockchain is not verifiable, any number you throw out there is as valid as any other.
  • Bitcoin has almost no merchants taking it - there are 8000 physical locations taking Bitcoin today, in 2014 BitPay estimated the number to be over 20k. All in all, it would be interesting to see where the data is coming from, since it's not that easy to come by
  • OneCoin is in 195 countries, it's bigger than Western Union - It would be really interesting to see the actual list of their operations. There are 195 countries in the world, which means they would have to operate in the US, North Korea, Iran Sudan, Syria and Myanmar at the same time, violating a lot of international sanctions.
  • OneCoin can do more transactions than Visa and Mastercard combined - this would mean it can handle more than 2'000 transactions per second, it would be an impressive amount of data to synchronise in a blockchain
  • OneCoin stores all customer KYC information encrypted on the blockchain - this would not only be a huge customer data protection concern (blockchain by definition is shared between multiple parties, so all you need is a blockchain and encryption key leak and someone has compromised all of that data), but also an can be an issue of how decryption would be handled under a warrant
And from other sources:

The Icing on the Cake


Even after pointing out the various problems for a long while, there is still a lot more that needs to be addressed. Going into detail on everything would probably make this lengthy article probably twice as long. So let's finish off everything else in some quicker fashion. What follows are various claims, quotes and other titbits from the video presentation:

  • It takes over a year to mine one bitcoin - unless you're 21.co, nobody advocates Bitcoin mining to newcomers. Just like mining gold in real life, it's best left to professional companies
  • There are "Mickey Mouse coins" that copy OneCoin's concept - don't flatter yourself, everyone is aping Bitcoin
  • Just like you need a driver's license to drive a car, you need a drivers license for the cryptocurrencies - one of the beautiful things about Bitcoin is that it's inclusive - anyone can use it, you don't need a permission. While education is valuable, forcing people to go through a test before they can use cryptos is missing the point
  • OneCoin wants to be number 1 cryptocurrency world-wide in 2 years
  • When Bitcoin was one year old, it was worth 15 cents and nobody cared about it - it took two years for Bitcoin to be worth 15 cents, but now the speed at which good coins accelerate in price has increased thanks to Bitcoin. Dissing on the history to make your coin appear better is a false equivalence
  • OneCoin is one year old and it already wrote history - not really, but it will certainly write history once the jig will be up
  • They are aiming to have 20 million active users and 1 million merchants in 2 years
  • "We are the bigger community - we decide what the philosophy of cryptocurrency is"
  • The merchant / Latin America / India market capitalization is X trillions, OneCoin is only worth 5 billion, it simply does not work - normal coin would allow the price to grow to accommodate the market and use the 8 decimal places the coin has. Saying that you need to increase the amount of coins to grow is like saying you need to slice an apple into more pieces to make it bigger
  • "We can close new registrations, reject merchants... Or make more coins!"
  • "Biggest coin out there is Ripplecoin [sic], with 100 billion coins[sic]", and OneCoin will increase its number of coins to 120 Billion to be bigger than Ripple - that will still make you 3 times smaller than Fedoracoin, why not go for more?
  • You can't increase the amount with the current blockchain, need to retire the blockchain and launch a "new, more powerful blockchain" - you could, if your developers were up to snuff. Or maybe you're doing this to delete some old data from the old blockchain, or introduce some different balances that aren't supposed to be there?
  • Every account balance will be doubled after the blockchain is updated - again, increasing the numbers is not the same as increasing the value those numbers represent
  • When posting a question "will my coins be worth less after the update", the answer is not a clear "yes or no", but instead saying that the value of coins comes from brand and usability
  • Restaurant or retail store will never take Bitcoin - 8000 times false
  • "OneCoin will write history, and the cryptocurrency comminuty will have to rewrite philosophy"
  • "In 2 years nobody will speak of Bitcoin anymore"
And finally - "OneCoin Cryptocurrency is Unique, Safe, Global & With No Risk of Inflation", other than the doubling of the coins, the extra amount of coins that will be pumped into the system after the switch, etc. Those little things.

The Ecosystem


OneCoin, officially based in Dubai, boasts an impressive "ecosystem", consisting of 10 distinct items:

OneCoin's ecosystem

  • OneAcademy, an e-learning platform teaching about tarding, stock exchange, cryptocurrency, etc. in a 6-level program, boasting over 2'000'000 students and supporting 231 out of the current 195 world countries
  • OneExchange, currently not online
  • OneLife Network - "a digital platform with a unique ecosystem of sophisticated products and social networking tools that help members achieve financial independence", whatever that's supposed to mean. But fret not, they will offer you an "Ultimate Trader Package" for  the low low price of 118'000 EUR, and a tablet to match for 550EUR, only 5-6 times more expensive than a comparable tablet. No contact information
  • Merchants
  • OnePay - a payment solution based in Bulgaria
  • OneForex - an exchange that is not functional yet, but it will somehow be different from OneExchange?
  • Investment Funds
  • OneWorld Foundation - a charity helping the children based in Bulgaria, not to be confused with one world foundation, or One World Foundation or One World Foundation
  • CoinCloud - a cloud storage where you can buy 100GB of data space for 1 year for 3'030 EUR, which is about 1'500 times more expensive than Google Drive
  • CoinVegas - a gambling website based in Malta

There are 195-206 countries in the world. OneAcademy supports 231 of them

Conclusions


OneCoin, perhaps going in Microsoft's footsteps of wishing their products to be abbreviated into "The One" has raised a lot of red flags on all fronts. It does not instil any confidence in its products, its business strategy, or legitimacy of its creators. It takes money from a lot of people, turns it into a flashy show to boost confidence, and talks about its "community" and "family". The way it does business is overly complicated, intentionally opaque, and unverifiable. It is a blockchain and cryptocurrency only by self-proclamation. Keep as far away as you can from anything related and enjoy the slow-motion train wreck.

Related Links:


Bullshit checklist:


The Bitcoin Bullshit List

Your post advocates a new:
(x) Altcoin
(x) Permissioned blockchain
(x) Centralised / decentralised exchange
(x) Remittance service
(x) Gambling website
(x) Investment scheme
(x) Wallet
(x) Mining service (hardware, software, etc.)
(x) Mining pool

Your idea will not work.  Here is why it won't work.

(x) The proposed security model is (x) flawed / ( ) not enough / (x) completely wrong and therefore you will be ( ) scammed / ( ) hacked / ( ) stolen from / (x) implode quickly
(x) There is already a product on the market that does exactly what you’re doing, but (x) faster / (x) cheaper / (x) better / (x) is more established / (x) is not a scam
(x) You are proposing exorbitant fees for the use of your product that are unsustainable in the long run
(x) Your product gives unfair preferential treatment to (x) yourself / (x) the earliest adopters / ( ) early investors / ( ) select few / ( ) _____________________
(x) You violate the core principles of Bitcoin, including: (x) core cryptography of the protocol / ( ) 21M coin limit / ( ) coin distribution / (x) ownership of private keys / (x) inclusive nature of the network / (x) pseudonymity of users / (x) lack of transaction censorship / ( ) ______________
(x) You promise unreasonable return on investment without a clear business model of where the money is coming from
(x) Your project cannot be run legally at your jurisdiction
(x) Your project will not be compliant with the current ( ) KYC / ( ) AML / (x) gambling / (x) MLM regulations
(x) You rely on proprietary ( ) hardware / (x) software / ( ) intellectual property / ( ) _________
x) Your solution is worse than general-purpose computing hardware / software
(x) Your product is poorly implemented
(x) Your presale tokens have no economic value
(x) Your adoption goals are unrealistic
(x) Your product has zero transparency

Specifically, your plan fails to account for:
(x) The existing regulations
(x) The required Money Services Business license
(x) The anonymous nature of cryptography
(x) The geopolitical map of the world
(x) Adaptability to growth of the market cap
(x) The miner incentives
(x) Public reluctance to accept weird new forms of money
(x) Huge existing software and hardware investment in Bitcoin
(x) The known security exploits of the existing Internet services
(x) Secrecy of data decryption
(x) Increase in currency unit supply not being the same thing as increase in wealth
(x) Disproportionate increase in currency units drains wealth from one group into another
(x) The long-term sustainability of the project

and the following philosophical objections may also apply:
(x) It is a MLM scam
(x) It is a pump and dump
(x) It is a (x) ponzi / (x) pyramid / ( ) ___________ scheme
(x) A known (x) scammer / (x) person with poor reputation is involved with your project
(x) Why should we have to trust you and your servers?
(x) Incompatibility with open source or open source licenses
(x) Feel-good measures do nothing to solve the problem
(x) Extraordinary claims require extraordinary evidence (aka “Proof or GTFO”)
(x) I don’t trust YOU with the money

Furthermore, this is what I think about you:
(x) Sorry dude, but I don't think it would work.
(x) This is a stupid idea, and you're a stupid person for suggesting it.
(x) You’re a scammer and you should feel bad.



Bitcoin Bullshit Tier
You are advertising a new Bitcoin / crypto related project. Based on the information provided, you have reached the Bullshit Tier of 4 for the following reasons:

Bitcoin Bullshit Tier 1 - marketing babble, technology misunderstanding
(x) “Blockchain”
(x) “As good as / better than Bitcoin”
(x) Misunderstanding the technology

Bitcoin Bullshit Tier 2 - willful misinformation, bait and switch
(x) Selling overpriced / underperforming hardware or software
(x) Claiming your project can accomplish something hard without a clear explanation of how to do so

Bitcoin Bullshit Tier 3 - Many red flags
(x) Assuring your product is legal
(x) Speaking about profits / return on investment
(x) Providing no company contact information
(x) Multiplying coins
(x) Rebooting the blockchain
(x) Company being hosted in hard to reach countries
(x) Claiming your product services / is available at a large amount of institutions without a proof

Bitcoin Bullshit Tier 4 - Outright scams
(x) High return on investment
(x) Describing a financial security and claiming it’s not a security

Monday, June 27, 2016

A retrospective on one hundred posts

A retrospective on one hundred posts

Last week marked a 100th post I have posted on this blog since about 2.5 years I've been blogging somewhat regularly. Today I would like to take a look back and do a bit of a retrospective on some things posted and an overall state of the blog.

General thoughts


Like most people, I get a lot of ideas on various subjects all of the time. Some are so-so, while others merit more contemplation. This is one of the reasons why I started writing this blog - to be able to formulate my thoughts, put them down somewhere and to be able to reference them later as needed - during online conversations, or when writing out other ideas.

It has really been a useful tool for me over the years - before I started writing the blog I would discuss some interesting ideas I had either without writing them down, or in random places over the Internet where I couldn't easily find them afterwards. This would usually mean I couldn't go into that much depth and the thoughts were more ephemeral.

A few months ago I was looking for some post on my blog and I stumbled upon the post about volatile currencies I have completely forgotten about at that point. It's perhaps not the most relevant or best written post out there, but it still contains an interesting idea nugget that might be a useful reference in the future. If I relied only on my memory, it would be gone.

With that in mind, lets look at some popular or interesting posts I have written over the years that you might've missed.

Top ten


Here are the ten most popular posts from this blog, based on the number of views:

  1. On the subject of altcoins - do altcoins have any merit to exist?
  2. On /r/Bitcoin moderation - three years in review - /r/Bitcoin moderation
  3. Deniable proof of Satoshi - talking about Craig Wright's claim to being Satoshi and how future claims should be handled
  4. Liquid - when sidechains say "fuck it" - pondering the Liquid network
  5. Bitcoin historical rallies, halvenings and bubbles - talking about my experience with past bubbles
  6. Why fast maturing altcoins are doomed to fail, or why $30 dollars a day is not enough to secure Quarkcoin - discussing Quarkcoin and its reward schedule
  7. A killer feature for wallets and exchanges - an idea about how exchanges could help grow the value of Bitcoin
  8. How to kill a currency - how could one go about destroying a cryptocurrency
  9. Crypto 2.0 systems - comparing various Crypto 2.0 systems
  10. Mining versus Consensus algorithms in Crypto 2.0 systems - the consensus algorithm and its impacts on a cryptocurrency

Generally, not a bad cross-section of the blog - talking about Crypto 2.0s a number of times, criticising some projects that have some objectionable features, talking about some ideas I still wait to be implemented, etc. Some information is starting to get a bit outdated (I would've expanded the good list to include projects like Ethereum), but overall I can't complain.

Other good posts


The above posts got the most views. However, there are some other posts that I'm proud of. Maybe they got unlucky when they got posted, or the ideas presented are rather niche, but they might be still worth checking out:


Conclusions


Thank you everyone for sticking with me for the one hundred posts. If you find your mind similarly teeming with ideas, my advise to you would be to put them to writing. You may never know when your past self will surprise you with interesting thoughts that would otherwise flee.

Monday, May 30, 2016

Tau-Chain - a programmer's perspective

EDIT:

After speaking to Ohad Asor, the creator of Tau, about the below piece, it's apparently "blatant obvious nonsense about things [I] don't understand" and "the contradictions are all around. just like eth". The Tau presale was apparently also meant for "only well informed buyers", "i have morals. im not ethereum!".

So yeah, the Tau project is not for mere mortals like myself, and the spam and promotional videos are meant for intellectual elites that will then buy the exclusive tokens. The project looks much better suited for some high-end computer science academia really, but no, token presale is the way to go.

Remember - the Tau is not for you, stupid.

END OF EDIT

Living in the Bitcoin land, you never know what you might come across next. It could be as benign as someone issuing a currency backed by pre-1965 silver US dimes, as geeky as someone creating a blockchain to mine for prime numbers, or it could be as convoluted as BitShares with the many iterations it had over the years (as someone put it - "BitSharesX - An Alt Coin That Is Impossible To Understand"). Over the last few months, I've been seeing a lot of spam about Tau-Chain, along with its many extravagant claims, and figured it might be interesting to try to understand it.

Disclaimer - the project appears to be delving really deep into the theoretical computer science that almost borders on philosophy. While I do have a masters degree in computer science, I can't claim I fully understand some of the topics Tau-Chain touches on or their implications. I will instead focus on more practical aspect of Tau and how it presents itself as a piece of software with practical use.

What is Tau-Chain?


So, what is Tau-Chain? Well, it's quite simple, just look at this graph from the founder of Tau:

A simple explanation of Tau-Chain...

Okay, it's not simple at all. This graph represents what sort of confusing things we're dealing with here...

From what I gathered looking at the project's website, its whitepaper, roadmap, some articles on it, listening to a LTB interview, viewing some other resources and talking briefly to the founder of Tau-Chain, I think we are dealing with two components here - Tau and Tau-Chain. Unfortunately, it seems the people involved in the project like to use those terms interchangeably and confuse everyone further.

Tau appears to be a new programming language, apparently similar to Idris. Unlike most traditional languages most programmers deal with on a daily basis, it is not turing-complete. Instead, it is a decidable programming language. What this means is that it avoids the halting problem, while still being able to do anything a finite turing machine can do. Since in practice we don't have infinite turing machines, from what I understand it should be able to do anything a turing-complete language could do. Apparently, this approach might be more secure. On top of that, Tau "has built-in P2P and blockchain".

Tau-Chain on the other hand, appears to be a sidechain-enabled blockchain that can run the Tau language. It seems to be similar to Ethereum with its contracts - both have a growing library of code embedded in it that anyone can call upon to build their code on. As I understand however, Ethereum's code can be more risky to use as you might not always be able to predict what the contract might do without its source code at hand, while Tau the language is more predictable in its execution?

The project also appears to have another component to it - the Agoras. As far as I can tell, they seem to be smart oracles that can execute various contracts and other Tau code. They appear to be able to interact with the Tau-Chain, as well as with one another directly. All in all, they remind me a lot of Codius, especially if you consider that that project aimed to be able to prove what code is being executed and so on. Not a bad feature, but there doesn't appear to be much new to talk about there.

What Tau-Chain promises


While initially researching Tau-Chain, one will stumble upon their promotional video:

Tau-Chain, solving all of your software development problems apparently...

Which lists a few outlandish claims about what Tau / Tau-Chain can deliver:

  • Software that always does what it is supposed to
  • No more bugs
  • Automatic requirement validation by the Tau client
  • It is impossible to write code that doesn't work
  • Thanks to Tau, the client doesn't need to trust the coder and vice versa
  • The payment for developing code is automatically paid when the code is verified by the Tau network
  • The Tau blockchain stores social norms, scientific theories, "whatever is based on facts and rules" (one example flashing in the video is "Once you start to eat you should never leave spoon, fork or knife on the table. Their place is on the plate.")
  • Tau-Chain code is reusable
  • Tau is a database of provably working code snippets
  • You can use the Tau-Chain to build search engines, social networks, market places
  • You can develop provable smart contracts on the Tau-Chain

As a software developer, I would take all of that with a huge grain of salt. Then again, it might be my turing-complete attitude talking and things might be different in the decidable language space. If this video was talking about traditional software languages, I would put my money on the video being about test-driven development - an approach to software development that starts with test cases (what the code should and should not do), and then developing the code to fulfil those tests. In theory this could mean that the software has no more bugs, it does what it is supposed to and can be verified automatically when new code is checked in. So while it would fulfil most of the listed requirements, in practice I would not expect it to be *the* solution to all problems - writing good test cases can be as hard and time consuming as writing good code, and I doubt 99% of the clients purchasing software would be able to use that. If the test cases aren't sufficiently complex, we might run into the problem of software being built just to tick the checkboxes and not much else. After all, any program operating on a sufficiently small domain could be replaced by a lookup table...

I am also very sceptical of how the software will decide what are the stored facts and how those will be handled and proven. Even more so when we're talking about "facts" about the real world and social norms. How do you prove you should not put used forks on the table, from a software perspective? How do you handle a problem having multiple contradictory answers (an infinite sum of (1-1+1-1...) can be proven to equal 0, 1, 0.5, -0.5, etc...)?

Some other claims I stumbled upon from other sources (1, 2, 3):
  • Tau client's behaviour is dictated on-chain, with the chain being able to hard-fork itself
  • Tau (-Chain?) has no rules at all, its users will set its behaviour
  • Tau does not need a coin, but it has a token presale anyway
  • "Tau network will be able to download virtually the whole internet, practically giving everyone the same information Google has, and more: data can be queried and processed more meaningfully and collaboratively, so you could perform queries as you like."

While there are more claims, lets just limit ourselves to those few (a lot more can be found in the LTB interview).

The Tau / Tau-Chain's feature of embedding how the network operates in the blocks themselves is rather unique feature as far as blockchains go, but at the same time it can be one of the more dangerous thing out there. It certainly offers the network more apparent freedom from Bitcoin-like hardfork stalemate, although in reality Bitcoin's hardfork problems are never about the code being hard to change, but about the people you need to convince. It might also impair some thin clients if they are applicable to the chain (how can you just run the chain from a given length if you don't know what the rules are from all of the previous blocks?). The definition of who the "users" in the system are (one-vote-per-person / machine / CPU?), as well as what the rules for hard-forks will be will probably shape the network very drastically early on. I wonder whether anyone will try to change the code of how the blocks are executed to "stop execution, return 0"...

The token presale doesn't appear to be anything new in the crypto world - it's the paradox of presales all over again. Tau the language and network doesn't need a new coin, it would probably operate better without it, but the developers need money to develop the language / network, so they sell tokens to speculators. Looks to me like another Bob Surplus-esque coin looking for a problem.

As for the last claim, and a few similar marketing blurbs, I think they deserve a section all of their own...

False equivalence, false dichotomy, eating your own dog food


The quote about basically being able to replace Google appears to be a false equivalence fallacy. There are many problems with trying to say you can basically be like Google:
  • I very much doubt the network could handle about 10 exabytes of data
  • Being able to efficiently categorize all of that data requires very smart algorithms and a lot of data. You can't even begin figuring some of the things out without having efficient access to enormous data sets. For example, how would you figure out a search for "high contrast pictures of fruit floating threateningly in the night" (thanks Reddit)?
  • Google is as much about the data (what the websites contain), as much as it is about the metadata (what the people are searching for and what they are clicking). Having just one part of that might not give you the full picture
  • Without having most of the data at hand, it is impossible to know if you returned most of the searched data. While you might be able to make queries based on the data you do know, you can never know how much you don't know
  • It is also impossible to prove that real-world data is correct. Since Tau-Chain is focused on storing "whatever is based on facts and rules", how would you be able to know, say, what is the weather outside right now? Sure, you can have a lot of data points, but you can't prove they are true or made up

All in all, statements like that are just red flags if someone also asks you for money. At best, they are marketing superlatives. So while sure, if we're talking about Tau the language, someone might use it to implement a Google-like service with it and so on, but the same could be said about computers based on cogs and wheels (after all, any turing machine is equivalent to another). All in all - false equivalence - your software is not even comparable to Google.

Now, lets finish this discussion with a subtle false dichotomy. I stumbled upon this marketing blurb about Tau from some of the spam I see pasted in a few chats I visit:


It compares how Tau-Chain is different from Ethereum, and links to a blog post by Peter Vessenes criticising how buggy some of the Ethereum smart contracts can be. He makes a lot of valid points - since you can't upgrade and fix the contract code post-launch, you either need a good failsafe, or write perfect code not to lose people's money. However, what I take slight annoyance with, is how this sort of marketing might misrepresent the situation - "Tau is different from Ethereum, here are a few reasons why. Here is someone criticising Ethereum (while not talking about Tau)", implying that since Tau was not criticised and it is presented as Ethereum's competitor, it somehow doesn't have those flaws. No Tau, criticism of your competitor does not mean you don't / won't have those problems yourself.

Lastly, I find it really amusing that Tau apparently doesn't like the taste of its own dog food - for all of its criticism of turing-complete languages, saying how Tau is a much better language and all of that, in the end they develop their code in C++. I did bring this point up to Tau's creator and he made valid points as to why that is - they want to develop the software in an efficient language to make it operate efficiently and in the future they might implement Tau-Chain in Tau. Understandably, software development takes a lot of resources and time, and you want to release early, release often, but this somehow doesn't fill me with confidence that Tau will be usable for any commercial-grade software any time soon...

Conclusions


While Tau appears to be an interesting development of a new programming language and its creator certainly sounds very knowledgeable in his field, Tau-Chain looks like a project looking for a problem. Bootstrapping a new token to run a blockchain to use a new programming language for smart contracts that don't halt seems like a very complicated way of reinventing everything just because you want to change a few things. I am highly sceptical of how the network will handle everything it promises, especially when it comes to dealing with things in the real world. It could be as mundane as a different flavour of Ethereum with a non-turing complete language, some smart oracles, etc., or something potentially new - only time will tell. Until Tau-Chain is released, I remain unconvinced.

Amusingly enough, the Tau-Chain video contains an Escher-like perpetual motion water mill at 1:40. I wonder if this is telling that the project is trying to invent something impossible?

Monday, January 4, 2016

Positive and negative proofs in blockchain audits

Positive and negative proofs in blockchain audits

As the old logical fallacy goes - you can't prove a negative, and absence of evidence is not evidence of absence. While for a long time this might've been true in various financial audits - you could only prove that some invoice existed, not that there were no invoices you missed - thanks to the blockchain technology things might change in the near future.

Positive vs negative proof


In general, we use positive proofs a lot in our everyday lives and in business. To create a positive proof, we only need to show that something exist - show an invoice of a transaction, a recording of a conversation, etc. Even in the Bitcoin Genesis Block Satoshi used a positive proof - a quote from The Times to prove that the Block could not have been created before 2009-01-03.

Negative proofs, while applicable in mathematics and some other cases, are often used in logical fallacies. If your goal is to prove for example, that there are no mice in the attic. You can easily disprove that theory with a positive proof if you find a single mouse there. However, searching the attic and not finding anything only proved that you have no evidence there are mice there, not that you had a proof there were no mice there. A subtle, but important difference.

Proofs on the blockchain


As in most cases, it is easy to create a positive proof on a blockchain. Point to a transaction paying for a particular invoice, if it is included in a block with 6+ confirmations, it's all you need.

Now, what if instead we are being audited and we have to produce an exhaustive list of all transactions we sent and received? It is possible, but we would have to do some preparations beforehand.

Cryptographic audit on the blockchain


First of all, we need to establish some way of uniquely declaring some data, saying "I am X and this is a message coming from me: ...". If we had something like government-issued unique digital signatures, that would be good enough. Alternatively, we could rely on some less infallible methods - notarized letters, tweets from some official handles, posting information on our website for everyone to see, perhaps sending the information to our competitors (if we try to lie about something, they would benefit from calling us out). Once we can prove that we as the person or a corporation were the authors of any given message, we can use cryptographic digests to prove any piece of data is coming from us, and coupled with embedding messages into the Bitcoin blockchain for timestamping (directly, or through Factom for example), we can create tight time bounds on when the data was created.

Why do we need all of this? Well, depending on how we use the blockchain, we will need to be able to create timestamped commits / anchors that we have to prove came from us.

If we only use one address on a public blockchain for all of our transactions, we have to commit to that address early on through the above scheme - "I am X, and I will be using the address 1PiachuEVn6sh52Ez7o6Fymvw54qvQ4RBm".

If we use multiple addresses on a public blockchain, it would be best if all of those addresses were derived from a single address in some predictable fashion. For example, we could use split-key address generation, multiplying the base private key by a sequential list of integers. This way, we can easily disclose the public key of the seed and allow any auditor to derive all of the other public keys, while still keeping our private keys safe. This way we only need to declare one address early on to create a full proof for the audit.

If the blockchain we are using is private, whether it is used only by us internally or by multiple parties, it would need to be anchored into the Bitcoin blockchain periodically to prove it wasn't altered in any way (Factom does this for example). Once we have that, we would also need a complete copy of the blockchain (or at least the relevant slice between two anchors) as part of the audit. If it is our internal blockchain, it would be analysed in whole, if it is shared - we would need to indicate which parts we used just like in the public blockchain scenarios.

Having gone through all of that effort, we can finally create our final data compilation for our audit, consisting of:

  • The entire block history in the slice of time we are analysing (say, all of 2010)
  • Whatever else is needed to prove the block history was unaltered. This can come in block header chain up to the newest Bitcoin block, simplified-payment-verification-esque branches of anchor transactions included in blocks, etc
  • Our original commits to the addresses we would use (if applicable), along with the necessary proofs that we committed to them at the appropriate time
  • Any relevant metadata we wish to submit (descriptions of which transaction was for what, etc.)


Finally, we would have not only a cryptographically verifiable proof that all of the transactions took place, but also have irrefutable proof of the time frame they took place in (we couldn't forge a few extra transactions from last year after the fact) and be able to prove that we didn't omit any piece of data - creating a negative proof.

The last one is possible because the records we are dealing with are cryptographically sealed (we can't alter the blockchain without invalidating its future, which would be evident), but also public and finite (we CAN iterate over every block and every transaction and check whether it is relevant to the audit or not). This way we not only provide every relevant transaction, but prove there are no relevant transactions we didn't provide.

Conclusions


Thanks to the advent of cryptography and blockchain technology with atomic, countable transactions, it is now possible to create an undeniable cryptographic provable complete audits. Hopefully this will help us avoid more audit fraud cases in the future...

Tuesday, November 17, 2015

Sample bankchain feature set

Sample bankchain feature set

In the recent months, many banks and other financial institutions started looking into the blockchain technology as a potential improvement on their current architecture. Below is a sample feature set of the cryptocurrency technologies that can be used to reimplement and possibly improve upon the banking system as it is today.

Transactions


In all cryptocurrency systems, transactions are the most basic building block of the value transfer network. They have a few important features, including:

  • Atomic nature - a transaction can either succeed fully, or fail completely. There is no middle-ground that wasn’t specified beforehand (for example, Ripple’s partial payment flag). It is even possible to have complex transactions that hop across multiple currencies that are still atomic. 
  • Self-contained - a transaction in most cases provides all the information that is needed to verify whether it is valid or not. It specifies exactly which money it is spending, quite often how much money is left, as well as contains a digital signature authorizing the move of funds. 
  • Undisputable ordering - once transactions are included in a block, their ordering is undisputable. This allows everyone to be able to verify exactly what state the system was before and after the transaction was applied. There is no data discrepancy between the participating institutions as to what happened without the need to resort to a centralized authority. 
  • Cryptographic authorization - in the crypto world, there is never a doubt whether someone is authorized to spend the money. Either they own the private keys and can authorize the payments, or they don’t. Moreover, each signature is only valid for a given transaction, so a few authorization problems are mitigated (replay attack, man-in-the-middle, etc.). 
  • Easy multi-party escrow - also known as multisig. This allows money to be held by multiple parties in such a way so as to only be spendable when a minimum threshold of parties agrees to spend them. 

Currencies


In the cryptocurrency space, there are essentially three types of currencies.

The most prevalent is a native crypto currency or a digital token. Those are currencies issued by decentralized autonomous organizations, either in the form of complete crypto-networks (like Bitcoin, Litecoin, etc.), or autonomous smart contracts. Those tokens are usually perfectly, mathematically scarce, have a predictable minting schedule and a clear set of rules on how to transact in them. However, due to their decentralized nature, they don’t represent real-world assets very well.

The second kind are derivative currencies (such as BitUSD), which are still created and maintained in a decentralized fashion (without a central or collective counterparty), but through known financial contracts (futures, contracts for difference) can track the value of real-world assets and currencies. Their counterparty risk takes the form of the financial derivative market.

The third kind are IOUs, digital currencies issued by centralized or collective parties usually backed by real-world assets and currencies (such as SnapSwap.USD, BitStamp.BTC, etc). While they are subject to counterparty risk, they have an advantage over the derivative currencies by most often being easily redeemable in kind from the issuer.

Different cryptographic systems have different requirements when it comes to those currencies. A decentralized network will have to have at least the native digital token to avoid spam attacks at the very least. Having that currency, they can also incorporate the remaining two as needed (see BitShares and Ripple for an example). Permissioned blockchains don’t need a native digital token, as the network participants are known entities and can be made liable in case they intentionally disrupt the network. As such, it makes a lot more sense for those networks to mainly feature digital IOUs.

IOU issuers


IOUs in a cryptocurrency network can be a powerful tool. They are useful for not only tracking the value of real-world assets, but also for tracking the trust associated with the currency issuer. If 1 USD from Bank A trades for 1.02 USD from Bank B, we can infer that A is more trusted than B.

When talking about IOUs, there are generally two models that can arise in a system - a web-of-trust or a gateway model (with the real-world examples usually being a mix of the two). In the first model all parties trust one or more parties in the web and money flow is rippling through the system between parties (this is a basis for old version of Ripple). In the gateway model, we have a few central authorities everyone relies on to securely issue and redeem the IOUs everyone else uses (this is a basis for the new version of Ripple). The latter approach might be more useful when there are different classes of peers on the network (governments vs big banks vs small banks vs credit unions, etc.), but the former is useful compliment for smaller-value settlement between the same classes of peers.

IOUs inherently track debt between parties (if you have 1USD IOU from me, it means I owe you 1 USD). In systems like Ripple it is also paired with another variable - trust. Trust limits the amount of IOUs / debt one is willing to take from another individual. This can be especially useful if say, two banks established a mutual trust between one another to simplify payments or reduce their costs. They might agree for example to extend $1M line of credit between one another and use that channel for settlement for any payments made between their accounts. If the credit limit is ever reached, they can still settle with potentially more expensive IOUs from a gateway (say, a government), or settle the debt in some other way and resume operating with the cheaper IOUs.

Decentralized exchange


Having a number of currencies issued on a decentralized network opens up a lot of possibilities. Most useful one perhaps being a decentralized exchange allowing trading between any currency pair. With an open market accessible to all peers, one could expect to drive the spread for performing FX trades to spot, even for small value transactions. Having that, one could expect to start seeing the Singularity of Money going into effect, where the currency you own would not matter as much as the value of that currency. Multi-currency hops would allow one to route money through the most efficient market in the web of value allowing for easy bootstrapping of new remittance platforms and applications.

KYC


An important aspect to consider while designing a crypto network is how it can comply with KYC regulations. While decentralized networks such as Bitcoin are focused on fostering strong pseudonimity, permissioned blockchain users in most cases would be interested in dealing only with known parties. This can be achieved by either having all entities in the system known and explicitly recognized, or having a more open system but with each peer being responsible for doing their own KYC.

The first is a model that seems the most popular with private permissioned blockchains such as MultiChain, where the creators of the system explicitly have to grant read and write permissions to every network participant (thus giving them an opportunity and potentially a responsibility to perform the KYC on everyone).

The latter model is more popular on public blockchains that allow permissioned access, such as Ripple. There, every gateway can explicitly either blacklist addresses to prevent them from using the IOUs they created, or create a whitelist of only the addresses that can send and receive the IOUs.

Block encapsulation


One of the more important differences between a database-based approach and a blockchain-based approach for processing transaction is the idea of encapsulating transactions in blocks. A blockchain, whether it is permissioned or public, has a few key advantages:
  • Order of transactions is strict - there is no doubt which transaction is to be applied first and at what time. This addresses the problem of race conditions and can be used to address the problem of frontrunning in a system without a central authority. 
  • History is immutable - since all blocks in a blockchain refer to a previous block’s hash, it is impossible to alter any record of what blocks and transactions took place in the past without rewriting it entirely. Paired with real-time anchoring of block hashes into a public immutable ledger such as Bitcoin ensures that any block forks would be evident and would have to be accounted for. 
  • Provable auditability - knowing only the latest block hash (which is a small digest in comparison to the actual size of the blockchain), one can not only audit the entire history of the blockchain, but the auditee can probably for the first time in history provide a positive proof that they disclosed all the data for the audit. Any records that are missing or have been altered will come up in a proper audit. 
  • Everyone can be sure they have all the data - if one is at the blockchain head, they know they have or can fetch all historical data. There is no doubt whether some chunk of data is missing or not. 

That being said, blockchains are not a silver bullet. They come with their own weaknesses:

  • Blocks are slower than individual transactions - while a transaction can be committed to a database within a few read/write cycles, a block takes awhile to be created and propagated. The fastest blockchains out there achieve about a block per 1-5 seconds. While each block can contain many transactions to possibly reach the required throughput, those transactions can only come in discrete quantas, not a constant stream (as they say, “Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.”). 
  • Performance-wise, a blockchain will probably have a higher transaction overhead than an optimized database. There are a few possible reasons for this - the fact that in the end transactions from a block will have to be committed to a database anyway, the overhead of synchronizing the network and resolving forks, or the relative age of Bitcoin technology (7 years) vs say, SQL (about 40 years). 
  • Currently, there are many blockchain-based cryptocurrency solutions out there, but there are also cryptocurrency networks out there that don’t rely on blockchains, such as Open Transactions. The latter relies on having a few notaries verifying transactions in real time and providing cryptographic receipts for those transactions. It is an interesting approach that allows anyone to prove their balance by merely presenting the last receipt without having to hold onto any prior history.

Tiered blockchains and bandwidth reduction


As it became evident in the Bitcoin world, blockchains can become vulnerable with increased network activity. As such, a modern blockchain solution for high-transaction-volume environment should be prepared to address the bandwidth issue before it might become a problem.

There are a few possible approaches one can take - settle transactions off-blockchain (like the Lightning Network), create a separate permissioned blockchain (like Liquid), or create sidechains (like Credits or what Blocksteam initially wanted to create). Out of those three, sidechains appear to be the more ideal solution - allowing one to move value on and off the main blockchain, transact on that blockchain with the transactions being cryptographically linkable to the main chain (through anchors), and not rely on more centralized third parties.

As such, it might be feasible to construct a tiered blockchain that would be able to offload a good amount of transaction volume off the main chain while still allowing settlement between tiers. At the top of the chain we would perhaps have a public blockchain where the highest-tier peers would issue their IOUs - governments, biggest banks, etc. Below that, we would have sidechains maintained by various banks and other financial institutions. This would allow them to perform more internal transaction without cluttering up the main chain. If needed, more sub-sidechains could also be introduced to further increase transaction throughput. One could also perform sidechain-to-sidechain transactions through a dedicated protocol (such as what Interledger is proposing).

It would be useful for the top of the chain to be a public blockchain as it would allow more institutions and possibly even governments to join and integrate directly with it.

Sample network graph of a tiered blockchain:








Proof of Solvency


One very interesting concept that emerged from the Bitcoin world is so called “proof of solvency”. It allows institutions such as exchanges or gateways create a positive proof that they own a certain amount of currency and that their liabilities are no greater than their currency reserves. Depending on the system in question, the proofs can be either be complete (proving beyond a shadow of a doubt both the assets and the liabilities) or disprovable (one can present undeniable evidence that the institution is lying).

The first scenario is mainly applicable for completely open ledgers - in most cases, only cryptocurrencies and Crypto 2.0s. For example, BTC2Ripple can prove both that they own a certain amount of bitcoins AND the level of their outstanding liabilities on the Ripple network. Since both networks are open, the transaction can be verified to be true or false at any given time.

The second scenario applies whenever we’re dealing with either closed networks, or networks that don’t provide cryptographically signed proofs. This includes exchange’s private databases and bank statements (barring something like TLSNotary). In this case, we either have to rely on some signed documents or PDFs supplied by the banks about the account balances, or generate a merkle tree of all account balances on an exchange. An exchange cannot prove that the information is complete, but anyone can prove the data is invalid if they find their account balance either omitted or altered.

As such, Proof of Solvency can be an important tool for financial audits, allowing them to be performed at any time without disrupting the normal business operations. Some institutions might even opt for continuous proof - updating the required information in real time to bolster confidence in their business.

Proof of Solvency might be fairly straightforward in the above proposed tiered blockchain. Any balance in a sidechain should equal to the amount of assets held at the higher-level chain. The top-level chain would have clear balances of who has how many assets and liabilities.

Voting Pools and auditing competitors


Voting Pools are an interesting idea for keeping everyone honest. In this approach, we have multiple parties vouching for one another’s solvability and being liable for bailouts in case one of the parties goes under. For example, we could have multiple exchanges forming a voting pool and keeping their bitcoins in multisig addresses such that even if one of them turned rogue, they couldn’t defraud their customers nor turn insolvent. This is made possible with continuous proof of solvency, as explained above.

Voting Pools could also be useful for having multiple institutions creating IOUs backed by all of them. These could include:

  • The Euro currency, issued by the joint agreement between multiple EU countries 
  • International Special Drawing Rights issued by the International Monetary Fund 
  • Fiat IOUs backed by multiple banks 

While Voting Pools are the most efficient in a network based on native cryptocurrencies such as Bitcoin, the concept might also be used in permissioned blockchains.

Smart contracts


The final catch-all solution for everything one couldn’t predict while designing the system. Smart contracts are flexible programs that live on the blockchain and can execute commands based on the state of the network. Coupled with smart oracles, the contracts allow for creation of such projects like a decentralized prediction market.

Conclusions



There are many practical applications of the blockchain technology for banks and other financial institutions. Failing to embrace the new technology might make the old network obsolete. The above are only some of the examples of what can be achieved and it is very likely we will see a lot more innovation in the following years. Even from those building blocks we can construct innovative technologies (such as self-regulating universal basic income).

Monday, November 9, 2015

Sidechains for bankchains

After talking about sidechains as an important feature for reimplementing the cyrptocurrency landscape and criticising Liquid for not living up to its full potential, I had some idea about a new area where sidechains could play an important role - in the permissioned ledger landscape for the banking industry.

A quick recap


While there is some debate as to what are the essential properties of sidechains, I usually go by the definition of "a sidechain is a blockchain with a distributed two-way pegged currency from other blockchains". Generally, something like Credits or BitBasket is aiming to do, but not what Liquid is currently offering.

Sidechains are useful as they:

  • Move some transaction volume off the main blockchain
  • Allow extra functionality on the sidechain not available on the main network
  • Allow the transfer of value back onto the main chain without the use of centralized or decentralized third parties


A permissioned ledger is a centralized or decentralized (but not distributed) blockchain ran by one or more parties where the access to the network or various functions on it is gated to only the approved parties. Here an some overview of how the technology compares to traditional, distributed databases.

A permissioned sidechain


If we relax the definition of a sidechain to include any currency (crypto-native, IOU, etc.) on any network (centralized, decentralized, distributed), we can create an interesting sidechain-bankchain combination that would be useful for an international settlement system.

The reason why we'd like to utilize a model like this would be to allow nations and big international organizations to:


  • Settle between one another on a global network
  • Have autonomy over their national / corporation networks
  • Allow for private settlement networks to operate, while still allowing for proof of solvency audits on the main network
  • Compartmentalize regional transactions from trans-regional tranasctions for speed and network throughput while still allowing for easy interoperability and global settlement




Tiered sidechain


If the above system was put into place, we probably would see a lot of companies big and small want to get onto the network. If the system would be anything like the current banking system, it would be unlikely that everyone would have the capital or meet other arbitrary requirements to connect directly to the main chain. However, there is nothing stopping us from designing the system with that in mind and perhaps having side-side chains - the biggest companies would connect directly to the main chain, while the smaller companies could connect to them and so on. This way we could have everyone on the same network while separating the peers on the network based on their size and needs (for better or for worse).


Lastly, we could add inter-chain settlement protocols like something Interledger is proposing. This would allow for direct connections between various sidechains without the need of going directly to the top level chain to increase throughput and decrease cost.

Tying it together - how would it work?


Now that we have some overview of how the network might be structured, lets explore a few ways it could work.

The top, global chain would be best served as either a multi-party permissioned ledger (like Eris or Multichain), or a distributed network (like Ethereum or Ripple). This way more participants are likely to join without seeing this as "the USA network" or "the Eurozone network" if it was a more centralized solution developed and controlled by one nation or company.

Ideally, the top chain would be where the various governments and big entities would track their debt / IOUs. This would give a clear insight into who owes who how much and allow lower-tiered chains to use that as base monetary system.

Lower-tiered chains would probably be either permissioned or completely centralized blockchains or other cryptograhy-based networks (like Open Transactions). They would be linked with the main chain through a two-way peg. This would allow for easy settlement between the sidechain and the main chain without completely relying on the chain custodian to forward all of the transactions back and forth by themselves.

The sidechains could also follow some safety mechanisms of the voting pools - being constantly audited for solvency and allowing anyone with a balance on the sidechain to redeem their underlying balance on the main chain according to the protocol.

If you wanted to connect to the network, you could do so by connecting to any of the existing peers on the network - usually some bank or corporation. After that one integration, it would be possible to send money to anyone else on the network easily (and hopefully cheaply).

Is this a good idea?


At the moment, I'm not sure how much of this idea would be useful when implemented in the real world. It seems that a lot of banks and institutions are interested in the blockchain technology, the concept of sidechains is a good way of segmenting the network transactions. Moreover, the entire idea seems similar enough to the way things work nowadays that it might be attractive to the companies from "the old world". That being said, I'm not sure if there are some hidden complexities in the proposed solution that would impair it in some way - a lot of the technologies mentioned are either still in development or are still in the conception phase. So for now I would categorize this as "an idea worth considering" and see where things might go from here.

Related links: