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

2017-01-30

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...

2016-07-26

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

2016-01-04

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...

2015-11-17

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).

2015-11-09

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:




2015-10-05

Blockchain for banks - an overview

As discussed before, the banking world appears to be looking into the blockchain space with companies like Digital Asset Holdings or R3 CEV gaining some momentum. However, a lot of people seem to see the blockchain as a silver bullet to solve a number of unspecified problems for the banking industry. Today, I would like to share with you a possible overview of how a blockchain-powered banking system might work using both public and permissioned blockchains.

Identifying the problem


There are many different needs that both the banks and their customers have. A commercial bank will have different priorities from a retail bank, and they both will have different priorities from an investment bank. The blockchain technology is very well suited for settlement between parties. More complicated functionality can be either accomplished by a more focused technology like Open Transactions or more general smart contracts available for example on Ethereum. We will mainly focus on the settlement problem in this post, but will mention other issues as they fit in.

Is blockchain the way to go?


A blockchain is a very specialized tool. As discussed before, it is similar to a database, with a few notable differences. Performance-wise, blockchains might not be as efficient as centralized or distributed databases, but what they lack in performance they make up in other areas for some projects.

A blockchain enables accountability. A public blockchain like Bitcoin is a publicly verifiable, unalterable record of history. A permissioned blockchain may still be subject to forging of records if it is kept completely private, but if it is shared with an independent auditor or a digest of the records are anchored in projects like Factom, they can also be provably unalterable.

A blockchain is also a good way of reaching distributed consensus if the involved parties don't trust one another, say for international bank settlement between Russia and USA. If all parties run on the same protocol with conflict resolution, there is no doubt which transactions came through and in what order for example.

On the flip side, depending on the technology used, the blockchain might have lower transaction throughput than a dedicated, centralized server / database. At the moment the fastest ledgers update in 2-5 second intervals (in case of Ripple). To go faster, one would need to use ledgerless technology, such as Open Transactions.

Public versus permissioned blockchains


When we have identified which problem to solve and believe using the blockchain is the way to go, we should consider whether to use public or permissioned blockchains to help us achieve our goal. Pretty much everything that can be done on a public blockchain can be also achieved on a permissioned blockchain. Bitcoin and coloured coins act similarly to MultiChain. Ethereum can be approximated by Eris, and Ripple - by Hyperledger. Worst case scenario, most crypto projects can be forked from their open source repositories and modified to suit the particular needs.

Since the permissioned blockchain is handled by known, controlled servers, it can be pushed to achieve higher performance than a public blockchain by using higher-end hardware and network capabilities. Similarly, the more controlled environment is not at a whim of spammers, transaction fee fluctuation or any external forces.

That being said, a permissioned blockchain in many cases is a walled garden barring entry to a lot of possible innovators. While this can be useful for protecting sensitive information, you can also miss out on the network effect from using the public blockchain. It's just like the internet and the intra-net - both have their uses and drawbacks.

For a lot of applications, it might make sense to either be completely on a public blockchain, or at the very least operate on both the public and permissioned blockchains at the same time. For example, if SEPA operated its own permissioned blockchain to offer settlement between all the European banks, it could also offer similar services on a public blockchain for lower-frequency transactions and perhaps a bridge to connect between the blockchains. This way if someone decided to build, say, a settlement corridor between Europe and America, they could use the already available public blockchain without having to apply for a banking license to get access to the premissioned one. This would enable more innovation to take place on low-performance environment while keeping the core network performing very efficiently for high-volume transactions.

Just to note - a public blockchain does not mean everyone would be able to use the solution indiscriminately. Pretty much every blockchain offers some way of controlling who can access various currencies issued on it, either through the use of white- and blacklists or through multisignature. This means that the banks or governments can still follow with KYC and AML requirements, even if the blockchain is public for viewing.

Picking the right approach


As with most situations, there are many ways to approach a problem on a blockchain. For example, in order to do international settlement, one can issue fiat-denominated currencies, copy an existing FX market and use that for currency conversion, use an intermediary cryptocurrency like Bitcoin (an approach used by Abra for example), or perhaps create a smart contract to handle the trades. The number and kind of options will depend on your problem at hand and it's hard to generalize this point.