Wednesday, April 15, 2015

Vanity Pool - the geekiest service in Bitcoin

Vanity Pool - the geekiest service in Bitcoin

Bitcoin is the money system of geeks. While you don't need to be one to use it nowadays, it is still undeniably complex. The way it uses cryptography to securely move funds around can only be fully understood by computer scientists.

Now, take this geeky technology and try finding some more niche appeal. We have technologies like Factom embedding data into the blockchain, SatoshiDice using transaction hashes as gambling randomness and so on. However, I do believe that one of my projects is perhaps the geekiest service in Bitcoin ;).

But first, some theory.

Vanity Addresses


Just like some cars have vanity plates, so can Bitcoin. While some people are satisfied riding in their Bitcoin Priuses:

Bitcoin Prius

some of us want to create some nice flairs for our wallets. While it's easy to create an invalid Bitcoin address with any text (such as 1Piachuxxxxxxxxxxxxxxxxxxxy3XorwA), it takes a lot more effort to actually generate an address you can import into a wallet and spend (like 1PiachuEVn6sh52Ez7o6Fymvw54qvQ4RBm). Normally this process would involve generating a lot of addresses and looking for your desired pattern. It is somewhat manageable with GPUs (especially in the pre-ASIC era of GPU mining), a lot of people didn't have the necessary hardware to perform this operation.

Back in the day, those people would result in having to trust someone to generate their key for them and not steal their money in the future. In the Bitcoin world, having to trust someone with your private key is unacceptable, but luckily, the laws of mathematics gave us a solution!

Split-key vanity addresses


Now, things are getting a bit complicated, but I'll try to keep it as simple as possible. If things get too complicated, feel free to skip to next heading.

Bitcoin private keys are essentially really large numbers (lets call it A). Bitcoin public keys are those large numbers multiplied by a Generator (essentially a point in space), which give you your public key point:

A * G = AG

A - private key
G - Generator
AG - public key

Everyone that sends you money knows your AG, but since division in this math space is impossible, they will never guess your private key A from it. All public keys easily map to Bitcoin addresses.

Now, lets say we have another private key B. The following equations hold in the Bitcoin space:

(A+B) * G = AG + AB
A * B * G = AG * B

This means that if you add two private keys, the public key of the sum is identical to if you would have added the public keys together. Same thing with multiplication.

Now, what are the practical uses of this? There are some uses for combining addresses for storing money (especially in pre-multisig era), but the use I want to talk to you about is Vanity Address Mining.

Vanity Address Mining


Given everything explained in the previous heading, we solved our privacy issue from before. Now we have a way to have someone generate us a private key without them knowing our private key. The only information they need is our public key and the pattern we want. They generate us a private key that we combine with our own private key, and we get our vanity address. Because our private key was always secure, we can be certain only we know the private key.

Now, given that the users request vanity addresses with information that can be shared publicly and vanity miners submit results that can also be publicly broadcast, we can start connecting the two in a more methodical fashion without any special concerns for privacy. And this is a role for...

Vanity Pool


Vanity Pool is a service I created a few years ago to leverage the split-key address creation in the business of vanity address mining. Anyone can go onto the website, request any reasonable vanity pattern to be mined, pay the fee and let the miners do the work for them. The miners would query all the available work and start mining the addresses one by one until they find a solution and cash it in.

Since the service launched, it had helped many people create addresses for themselves and their businesses. Yours can be next! ;)

As it stands, Vanity Pool is one of the geekiest services in Bitcoin. It not only leverages clever cryptographic tricks, has its own mining ecosystem, but also does all of that in a provably secure manner. No private keys are ever exposed.

Conclusions


Vanity Pool is a geeky Bitcoin service that uses ECDSA math in a clever way ;).

Sunday, April 5, 2015

Trust-based currencies - good money, bad money, LETS, Ripple, etc.

Trust-based currencies - good money, bad money, LETS, Ripple, etc.

This week at Decentral Vancouver we had a discussion with Michael Linton and Dominique Legault from Open Money about the LETS (full recording). LETS, or Local Exchange Trading System is essentially a community-run non-for-profit system for recording transactions, often using a form of a local currency. During the discussion various comparisons to the current Crypto 2.0 systems came up, along with some debate whether local currencies in general are good for us. Let us dive into these topics deeper.

Trust-based systems - explanation


Trust-based systems can be defined as a monetary system based on currencies requiring a trust that other parties won't default on their obligations. Examples of such systems include banks, gift cards, debt, as well as the aforementioned LETS, Ripple (minus the XRP portion) and Open Transactions. Counterexamples are currencies where you directly control the monetary asset transacted in, such as barter, gold or Bitcoin.

