Financial Innovation

edit topic

The geeks guide to currencies: Trade, money and value

Published December 10th, 2010 edit replace rm!

Continuing on my series about currencies, I thought it would be useful to talk about some of the fundamental properties that currencies have. Feel free to ready the previous articles see On currencies, virtual or otherwise and 4 flavors of the mighty dollar after this one or in order.

My main audience for this article are people who know at least some computer programming, so I will try to explain it with code.

In the beginning there was trade

Commerce used to mean trading 5 bear skins for 8 amphoras of wine. While this is the fundamentally basic form of trade, we now know this as barter and it is looked at in slightly a strange way or as if it was some sort of novel hack.

Trade is the core operation we are interested in solving

Hides for kebabs?

Barter worked for most of our prehistory, but the moment civilizations started appearing it became obvious that this wasn’t particularly scalable. It is very hard to get out from a subsistence economy with barter. The reason being that different things had different value. How many kebabs can I buy with one cow hide? How many bottles of wine?

Lets say I have a cow hide and I want to buy a kebab. It’s not very practical for me to cut off a small piece of it to get my kebab and a cup of wine. I’d first have to find someone who would be willing to trade it for a bunch of smaller items that I can use to trade something for my kebab.

The other problem is, what if the kebab seller already has bought all the cow hides he could possible need this year? Solving this would be finding out what the kebab guy needs selling my cow hide to someone else for that. This could be quite a long complex change of exchange.

On the second day we had money

Money has several properties that solves the above situation. It minimizes the problems of trading.

I simply sell the cow hide for money. With that money I can now buy any number of things, including a kebab. So there is no longer a need to find a chain of trading partners to be able to finally trade my hide for a kebab.

So money is really an abstraction on top of barter.

Fungibility

Fungibility is the most fundamental property of a currency. Essentially one unit of an asset has exactly the same properties as the next one.

Gold is good example. A gram of gold of has the same properties and value as any other of the same purity. Cow hides and Diamonds are not fungible as each one is different.

In Ruby:

As I said in On currencies, virtual or otherwise my definition of a currency is:

A currency is a fungible asset that can be transferred from one person to the other.

So essentially a Currency is a sub class of Money that is fungible between each other.

Intrinsic or Extrinsic Value

A coin made out of gold is literally worth it’s weight in gold. Many national currency names come from that.

The name Dollar comes from the German word Thaler, which itself is short for Joachimsthaler which means “From Joachim Valley”. This valley produced much of Europe’s silver until the Spanish discovered Peru.

Likewise the British Pound has it’s name from originally literally being worth a pound of sterling silver.

Trade flourished with the introduction of money. Much wealth was created and the logistics of transporting large amounts of it around became an issue. Other people who wanted part of your money, pirated your ships and just plain took it away from you.

The solution was to leave it were it was, in your safe where your army could guard it.

One way of transferring it around was to create a piece of paper giving the bearer of said piece of paper the right to exchange it for an equivalent gold coin. Our paper currency today is a distant cousin of this type of currency.

The second way of transferring it was to keep a book of who owned how much of the gold you held in your safe. In the City of London goldsmiths would perform this service. A transfer was done by instructing the goldsmith to transfer ownership of part of it to someone else. Thats pretty much became what a check is today. Nowadays the bulk of all transactions and currencies are book entry, including almost all electronic currencies. Of course rather than having a guy on a tall chair with a funny hat writing entries in the book, servers perform that same job.

With a few exceptions our money nowadays has no intrinsic value, as the metal alloy used in a modern coin or the cost of the paper has little to do with the value. It still does have value which is called extrinsic value.

This abstraction from intrinsic to extrinsic money is pretty much exactly the same as what happened in programming. Early programmers copied values from memory into registers where operations could be performed on them. Programming was revolutionized by the introduction of pointers.

Modern programming languages like Ruby also hide the concept of intrinsic value as everything is abstracted away into an object which by definition is implemented with extrinsic value. But old C programmers would understand it clearly as the difference between primitive and a pointer variables.

The abstraction away from dealing with values in individual CPU registers and memory registers to use pointers, caused a revolution in programming and made it possible for all the data structures we use today such as arrays, hashes etc. Without these we would never have reached the point where you can sit and read this article on your screen.

A bank note is essentially a pointer to some value stored in a vault somewhere.

Any C programmer knows that memory management is one of the hardest issues to deal with. It is very easy to create memory leaks and allow buffer overflow attacks. This is true as well with currencies.

