Friday, July 3, 2015

The Greek financial mess; and some ways Bitcoin might help

Many years of government debt buildup in Greece has ultimately resulted, in the last few days, in a political and financial maelstrom.  The political maelstrom includes demonstrations in the run up to a referendum on obscure debt-restructuring provisions to be held this Sunday (July 5th). This article focuses on  financial problems and some potential practical steps that can be taken to mitigate them. The imposition of capital controls is a disaster for a modern trade-driven economy, a catastrophe which however digital technology, and in particular the digital currency bitcoin (which given the Greek environment usually must involve direct use of the Bitcoin blockchain), has the potential to mitigate.  This article will explore some of the severe practical problems that capital controls are causing Greek individuals and businesses, and suggest some potential bitcoin solutions, many of which could also be applied to other countries with some similar financial problems and controls such as Argentina and Venezuela.  These aren't solutions that can be applied in time to help with the current 6 days of capital controls, but could substantially help some Greeks and some aspects of the Greek economy if some version of these controls is continued for months or years.

At root the Greek financial problem is that the Greek government has spent more, compared to the GDP generated by its economy, than the vast majority of other governments.  It has borrowed copious sums to do so, falling ever deeper into debt.  Here is its payment schedule:

And you thought your student loan debt was bad


The only place the Greek government has left to go for money to fund its ongoing expenditures and pay these debts is Greek banks.  Fearing capital controls and "haircuts" (government confiscation of certain fractions of bank deposits), many Greeks in recent months have, quite rationally, started withdrawing money out of their banks and sending it overseas.  More trusting Greeks kept their savings in their banks, with the result that, with the imposition of capital controls last Monday, they have been locked out of their savings, and plans for "haircuts" of 30% or more have been reported (If somebody lopped off 30% of your head, you’d have more than a haircut).

When capital controls were first rumored and then announced on Sunday, vast lines formed at ATMs as Greeks rushed to rescue what little of their life savings that they could:


ATM line, Thessaloniki


ATM line, Larissa City





On Tuesday, the Greek government defaulted on its scheduled debt payment to the International Monetary Fund (IMF).

Under capital controls, ATM withdrawals from Greek bank accounts are now limited to 60 euros a day.  Debit cards can still be used for payments within the country, but the money simply gets transferred from one frozen bank account to another.  As a result many businesses no longer accept debit cards, and many more are demanding a substantial premium price (in  at least one business, double) for debit cards (transferred bank balances) versus hard cash.  There is a growing shortage of such cash; as a result some stores are paying their suppliers in private "scrip", which can be used by the supplier's workers to purchase goods from the issuing store. (more on this below).

Use of credit and debit cards to pay out of the country is banned and effectively blocked, resulting in a near-complete freeze-out of Greeks from Internet commerce. This restriction, along with the controls resulting in Greeks being excluded from the pan-European money settlement system, means that Greek businesses can't pay for imports.  Many shipments into the country have been halted as a result. (The government plan is to create a whitelist of politically approved cases in which such payments for imports will be unblocked).

A crucial feature of store-issued scrip is that it literally circulates through a complete closed cycle: store --> supplier --> workers --> store.  Such specific cycles are a pattern that is commonly found when currencies are primitive or newly emerging, and every Bitcoin marketer and evangelist should be familiar with them.


The kula ring, two specific cycles (counter-circulating cycles of shell money) allowing exchange of seasonal goods in the precolonial South Pacific

It doesn’t help much to sell bitcoin to isolated individuals: as a mere store of value its volatility is much greater than most existing currencies; as an investment it only makes sense as a tiny high-risk fraction of one's portfolio.  Bitcoin does have some political-affinity and status value in developed countries; by contrast in many developing countries and in countries under financial crisis such as Greece, there are urgent needs bitcoin potentially can address.  In terms of these needs Bitcoin is mainly useful as a way to send money across borders for investment in more stable assets overseas, and to substitute for cash or other substitute currencies in a money-starved environment.