All trust-based systems can be boiled down to managing Trust and Debt:

Trust and Debt in Ripple Trade wallet

Trust is the limit of how one person is willing to have the other person owe them, while Debt is the current amount owed. So if I Trust BitStamp for $100, I am willing to hold up to $100 of their Debt before they won't be able to send me any more money. If I hold $10 in balance from BitStamp, they are $10 in Debt.

These simple relations are pretty much how all of the modern banking works. A savings account is you Trusting the bank and them being in Debt to you at your current balance. A credit card is the bank Trusting you, and the amount you charge onto the card is how much in Debt you are to the bank. If I send money from my account to yours, bank's Debt to me is reduced, and it is increased for you.

Based on how Trust is placed, we can have 3 different systems - centralized, decentralized, and distributed:


A centralized system is like a government issuing a currency - everyone in the given country is obliged to trust it and use it. The world economy is a decentralized system - every government issues their own currency, most people use one currency, but there is some connection between the systems. Local network of interpersonal debt ("I owe you $5 for the drink last night") is a distributed system.

All of the trust-based systems can take a form of any of the three systems. Currently, Ripple Classic and LETS are more focused on the distributed model, while Ripple and its gateways are focusing on the decentralized approach.

Decentralized vs Distributed model

As the centralized model is pretty similar with decentralized model, I will omit it and discuss the other two models.

From a practical perspective, you will most likely have some combination of a distributed and decentralized model in your trust-based system.

The distributed model appears to be more useful when "liquidity" is scarce and there are more direct interactions on a community level. For example, if you have two people with no cash on hand that are capable of working for $10/hour, under the centralized or decentralized model they wouldn't be able to do anything because they wouldn't be able to pay one another. Under the distributed model, they can still work by tracking how much they each owe one another and settling the difference in kind. Similarly, the debt could be exchanged in a web of trust in the local community for different goods and services.

The decentralized model appears to be more useful when parties don't trust one another, but can trust some third party. For example, a person selling a $100k house might not want to trust a stranger to repay the debt over many years, but would be more willing to trust a bank or similarly large institution. This model is also useful for trade outside of your circle of friends as it reduces complexity. Sending money overseas in a decentralized model means going from you, to your bank, to recipient's bank, and to them, rather than possibly funnelling through a network of many people.

Good money vs bad money


Gresham's law is commonly stated as "bad money drives out good money". It is often mentioned in context of money's nominal value (how much value is printed on the bill or coin) and its commodity value (how much the raw cotton or metal used to make the money is worth). To put it simply, people would value a silver dollar coin more than a dollar bill due to the metal, and as such would first spend the dollar bill.

When talking about trust-based money, the same issue comes up in a more interesting way. Say we have a local community money like SeedStock and a government-backed Canadian Dollar. If we have an inefficient market (it is hard to trade SeedStock for CAD), people might value SeedStock roughly around 1SS=1CAD and use them interchangeably as needed on the local level. The trades would obey Gresham's law and SeedStock should be spent first.

However, if we have an efficient market (trading between the currencies is instant and on the fly), we would discover the true value of SeedStock. Perhaps it would turn out 1SS is only worth 50 cents since too few places accept it, or maybe it's a more optimistic 95 cents. Whatever the value would settle at, that should be an equilibrium at which people would be just as willing to spend SeedStock as they would spend Canadian Dollars.

A practical example of this would be what PurseIO does - as it turns out, Amazon gift cards are worth about 80% of their face value when used to purchase Bitcoin.

Back to our systems - it is very likely that local currencies from the distributed model will turn out to be "bad money" (or at least worse than the alternative), while the money from big, decentralized gateways will act like "good money". The good money will probably also be used as a measurement of value, even when bad money will be used as settlement (I owe you $10 worth of my labour).

If we have an efficient market, no merchant will be interested in taking settlement in any bad money other than the one they issued themselves - if they can receive 10CAD or 10CAD worth of SeedStock, unless they need SeedStock directly, they would rather hold the good money. This would work until the entire market would either dry up or become inefficient, in which case there would still be a use for bad money to facilitate trade.

LETS - how does it fit in?


During our discussion at Decentral Vancouver, Michael Linton was arguing that local currencies in the LETSystem are needed to keep the local economy from drying up. We can illustrate the local trust-debt relations as:


However, no matter what currencies we are using, there will always be a need for transactions between the communities in the modern world. Unless the system is hindered by not being able to trade between the currencies, those currencies will be traded and some exchange rate between them will be established. Just like with the modern world - whether what one community supplies is valued higher or lower will determine the exchange rate until there is some price equilibrium (say, if oil is 10% cheaper to buy and import from US than to buy locally in Canada, the economic system based only on that should value CAD at 10% discount until it is just as cheap to buy and import than to buy locally).