I will cover promises, the breaking of such and other security issues in the next article in the series.

For the previous articles in the series see On currencies, virtual or otherwise and 4 flavors of the mighty dollar. You might also be interested in Benches, Coffee and Bubbles – The origins of Agile Banking which provides more history.

4 flavors of the mighty dollar

Published December 8th, 2010 edit replace rm!

Continuing on from yesterdays article On currencies, virtual or otherwise I thought I’d look at the US dollar. I’d argue that the US$ is not just one but more like thousands of different competing currencies

Is $100 in cash the same as $100 in my bank account or as part of my PayPal balance? Not really? They aren’t fungible between each other. $100 in cash can be converted to $100 in my bank account fairly easily, but it’s not the same thing.

$100 cash can buy me a case of wine in my local wine store, but it can’t buy me server hosting. So they aren’t directly fungible. There may also be a cost of swapping between $100 in cash and $100 in my bank account, such as ATM and other bank fees.

We can all agree that a $100 bank note is a real US$ issued by the federal reserve. But the $100 in your bank account, while denominated in US$ is actually a different beast all together.

Here is a small set of properties of 4 currencies that you could all label US$:

USD Bank Note USD Bank Account PayPal USD Starbucks Card
Promise Legal tender for all debts public and private On demand exchange for USD Bank Notes Easy deposit to my bank account Redeem for Coffee
Issuer Federal Reserve Bank EBay Starbucks
Backing (some small percentage) in foreign currency and gold reserves 0-10% USD Federal Reserve credits 100% in USD Bank Accounts Deferred revenue
Transferability anyone in same location to other account holders in same bank to most people in industrialized world Starbuck stores and physical transfer of cards
Transfer method Bearer Book entry Book entry Book Entry/Bearer
Yield none interest none none
Storage cost none for small amounts, safe for large amounts fees none none
Transfer cost none for small transactions, Brinks, security guards for large transactions fees fees none
Money supply M0 M1 M1? n/a

There are distinct advantages and applications for each of these 4 types of currencies. Each one may have more or less value to you or your business in a given moment. Banks, PayPal etc essentially make money of this difference in value through transaction costs and arbitrage.

I would even argue that every single bank issues multiple kinds of currency. The balance of a checking account at Ocean Bank in South Florida has different properties as one in CitiBank. For one it’s easier to deposit into a CitiBank account while being in the other part of the country than it is to do so with a local bank like Ocean Bank. A local bank like Ocean Bank might actually have other benefits such as access to local loan managers, that might be more important to you.

Back during the days of Free Banking banks and other businesses actually issued competing paper currencies. These were mostly freely traded at a 1 to 1 value, but if there was a rumor about problems at a bank the value could fluctuate between them. In the days before the FDIC there actually was a real trust difference between having your money in different banks. That is why old fashioned banks often had impressive architecture to show how trustworthy they were.

The traditional non cash payment as used today is generally a complex chain of value transfers between multiple competing currencies. PayPal transparently does this in the background for payments over your PayPal balance. These payments make these competing currencies all seem like one.

In tomorrows post I’ll focus on some of the above currency properties and how they also apply to virtual currencies.

On currencies, virtual or otherwise

Published December 7th, 2010 edit replace rm!

Currency is one of the most popular buzzwords right now and there are lots of different definitions. I’ll try to unify them in some way and talk about some of the issues involved. Over the next couple of posts I’ll try to analyze what currency is.

Maceration of Money

If you ask most people on the street, currency is what they have in their bank account and in their wallet.

Gamers will tell you that currency can also mean numbers on a screen earned and spent within a game.

Silicon valley hipsters will also try to say that Virtual Currency is the latest monetization strategy out there, often without realizing what it really means.

Community activists also like to remind us of all the successful community currencies that have sprouted up in the past few years.

So my first attempt at a definition is:

A currency is a fungible asset that can be transferred from one person to the other.

Now under that definition we may also need to include stocks, options other securities. As they are generally transferrable and fungible. Most people wouldn’t consider them currency, but they fit the definition perfectly. I’m personally quite happy to consider them currencies.

Virtual Currencies?

What makes a currency virtual or not? It’s not wether it has any real value as World of Warcraft Gold clearly has value. I’d say it depends on the backing of it. So an attempt at a definition:

A virtual currency is a currency backed by the promise of it’s issuer.

Closed loop currencies

A closed loop currency is a currency only meant to be spent with the issuer. Good examples are Starbucks Cards, but most game currencies are also closed loop currencies as you can only use them within the games.