To have value as a medium of exchange, bitcoin must be taken up by a community of people who already frequently trade with each other,  and who have a strong need to use it in these trades. It is especially important to market to the links in the cycle that have the strongest negotiating leverage with the others (in the case of Greek the Greek store scrip cycle, the store and its larger suppliers).  The link in the cycle with the greatest incentives to switch to bitcoin here are likely the store's suppliers, because they don’t fully trust the store, nor the underlying currency, euro or post-euro, that is the “O” in an IOU, but are participating in the scrip because, sans bitcoin, they have no other choice.

In bitcoin specific cycles create other cost savings.  Almost everywhere they economize on the increasingly high KYC/AML (know your customer/anti-money-laundering) costs of going through a fiat-bitcoin exchange.  What's more, in a capital controls environment like Greece specific cycles avoid the capital controls that would be imposed on a Greek-based fiat-bitcoin exchange, and avoid the need nearly all Greek customers using out-of-country exchanges would have to futilely try to tap into their frozen bank accounts in order to purchase bitcoin. Bitcoin will not, contrary to some feverish news reporting, help Greeks get money out of their frozen bank accounts.

But bitcoin does have great potential to help in less obvious ways: for one thing, as a superior (not vulnerable to trust in an issuing store, and in any currency underlying an IOU) substitute for the emerging store scrips.  For another, it could help greatly with the severe cross-border commerce issues that are emerging.  Exporters, including freelancers working over the Internet, can bring bitcoin into the country, thereby avoiding earning wages that get deposited to frozen bank accounts (per Greek lore, be wary of a cave with many tracks coming in but few coming out). Importers can pay for goods with bitcoin while other electronic payment channels (European money settlements, Paypal, and credit & debit cards when paying foreign businesses, etc.) remain frozen. Again specific cycles must be set up: isolated marketing to just exporters or importers will be far less effective than organizing existing supply chains that involve both.

There are likely many other, mostly highly non-obvious, niches in which bitcoin, and other cryptocurrencies, and smart contract platforms could play a quite valuable role in capital-controlled and other financially handicapped countries.

Bitcoin is not easy to learn, either conceptually or in setting up businesses and individuals with the software (and preferably also the secure hardware) to accept it. This is especially the case in a capital controls climate where the traditional bitcoin exchanges and retail payment companies, with their consumer-friendly front ends, as they normally operate in developed countries, likely can't effectively operate. To take advantage of bitcoin many Greeks will have to use the Bitcoin blockchain directly. So it's too late for bitcoin to help much with the current 6 days of bank closure,  but once the learning curves have been surmounted, the participants in specific cycles educated, bitcoin has great potential to address likely many ongoing problems with capital control, in Greece as long as they continue in various forms, and in many other parts of the world where such financial restrictions designed for a pre-digital era have been imposed.

[Update: various minor edits: the first version was rather rough, sorry :-)]

Monday, May 25, 2015

Small-game fallacies

A small-game fallacy occurs when game theorists, economists, or others trying to apply game-theoretic or microeconomic techniques to real-world problems, posit a simple, and thus cognizable, interaction, under a very limited and precise set of rules, whereas real-world analogous situations take place within longer-term and vastly more complicated games with many more players: "the games of life".  Interactions between small games and large games infect most works of game theory, and much of microeconomics, often rendering such analyses useless or worse than useless as a guide for how the "players" will behave in real circumstances. These fallacies tend to be particularly egregious when "economic imperialists" try to apply the techniques of economics to domains beyond the traditional efficient-markets domain of economics, attempting to bring economic theory to bear to describe law, politics, security protocols, or a wide variety of other institutions that behave very differently from efficient markets. However as we shall see, small-game fallacies can sometimes arise even in the analysis of some very market-like institutions, such as "prediction markets."

Most studies in experimental economics suffer from small-game/large-game effects. Unless these experiments are very securely anonymized, in a way the players actually trust, and in a way the players have learned to adapt to, overriding their moral instincts -- an extremely rare circumstance, despite many efforts to achieve this -- large-game effects quickly creep in, rendering the results often very misleading, sometimes practically the opposite of the actual behavior of people in analogous real-life situations. A common example: it may be narrowly rational and in accord with theory to "cheat", "betray", or otherwise play a narrowly selfish game, but if the players may be interacting with each other after the experimenters' game is over, the perceived or actual reputational effects in the larger "games of life", ongoing between the players in subsequent weeks or years, may easily exceed the meager rewards doled out by the experimenters to act selfishly in the small game. Even if the players can somehow be convinced that they will remain complete strangers to each other indefinitely into the future, our moral instincts generally evolved to play larger "games of life", not one-off games, nor anonymous games, nor games with pseudonyms of strictly limited duration, with the result that behaving according to theory must be learned: our default behavior is very different. (This explains, why, for example, economics students typically play in a more narrowly self-interested way, i.e. more according to the simple theories of economics, than other kinds of students).

Small-game/large-game effects are not limited to reputational incentives to play nicer: moral instincts and motivations learned in larger games also include tribal unity against perceived opponents, revenge, implied or actual threats of future coercion, and other effects causing much behavior to be worse than selfish, and these too can spill over between the larger and smaller games (when, for example, teams from rival schools or nations are pitted against each other in economic experiments). Moral instincts, though quite real, should not be construed as necessarily or even usually being actually morally superior to various kinds of learned morals, whether learned in economics class or in the schools of religion or philosophy.

Small-game/large-game problems can also occur in auditing, when audits look at a particular system and fail to take into account interactions that can occur outside their system of financial controls, rendering the net interactions very different from what simply auditing the particular system would suggest. A common fraud is for trades to be made outside the scope of the audit, "off the books", rendering the books themselves very misleading as to the overall net state of affairs.

Similarly, small-game/large-game problems often arise when software or security architects focus on an economics methodology, focusing on the interactions occurring within the defined architecture and failing to properly take into account (often because it is prohibitively difficult to do so) the wide variety of possible acts occurring outside the system and the resulting changes, often radical, to incentives within the system. For example, the incentive compatibility of certain interactions within an architecture can quickly disappear or reverse when opposite trades can be made outside the system (such as hedging or even more-than-offsetting a position that by itself would otherwise create a very different incentive within the system), or when larger political or otherwise coercive motivations and threats occur outside the analyzed incentive system, changing the incentives of players acting within the system in unpredictable ways. Security protocols always consist of at least two layers: a "dry layer" that can be analyzed by the objective mathematics of computer science, and a "wet layer" that consists of the often unpredictable net large-game motivations of the protocols' users.  These should not be confused, nor should the false precision of mathematical economic theories be confused with the objective accuracy of computer science theories, which are based on the mathematics of computer architecture and algorithms and hold regardless of users' incentives and motivations.

A related error is the pure-information fallacy: treating an economic institution purely as an information system, accounting only for market-proximate incentives to contribute information via trading decisions, while neglecting how that market necessarily also changes players' incentives to act outside of that market. For example, a currently popular view of proposition bets, the "prediction markets" view, often treats prop bets or idea futures as purely information-distribution mechanisms, with the only incentives supposed as the benign incentive to profit by adding useful information to the market. This fails to take into account the incentives such markets create to act differently outside the market.  A "prediction market" is always also one that changes incentives outside that market: a prediction market automatically creates parallel incentives to bring about the predicted event. For example a prediction market on a certain person's death is also an assassination market. Which is why a pre-Gulf-War-II DARPA-sponsored experimental "prediction market" included a prop bet on Saddam Hussein's death, but excluded such trading on any other, more politically correct world leaders. A sufficiently large market predicting an individual's death is also, necessarily, an assassination market, and similarly other "prediction" markets are also act markets, changing incentives to act outside that market to bring about the predicted events.

Thursday, December 11, 2014

The dawn of trustworthy computing

When we currently use a smart phone or a laptop on a cell network or the Internet, the other end of these interactions typically run on other solo computers, such as web servers. Practically all of these machines have architectures that were designed to be controlled by a single person or a hierarchy of people who know and trust each other. From the point of view of a remote web or app user, these architectures are based on full trust in an unknown "root" administrator, who can control everything that happens on the server: they can read, alter, delete, or block any data on that computer at will.  Even data sent encrypted over a network is eventually unencrypted and ends up on a computer controlled in this total way. With current web services we are fully trusting, in other words we are fully vulnerable to, the computer, or more specifically the people who have access to that computer, both insiders and hackers, to faithfully execute our orders, secure our payments, and so on. If somebody on the other end wants to ignore or falsify what you've instructed the web server to do, no strong security is stopping them, only fallible and expensive human institutions which often stop at national borders.

The high vulnerability we have to web servers stands in sharp contrast to traditional commercial protocols, such as ticket-selling at a movie theater, that distribute a transaction so that no employee can steal money or resources undetected. There is no "root administrator" at a movie theater who can pocket your cash undetected.  Because, unlike a web server, these traditional protocols, called financial controls, can securely handle cash, you didn't have to fill out a form  to see a movie, shop for groceries, or conduct most other kinds of every-day commerce. You just plunked down some coin and took your stuff or your seat. Imperfect and slow as these processes often are (or were), these analog or paper-based institutions often provided security, financial control, and/or verifiability of fiduciary transactions in many ways far superior to what is possible on web servers, at much less hassle and privacy loss to customers. On the Internet, instead of securely and reliably handing over cash and getting our goods or services, or at least a ticket, we have to fill out forms and make ourselves vulnerable to identity theft in order to participate in e-commerce, and it often is very difficult to prohibitive to conduct many kinds of commerce, even purely online kinds, across borders and other trust boundaries. Today's computers are not very trustworthy, but they are so astronomically faster than humans at so many important tasks that we use them heavily anyway. We reap the tremendous benefits of computers and public networks at large costs of identity fraud and other increasingly disastrous attacks.

Recently developed and developing technology, often called "the block chain", is starting to change this. A block chain computer is a virtual computer, a computer in the cloud, shared across many traditional computers and protected by cryptography and consensus technology. A Turing-complete block chain with large state gives us this shared computer. Earlier efforts included state-machine replication (see list of papers linked below).  QuixCoin is a recent and Ethereum is a current project that has implemented such a scheme. These block chain computers will allow us to put the most crucial parts of our online protocols on a far more reliable and secure footing, and make possible fiduciary interactions that we previously dared not do on a global network 

Much as pocket calculators pioneered an early era of limited personal computing before the dawn of the general-purpose personal computer, Bitcoin has pioneered the field of trustworthy computing with a partial block chain computer. Bitcoin has implemented a currency in which someone in Zimbabwe can pay somebody in Albania without any dependence on local institutions, and can do a number of other interesting trust-minimized operations, including multiple signature authority. But the limits of Bitcoin's language and its tiny memory mean it can't be used for most other fiduciary applications, the most obvious example being risk pools that share collateral across a pool of financial instruments.

A block-chain computer, in sharp contrast to a web server, is shared across many such traditional computers controlled by dozens to thousands of people. By its very design each computer checks each other's work, and thus a block chain computer reliably and securely executes our instructions up to the security limits of block chain technology, which is known formally as anonymous and probabilistic Byzantine consensus (sometimes also called Nakamoto  consensus).  The most famous security limit is the much-discussed "51% attack".  We won't discuss this limit the underlying technology further here, other than saying that the oft-used word "trustless" is exaggerated shorthand for the more accurate mouthful "trust-minimized", which I will use here.  "Trust" used in this context means the need to trust remote strangers, and thus be vulnerable to them. 

Trust-minimized code means you can trust the code without trusting the owners of any particular remote computer. A smart phone user in Albania can use the block chain to interact with a computer controlled by somebody in Zimbabwe, and they don't have to know or trust each other in any way, nor do they need to depend on the institutions of either's countries, for the underlying block chain computer to run its code securely and reliably. Regardless of where any of the computers or their owners are, the block chain computer they share will execute as reliably and securely as consensus technology allows, up to the aforementioned limits. This is an extremely high level of reliability, and a very high level of security, compared to web server technology. 

Instead of the cashier and ticket-ripper of the movie theater, the block chain consists of thousands of computers that can process digital tickets, money, and many other fiduciary objects in digital form.  Think of thousands of robots wearing green eye shades, all checking each other's accounting. Individually the robots (or their owners) are not very trustworthy, but collectively, coordinated by mathematics, they produce results of high reliability and security.

Often block chain proponents talk about the "decentralized" block chain versus the "centralized" web or centralized institutions. It's actually the protocol (Nakamoto consensus, which is highly distributed) combined with strong cryptography, rather than just decentralization per se, that is the source of the far higher reliability and and much lower vulnerability of block chains. The cryptography provides an unforgeable chain of evidence for all transactions and other data uploaded to the block chain. Many other decentralized or peer-to-peer (P2P) technologies do not provide anything close to the security and reliability provided by a block chain protected by full Byzantine or Nakamoto consensus and cryptographic hash chains, but deceptively style themselves as block chains or cryptocurrency.

A big drawback is that our online and distributed block chain computer is much slower and more costly than a web server: by one very rough estimate, about 10,000 times slower and more costly, or about the same as it cost to run a program on a normal computer in 1985. For this reason, we only run on the block chain that portion of an application that needs to be the most reliable and secure: what I call fiduciary code. Since the costs of human ("wet") problems caused by the unreliability and insecurity of web servers running fiduciary code are often far higher than the extra hardware needed to run block chain code, when web server reliability and security falls short, as it often does for fiduciary computations such as payments and financial contracts, it will often make more sense  to run that code on the block chain than to run it less reliably and securely on a web server. Even better, the block chain makes possible new fiduciary-intensive applications, such as posting raw money itself to the Internet, securely and reliably accessible anywhere on the globe -  apps that we would never dare do with a web server.

What kinds of fiduciary code can we run?  We are still thinking up new applications and the categories will be in flux, but a very productive approach is to think of fiduciary applications by analogy to traditional legal code that governs traditional fiduciary institutions. Fiduciary code will often execute some of the functions traditionally thought of as the role of commercial law or security, but with software that securely and reliably spans the global regardless of traditional jurisdiction. Thus:

* Property titles (registered assets), where the on-chain registry is either the legally official registry for off-chain assets or controls on-chain ones, thus providing reliable and secure custody of them. One can think of a cryptocurrency such as Bitcoin as property titles (or at least custody enforced by the block chain consensus protocol) to bits recognized as being a fixed portion of a currency, or as controlling unforgeably costly bits, or both. Block chains could also control hardware which controls the function of and access to physical property.

* Smart contracts: here users (typically two of them) agree via user interface to execute block chain code, which may include transfer of money and other chain-titled assets at various times or under various conditions, transfer and verification of other kinds of information, and other combinations of wet or traditional (off-chain) and dry (on-chain) performance. A block chain can hold cryptocurrency as collateral (like an escrow) which incentivizes off-chain performance that can be verified on-chain, by the parties or by third parties. A full block chain computer can pool on-chain assets into a single chain-controlled risk pool spread among many similar financial contracts, reducing the amount of collateral that needs to be stored on-chain while minimizing the need for off-chain collateral calls. The block chain can also make the search, negotiation, and verification phases of contracting more reliable and secure. With on-chain smart contracts we will be able to buy and sell many online services and financial instruments by button and slider instead of by laboriously filling out forms that disclose our private information.

* On-chain treasuries, trusts, and similar, where money lives on the block chain and is controlled by multiple signature ("multisig") authority.  Putting a treasury with signature authority on a block chain computer is low-hanging fruit, but is often tied to more speculative efforts under the label "distributed autonomous organization (DAO)", which may include voting shares and other mechanisms to control the treasury like a corporation or other kind of of organization.

I hope to discuss these block chain applications, especially smart contracts, in future posts. While there is much futurism in many block chain discussions, including many trying to solve problems that aren't actually solved by the block chain, I will generally stick to low-hanging fruit that could be usefully implemented on Quixcoin, Ethereum, or similar technology in the near future, often interfacing to still necessary parts of traditional protocols and institutions rather than trying to reinvent and replace them in whole.

References

Here is a list of basic computer science papers describing the technology of block chains (including cryptocurrencies).

Wet vs. dry code

Localbitcoins Adds Bitcoin Cash and Other Cryptocurrencies as Payment Methods

Localbitcoins, one of the biggest P2P exchanges in the world, has added Bitcoin Cash and other cryptocurrencies as payment methods to acquir...