As such, the LETSystem is fine in allowing communities to issue their own currencies, but hearing the technical explanations, it appears inferior to Open Transactions and Ripple. Both Open Transactions and LETS were built for local pockets of transactions between individuals that were checked and validated by a third party (a notary for example). Communicating between the local instances is more of a problem in both systems. If that is an important feature of a system, Ripple is more suited for the task, provided you are willing to sacrifice privacy for transparency.

Conclusions


The LETSystem has definitely influenced many developments in the trust-based currency system for over 30 years of its existence. The decentralized and distributed currencies appear to be complimenting one another - one working better on a local scale and when liquidity is scarce, and the other one when there is less trust between the parties.

Wednesday, March 25, 2015

An open letter to Senator Ringuette

An open letter to Senator Ringuette

Dear Senator,

Recently I revisited some recordings of the Senate hearings on Digital Currency from 2014-10-02. I appreciate the number of very insightful questions you have raised to the panel - it was a pleasure hearing both them and the answers to them.

During the hearing you brought up the fact that Canada Post holds a bank charter in Canada, and that the company is in need of extra revenue stream. I would like to address some of the possibilities that this fact brings to both the world of Bitcoin-related companies in Canada, as well as the wider Canadian population as a whole.

In the modern world, there are a number of technologies and services that have emerged in the recent years that are essential in everyday lives. Many people would count access to the Internet as well as banking to be among them. I will leave the discussion of the former and focus on the latter.

Efficient banking as well as access to digital payment methods is needed for virtually every business and is prevalent in personal lives of many people. However, as was illustrated multiple times in the hearing by Michael Perklin, all of the banks are private companies and have the right to refuse business to anyone they choose without any legal reason. This problem is not unique to the Bitcoin world - there are a lot of banks that discriminate against people with poor credit scores or dealing in "taboo" businesses. Such people essentially become "unbankable" - unable to take part in the modern economy that is largely driven by online purchases and digital payments.

If the Canadian Government decided to address this issue by offering even the most basic banking services through Canada Post indiscriminately to anyone in Canada, it would not only help the Bitcoin businesses, but also many of the disenfranchised people living in our Country.

I know Canada is quite open to innovation. The former MintChip project by Canadian Mint, or the possibly future project of Bank of Canada are a clear indicator that the Canadian Government is interested in the digital currency space. I do believe that no matter which direction projects like these go, Canada Post will be playing an integral role.

The current "Big Five" banks hold about 920 to 3'330 branches each in Canada, while Canada Post has over 6'000 post offices. Similarly, a lot of those offices are open for twelve or more hours per day, while a number of bank branches are open for less than eight hours per day. As such, Canada Post is an ideal solution for money deposits and withdrawals, as well as everything else that is needed (performing identity verification for example) - the post offices should be accessible to every citizen.

There are of course many other services Canada Post could offer to help with payments, such as delivering money directly to the recipient's nearest post office (as is the case with Money Orders), or perhaps even directly to their home address.

However, from what I learned talking with a few Bitcoin businesses that require efficient, traditional banking for the core of their business, all that matters to them is to be able to receive money from their customers, be able to pay their suppliers efficiently, have confidence that their bank account won't get shut down, and have all of this at an affordable rate.

Even this little is too much for a lot of banks. I have done some research on international banking for Bitcoin businesses and I have seen Canadian companies banking in Czech Republic, or companies from USA banking in Malta not because these banks are the best, but because they can't open a local bank account.

As such, I am grateful to you Senator for bringing this issue up and I remain hopeful that the future will give us a more inclusive banking system, whether it is in Canadian Dollars, or Bitcoin. I am open to any follow-up discussion, questions or general consulting you or anyone else from the Canadian Government might have.

Sincerely yours,
Piotr Piasecki.

Saturday, March 7, 2015

Governments - do your job. Give us unique digital signatures!

Governments - do your job. Give us unique digital signatures!

This week at Decentral Vancouver we had an interesting discussion with Gene Vayngrib, Greg Meredith and Katryna Dow (the full video of the hangout can be viewed here). We talked about the concept of decentralized identities - how people can build up online identities and trust to be able to conduct online transactions with unknown parties with minimized risk of scams. This later turned into a discussion of sybil attacks and how governments might actually be useful for something. So, lets start from the beginning...

Online identities - the current model


At the moment, online identities can be viewed as a collection of pseudonyms - it's rather hard to tell if say, ThePiachu on Twitter is the same person as ThePiachu on Reddit, etc. Similarly, it's hard to tell who this person is in real life. If we use OAuth and say, sign into multiple websites with Facebook / Google Plus / whatever, at least we can know that one entity is behind all of the accounts.

Now, why is any of this important? Well, a lot of online interactions depend on user's reputation. Everyone wants to know that the person they are talking to is the same person they talked to last time on a different website, etc. Moreover, this persistent reputation can be useful to determine how likely a person is to scam you. Building up years of online presence takes a lot of effort, so the person would only try to scam and lose the reputation if they could earn more than it would cost to build up another pseudonym. In contrast, an hour old account with no history is cheap to burn to scam, defame or troll someone online.

Decentralized identities


One could describe decentralized identities as a decentralized extension of the OAuth model. With projects like BitID or Meeco, we would be in control of our sign-in identities, just like we control our Bitcoin addresses. We can create an identity on our computer, use it to sign into some websites with our Bitcoin address and thus start building our reputation, similar to the current model. The only problem is, such identities would be vulnerable to theft. For example, if I go by the address of 1PiachuEVn6sh52Ez7o6Fymvw54qvQ4RBm and someone gets my private key, I can no longer prove that I am the original owner of this address, nor that I authorize a new address to be my identity from now on.

Moreover, there are some important use cases that this model doesn't solve. If anyone can create any number of identities, you cannot use those identities to do democratic voting, use them to distribute universal basic income to each person in a fair manner, etc. For this, we need to resort to what a lot of crypto-anarchists hate - the government.

Governments and unique identities


Like it or not, the governments (or at least some of them in the western world) do a few things efficiently. One of such things, is verifying that a given person is the person they are claiming to be. The first thing any company does when they need to verify your identity is to ask for your government ID. While they aren't 100% fraud-proof, it's pretty reasonable to assume a government can ensure:

  • that each person has a unique number assigned to them
    • the number is not shared between multiple people
    • no person has more than one such number
    • if the number ever gets stolen, it will be tracked
  • whether the person is still alive or has already died is tracked with reasonable accuracy
Now, if we took these capabilities and stick them on some hardware device say like this one:



We can solve a lot of problems quite efficiently.

Digital ID - KYC for the digital age


How a Digital ID might look:


  1. A government identifies a person and issues them an ID with a chip
    1. The ID holds a private key, performs signature on request and dispenses the public key as needed
    2. The ID is not wirelessly accessible (to avoid problems like this)
    3. They will probably need to issue them the hardware interface to use this ID online - probably some USB dongle
  2. The government keeps a record of the ID and the status of the person (alive, deceased) and the ID itself (active, stolen, replaced)
  3. The government opens up a public API for anyone to request only the most basic data:
    1. "Is ID X stolen?" - yes/no
    2. "Does ID X belong to anyone?" - yes/no
    3. "Is ID X valid?" - yes/no
    4. "List invalidated ID numbers from last year"
  4. The API responds in a cryptographically verifiable way
    1. The response is signed by the government's private key - no other party can forge the signature
    2. The response includes the request in question, validating that the inquiry was made (so the requesting party can prove they did their due diligence)
    3. The responses are aggregated into some factom-like database on the blockchain, meaning that all requests are auditable
  5. If a person ever loses their ID, the government will replace the ID with a new ID and record that the person's ID was changed and to what ("ID #245 got replaced by ID #9472")

Now, what good does this do? Quite a lot actually.

First of all, KYC becomes fully digital. No more ID scanning, photo taking, etc. A service like Kraken can just ask - "Please input your ID number here, and please verify your identity by digitally signing this verification text...". The service quickly learns that the person owns that particular ID (through challenge-response), and can take that ID to the government and ask: "A person with this ID requests KYC. Is this person in your database? Is the ID valid? Everything OK?". After a prompt positive response, the service is sure they have fulfilled their KYC requirements. If a government ever asks - "who is this person?", the service can give them their ID and the government will already know who they are looking for.

Secondly, identity theft is diminished. In order for someone to steal your identity, they would need to have access to your ID card. If your ID card gets stolen, you report it to the government and they will:
  • give you a new ID card with a new keypair
  • invalidate the old one
  • keep a record of the change for everyone to poll
This means that any digital service can periodically get the list of invalidated IDs and cross-check it against their own database. If they match, the account can be frozen, or updated (in case the ID gets replaced).

Thirdly, any service that relies on globally unique real-world identities (such as democratic voting) can utilize this system to solve the problem of sybil attacks. Similarly, if you want to build communities of real people, not just online aliases (say, LinkedIn), this also addresses your needs.

Lastly, this also solves the problem of scams. If you are unsure who you are dealing with, get their public key, verify their identity through challenge-response, and if worse comes to worse, you can pinpoint to the police who was it that did you wrong.

Conclusions


While a lot of people might oppose the governments interfering too much with the Internet through the actions of NSA and the like, there are still good for some things. If leveraged correctly, the governments can help solve one of the hard problems in cryptocurrency - unique user verification. If implemented correctly, this can make the burden of following KYC requirements cost next to nothing.

Monday, March 2, 2015

Sustainable Crypto Universal Basic Income

Sustainable Crypto Universal Basic Income

Universal basic income (UBI) is an interesting experiment. For those of you unfamiliar with the idea, it's "a form of social security system in which all citizens  or residents of a country regularly receive an unconditional sum of money, either from a government or some other public institution, in addition to any income received from elsewhere.". In other words, every person is guaranteed to receive a specific sum of money each month for just being alive. While this might trigger Red Scare in some people, lets take a free-thinker approach to this and explore this concept further in the concept of cryptocurrencies.

N-per-person coins


The first step towards discussion of Crypto UBI, is handling one of the hard problem in cryptocurrencies that relates to n-per-person coins. Vitalik created an excellent video on this topic (part relevant to our discussion starts around here).

When it comes to cryptocurrencies, a lot of people debate how the coins should be distributed. Bitcoin uses proof of work to distribute its newly minted coins to the miners. There are a lot of other distribution models - proof-of-burn (Counterparty), pre-purchase (Mastercoin), centralized token creation (Ripple), but probably the hardest problem to tackle comes from "n-per-person coins", sometimes also called national coins.

Auroracoin is perhaps the most well known example of such a coin. It aims to distribute a large portion of its coins to the population of Iceland, where each Icelander would be eligible to receive a certain amount of coins. Doing this in a centralized fashion is an achievable process - there are companies offering KYC services that can accomplish this, and any willing government could similarly perform such an undertaking. Solving the same problem in a purely cryptographical manner, however, is an open problem.

Unfortunately, I don't see any clear way of solving the issue of uniquely identifying a person in an objective and privacy-friendly manner, therefore we would have to assume a central or distributed ID verification party would have to be involved.

The problem of inflation


Another big issue that needs to be addressed by anyone talking about Universal Basic Income is the problem of inflation. If we assume everyone is getting X amount of money each month, that money has to come from somewhere. It can be created in a form of new money, but that would expand the money supply by a large amount each month. Alternatively, we could look at taxes or some other clever method of addressing the issue.

Lets say that we want to be clever and solve this issue in a new way. To prevent inflation, we need a system that:


  • Can create new money each period easily
  • Can guarantee there will be a cap on the money supply


While initially these restrictions appear to be excluding one another, it is possible to solve them by just using one trick:

Demurrage


Demurrage is a cost associated with holding currency over a given period. In other words, you lose a certain percentage of your money each month, year, or other period measurement. If we impose a 1% per month demurrage on holding money and give a person $1000 per month, he would pay $10 the first month. The second month, he would get another $1000, pay $10 for that money, but also pay $9.9 for the $990 he has from last month. Eventually, when the person has $100k saved up, he would be receiving $1000 and paying $1000 in a month and reach an equilibrium.

A more general formula is this: If you give away $X in a period and demurrage takes away Y%, your money supply will reach $ X/Y. For 1%, it's 100*X, for 10% it's 10*X, etc.

In other words, demurrage allows us to both give everyone their Universal Basic Income and ensure a fixed money supply cap. 

The best part is, we can achieve this functionality in a cryptocurrency today. Ripple has supported demurrage for awhile, and more systems could similarly implement their own version of demurrage as needed.

World with Crypto UBI


Now that we have discussed the two components needed to create a sustainable Crypto Universal Basic Income system (unique user identification and a demurrage currency), we can ponder how a world that uses such a currency could look like.

Motivation to work


Like it or not, we are headed for a more and more automated world where human labour might not be needed (for better  or for worse). In a post-scarcity economy, UBI would probably fit in really well. In a dystopian future, it probably won't be welcome. However, lets focus on the here and now - why would anyone want to work if they received money for free?

As with any currency, it would only have value in relation to what you can buy with it. In a current world, what you would get from UBI wouldn't probably stretch much. It might be comparable to a welfare cheque - enough to survive, but without any luxuries. People would have the same incentive to work as they do now - to earn more and be able to afford more. The added benefit would come from being able to fall-back on UBI as needed.

If a lot of people decided not to work, then the value of labour would go up. People would have more inventive to work, and eventually we would find some balance of how much the currency is worth and how much labour is worth.

Catering to the basic income


Now, knowing that everyone, no matter who they are, can afford to spend X amount per month would mean anyone supplying goods and services could aim for that income demographic. You could have housing built specifically for people living only on UBI, or have restaurants to serve affordable food. Such catering would once again depend on how many people live only off UBI - the more there are, the more the prices will cater to them.

Savings and loans


Savings and loans would be interesting in UBI economy. Since by default demurrage would offer negative interest rate on holding the currency, banks could even offer zero interest rate and have people interested in saving with them. Similarly, loans could be given out at zero interest rate as well (well, not at the same time as zero interest rate saving perhaps), because this way the banks would be able to access the same amount of money in the future without suffering from the demurrage. Moreover, they would know that worst come to worse, the person in question would be able to make some payments on the debt from their guaranteed income.

Redistribution of wealth - an equalizer


The first noticeable thing about a UBI economy would be the wealth redistribution. Since everyone would be paying demurrage based on the amount of money they hold, obviously richer people would have to pay proportionally more. In order to keep rich, they would have to work harder and harder to maintain their elevated savings in comparison to other people. This would certainly be an equalizer in the society.

Alternative savings currencies


Understandably, some people will want to move their wealth from the demurrage UBI currency. Some might go into commodities, but those by themselves have a cost associated with storing them. Using Bitcoin or perhaps some other currencies would probably be a preferable option. This would make UBI currency less valuable, but if you consider how some countries engage in a "beggar thy neighbour" and currency wars approaches, this could make the country that uses UBI a cheap source of goods on the global market.

Public projects


Another advantage of having demurrage built into a currency is that the system will naturally smooth out any extra money that is thrown into the system. This means that a country using UBI can finance public projects easily by creating more currency for just this purpose and paying the appropriate people to undertake it. This could mean building public green spaces, paying for healthcare and education, or anything else that is needed.

Conclusions


While we don't have a clear roadmap of how to achieve Crypto Universal Basic Income on a same decentralized level as Bitcoin, a centralized or semi-centralized solution that achieves a stable money supply is possible. While any country switching over to pure UBI approach might suffer greatly from the disruption of its current economy, perhaps creating a ground-up Crypto UBI might create an organic growth into an acceptable monetary system.

Tuesday, February 24, 2015

Bitcoin block limit - trade-offs and outcomes

Bitcoin block limit - trade-offs and outcomes

The discussion on the Bitcoin block limit is nothing new. A number of people have weighted in on this subject, myself included almost two years ago. So while the topic is not new, I still hear it being brought up every now and then. Since I came up with a novel approach to dealing with this issue that doesn't get mentioned that often, I figured I would make a blog entry on this subject.

But first, lets discuss what the problem is and what are its implications.

The problem


As some of you know, the Bitcoin blockchain was initially designed to have a limit of 1MB per block. This was done due to prevent the bloat and abuse of the network. However, if this limit is strictly enforced, the Bitcoin network would only be able to support a small number of transactions, about 7 transactions per second (compared to Visa's 2000 tps). Clearly, this won't be enough for a payment network that is supposed to replace the banks and credit cards. Either we will increase this size in some way, or we will see Bitcoin become a much different network.

The outcomes


Depending on whether the block size is increased or not and by how much would dictate how the Bitcoin network is shaped. Lets look over some possibilities.

Block size remains rigid


In this approach, the 1MB block size is rigid and remains unchanged. When we start hitting this limit, the miners will be able to pick and choose which transactions to include in the block. Rational miners will pick the transactions that pay them the most in fees (proportionally to their size), thus there will be a bidding war to get into the next block.

Due to the increased cost, fewer people will opt to send transactions themselves, either leaving Bitcoin entirely, or by performing some off-chain settlement. Wallet services such as CoinBase could become more like banks - offering their customers settlement with other people on their platform and other platforms that accept off-chain settlement.

In this scenario, Bitcoin becomes a settlement method for large bank-like wallets and large corporations.

Block size limit is abolished


A polar opposite of the previous approach. The block size limit is completely abolished and miners can create arbitrarily big blocks. While anyone can create a transaction for cheap, the network would soon be attacked by malicious entities trying to push the limit. Someone could decide to generate a 1GB block for example and cause the network to grind to a halt while synchronizing.

Quite quickly running a full node becomes a luxury or a business. We see more reliance on Stratum-like supernodes. The functionality of the network is dictated by them.

In this scenario, the Bitcoin network turns into something like the modern Internet - only big players can access it directly and everyone else has to rely on something like Bitcoin-Internet Service Providers.

The middle-ground


As with all things, we will probably see some middle-ground. We will probably have some limit in place but it will be systemically raised over time as the network grows. As to how it will be done, we will see.

That being said, I would like to describe an idea I had awhile back as to how to remove the block limit, while still disincentivizing the miners from creating large blocks.

An economic solution


The miners have a financial incentive to include any transaction with a fee into the block they are mining, since the cost to do so is negligible. Now, if the miners had a cost associated with adding those transactions in, the problem would solve itself. The miners wouldn't be able to include an arbitrary number of transactions in, while they would still be flexible to include a large number of well-paid-for legitimate transactions.

The question is - how do you make the miner pay? Obviously, you can't just enforce a transaction fee that would go back into the block. This would lead to the miner paying themselves in bogus fees.

There are two approaches to take - either the miner can pay in Bitcoin, or in their hashing power.

To pay in Bitcoin, the miner would have to destroy some BTC permanently. This would be the only way to ensure they are actually paying the fee. This approach would mess with the distribution curve of Bitcoin and decrease the amount of coins in circulation. Generally, a lot of people wouldn't like this approach and it's not too elegant.

To pay in the hashing power, the difficulty of a given block would have to scale with its size. Say, up to 1MB would be 1x the expected difficulty, 2MB could be 2x, 10MB 10x, etc. This would mean that only the transactions that pay proportionally more than the current block reward over 1MB would be profitable to include into the block. The relation could be linear, quadratic, or any other shape as needed to create work-reward ratio. As such, while there wouldn't be a strict block size limit, the miners would most likely be mining 1MB blocks until people would be paying enough to noticeably subsidize the miners for their effort. All in all, a more elegant solution.

Conclusions


The problem of the Bitcoin block size limit will have to be addressed in the coming years. If the problem is properly handled, we could see the network continuing to function as normal. There are many approaches that can be taken to address this issue.

Wednesday, February 18, 2015

The rise of fiat-denominated cryptos

The rise of fiat-denominated cryptos

Bitcoin is a great invention. It allows people to transact with anyone in the world in under an hour, requires no personal information and is secured by the power of math rather than people with guns. That being said, Bitcoin and a number of other cryptos bring with them the "issue" of being new currencies, not tied to anything else. While we can argue pretty much indefinitely whether that is a good or a bad thing (I personally see it as a backup in case the governments start failing and we need a new gold standard), it is unavoidable that we will see new services and cryptos that take a new spin on this "problem". We might very well soon see the rise of fiat-denominated cryptos.

Hedged accounts


Probably the simplest transition from a Bitcoin into a fiat-denominated crypto can be achieved using hedged accounts. Last year we've seen Locks from Coinapult, and this year CoinJar introduced their Hedged Accounts.

The concept is quite simple - you deposit your bitcoins into a wallet service that enables hedging and you lock your coins at the current price to whatever the service provider offers. They, in turn, promis to deliver you the exact value of the hedged coins based on the future market price. So if you lock your coins to $1, you will receive $1 in the future no matter whether the coins appreciate or depreciate. Moreover, since they provide the service, they get to dictate the current exchange rate, spread and so on.

While you can expect most of the companies that provide this service to actually trade the Bitcoin in and exchange them for the commodities they are hedging, or at least take some options on futures, you should be weary of more risky ventures. I have seen someone trying to set up a company offering hedged accounts without doing any conversion on the grounds of "we believe Bitcoin will appreciate in value, so we will be always solvent" (before they were laughed out of the conversation).

Moreover, I am yet to see anyone offer a hedged account that allows its clients to treat the hedge like an actual, spendable currency. In other words, even if I lock my 1BTC to say, $100, I can't send someone else in the same network exactly those $100 without unlocking my BTC, sending the BTC over and re-locking them and losing money on two conversions. Similarly, I am yet to see a hedging option that allows me to withdraw the underlying currency (so in our example - cashing out a $100 bill rather than some BTC).

All in all, hedged accounts appear like foreign-currency denominated accounts in some banks - while you can ask the bank to hold the currency of your choice, they will dictate the exchange rate and terms by which you can redeem your money. Useful in some circumstances, but not so much if you need a business solution.

Cryptos with a fiat floor


The next step in fiat-denominated cryptos are the cryptos with a fiat floor.

As I discussed back in 2013, when you have a fixed-amount currency like Bitcoin and a potentially infinite currency like USD, you can only establish a floor price for Bitcoin, never the ceiling. That is to say, if I am willing to buy 21M BTC for $21M, you know Bitcoin will never sell lower than $1/BTC, thus Bitcoin will have the floor value of $1. Easy enough. Now, with that out of the way, lets talk about our new ideas.

There are a few examples in this field. a bit obscure Coinaaa (cryptocurrency tied to NOK), Brock Pierce's a bit more well known RealCoin (tied to USD), and the subject of a pretty recent controversy PayCoin.

So how does all of this work? Usually, you would have a premined altcoin that is fully owned by one entity (with maybe a dash left for the miners to mine). That entity would then sell the currency at a fixed rate, whether it's 1 Coin for $1 or anything else. They would also buy the currency back at a similar or even identical price. Provided the company isn't malicious and they keep the required reserves, you would have a nice and solvent fiat-pegged cryptocurrency. It would be better than hedged currencies, since you could actually pay people without having to convert it back and forth.

However, unless the coin supply is flexible, you can only issue so many coins before you run out of the pre-mined amount. Not to mention that mining such currencies puts an extra expense on the coin operators - either forcing them to mine by themselves, or subsidize the miners by backing the mined coins as well.

Moreover, like with all things crypto, the moment you have to trust someone, the moment you can get screwed. As the story of GAW and PayCoin goes, if a business is not committed to its floor from the start and you don't see the money they are backing their coins with, you may end up with worthless coins in your pocket.

All in all, cryptos with a fiat floor is a step in the right direction. While we can pay people in the currency of choice, relying on Bitcoin-like architecture gives us some limits.

Fiat IOUs


This is essentially a more refined model of the previous concept. Instead of premining an altcoin and pegging its value to a fiat currency, we use the flexible model of Crypto 2.0 IOUs. The best example of this approach would be Ripple and its many fiat-backed currencies.

In this model, just like before, we have companies that create their own currencies and sell them for fiat at a predictable exchange rate. Instead of calling them "RealCoin" or "PayCoin", they are simply referred to as USD, EUR and the like. The currencies are created during deposit and destroyed when they are redeemed, thus their supply is more flexible. Just like before - you can use them for payment and settlement.

Generally, it's a model that does away with all the abstractions and works pretty much like a bank. When you put your euros into a Fidor bank you don't suddenly convert them to "20 fidors", they are still Euros in a rigid 1:1 exchange rate. Moreover, in networks like Ripple, those currencies are tradable for any other currencies and allowing for many other neat things.

That being said, the usual caveat applies - we are trusting a company to secure our funds. If the company is insolvent (such as WeExchange), you lose your money. I suppose if the company securing your funds is the actual government issuing the currency (MintChip comes to mind), this point might be getting a bit moot.

All in all, Fiat IOUs are usually better than cryptos with a fiat floor, since their supply is flexible and the currency is not bound by Bitcoin-like restrictions.

Distributed and counterparty-less fiat-denominated cryptos

The last category worth mentioning are distributed and counterparty-less fiat-denominated cryptos (what a mouthful!). Essentially, they are like Fiat IOUs but without a single entity backing the money.

They can take two forms - fiat voting pools and crypto fiat futures.

First approach is based on Open Transactions' idea of Voting Pools. This essentially means that there are multiple gateways / exchanges / backers of a given currency each holding enough money to cover the other parties defaulting. In Bitcoin world, this would be easily achieved with a multisig. In a fiat world, you would probably need some agreement with a bank to guarantee some deposits between multiple parties (similarly to how a central bank protects against bank runs and so on).

While this approach changes the risk model of a Fiat IOU from centralized to distributed, it's still not entirely decentralized. Other than that, it's pretty much a really good solution to create a fiat-denominated crypto.

The second approach is like BitShares' BitUSD. Instead of having a central or distributed entity issuing fiat-denominated cryptos, you have a futures market that creates a new currency that is pegged in value to fiat or commodities. While the process by which this happens is still a bit of an economic magic to me, it boils down to some people going short and some people going long on the BTS-BitUSD exchange rate. This creates the BitUSD asset that can be transferred like any currency. Provided the market works well, BitUSD should be worth about the same amount as an USD.

However, there are some criticisms of BitUSD. First of all, the supply isn't too flexible (if someone wanted to put $1B into the system, the current network couldn't handle it instantly due to the new assets needing to be created first). Secondly, there is a possibility of the market essentially collapsing (if enough margin calls were executed too quickly due to a sudden price swing). Lastly, the asset needs to be exchanged for fiat at an exchange - it can't be directly withdrawn like Fiat IOUs.

All in all, we come to a fork in our road. On one hand, we can have distributed fiat-denominated cryptos backed by multiple entities, or counterparty-less fiat-denominated cryptos. It would be rather hard to refine the concept any further - if a crypto is to be a fiat IOU, someone needs to hold the fiat money to allow you to withdraw it. If there is no counterparty, the crypto is unbounded, but it can't be freely withdrawn.

Conclusions


All in all, it seems like we are only beginning to see what the fiat-denominated cryptos have to offer. In the coming years we will probably see this form of cryptocurrency rise into some popularity due to the stability they offer. While I still hold my Bitcoin and enjoy the rollercoaster ride it is giving all of us, fiat-denominated cryptos might be more appealing to the crypto newcomers.