What about Whuffie, Page Rank and other reputation currencies?

That is a good question. These are currencies that are objectively awarded and taken away based on your standing/actions in a community. Pagerank is often also described as a currency. Most of these break my definition above as they aren’t generally speaking transferable.

Whether they are really fungible is also a good question. A Google PageRank of 8 would have to be worth 8 times a PageRank of 1. But clearly that is not the case.

In my next post I explore a few different flavors of what many of us think is just one currency, the all mighty US Dollar.

How OAuth beat Chip and Pin

Published February 12th, 2010 edit replace rm!

2 news stories on the same day are quite interesting in their contrast.

Pin and Chip is broken

The first one has the collective might and minds of the European banking system and their suppliers who overlooked a slight issue in their authentication protocol for authenticating Chip cards with a pin number. In Europe most Visa/MC cards are smart cards and have to be authenticated with a pin. This in theory allows for an authenticated payment message.

Only problem was that, well one very important bit of the message was not authenticated leaving a gaping hole. I won’t go into the details as well as Ross Anderson does. He is one of the security researchers who discovered the flaw. Unfortunately it sounds like carders discovered it before them.

Now what to do with these supposedly safe authenticated transactions? There is no way of knowing which ones were fake. You can’t mass revoke all european cards. Some one is in a bit of a bind right now.

Grader’s security screw up

The second story was about HubSpot a Cambridge, Mass. based startup who self admittedly screwed up and let a malicious user comprise the security of their Grader service a rating service for twitter users.

Granted we are not talking about a system that handles the majority of Europe’s electronic point of sales transactions here. But they know they screwed up. However due to the fact that Grader used OAuth they were able to mitigate any damage pretty quickly by asking Twitter to revoke their Consumer credentials and any tokens they had issued to it.

Revokability

The difference is that while both Chip and Pin and OAuth are ways of doing delegated authentication, the only token to revoke in the Chip and Pin scheme is in the card itself. The standards behind Chip and Pin assumes that it’s technology is perfect and through their rule books that all parties involved along the long chain from the card to the issuing bank can automatically be trusted.

This is basically the exact issue I described in The sorry state of Payment Standards.

OAuth does not define how a user authenticates himself to either of the services involved, rather it is focused on the delegation.

The delegation is done in the form of an authorized token that can be equipped with limits and can at any time be revoked. It is under the control of the user. In this case Grader themselves request the revocation as they knew that all of their credentials were compromised. Where do the European bankers even start to clean up this mess?

I think OAuth a simple (as authentication standards go) standard developed on a mailing list by a small group of developers has incredible potential in payments applications. This is of course why we picked it as one of the fundamental building blocks for OpenTransact.

Is OAuth perfect? Probably not. Nothing is 100% secure. It has had one serious security flaw which was fixed. But by design it is revokable. You can do something about it if something goes wrong. There is now an IETF OAuth Working Group working on making it an official internet standard.

OpenTransact a tiny payment standard

Published February 11th, 2010 edit replace rm!

As I mentioned in my last post The Sorry state of Payment Standards I wanted to blog about OpenTransact which so far is probably one of the most important outcomes of the Agile Banking mailing list set up after my talk last year on Agile Banking.

OpenTransact was designed to be very simple and is based on REST the best practice for current web API design. It should be so easy to implement for developers that there really shouldn’t be an excuse not to implement it.

An OAuth authenticated HTTP POST request to assets URL containing the parameters amount, to and optional memo field. Payer is deduced from the OAuth token.

eg.

POST /transactions/usd HTTP/1.1
Authorization: OAuth ... oauth_token="ad180jjd733klru7", ...
Content-length: 239

amount=10.00&[email protected]&memo=Milk

The above example shows a payment of $10 to [email protected] from the user who authorized the “ad180jjd733klru7” OAuth token.

Using the Ruby OAuth gem you would write the above as:

@token.post "/transactions/usd", :amount=>10, :to=>"[email protected], :memo=>"Milk"

That is pretty much it. But please do read on for more about motivations, issues and applications.

About me

Pelle gravatar 160

My name is Pelle Braendgaard. Pronounce it like Pelé the footballer (no relation). CEO of Notabene where we are building FATF Crypto Travel Rule compliance software.

Most new articles by me are posted on our blog about Crypto markets, regulation and compliance

More about me:

Current projects and startups:

Other under Financial Innovation

Popular articles

Topics: