Ripple as middleware

As many people may know, the current banking system is a mess when you're dealing in multiple currencies. We have disjointed networks dealing in local countries, the eurozone, and international banking on a wider scale. Using Bitcoin means having to hop onto the currency and off of it on two exchanges. There is friction at every step and companies have to focus on creating big end-to-end solutions rather than focusing on just the part they can do really well. However, I believe all of this can be simplified if we used a system like Ripple as a middleware layer.

The current situation

Currently, there are many disjointed markets out there. If you want to exchange fiat currencies, you go to a forex. If you want to buy Bitcoin, you go to one of the numerous local exchanges. For altcoins, you will most likely need to go to one of the handful websites that specializes in them. All in all, there are many problems in efficiently dealing with say, exchanging precious metals for altcoins.

Ripple as a solution

While Ripple might not be able to completely replace centralized markets that have high transaction volume and extremely low latency, it could be a good enough approximation for a lot of the projects out there.

First step in doing this would involve the creation of various gateways for the currencies we wish to use, be it USD, gold or whatever else. Since the gateways can focus only on one thing at a time, creating them is more straightforward than bringing newer and newer exchanges onto the market. If you can only handle Bitcoin but can't make a trade engine or handle fiat, you're still in business.

The second step would be copying the existing markets into Ripple through automated arbitrage bots. For example, you could take Bitstamp's USD-BTC market and post trade offers in Ripple to mimic it, although with lower granularity. When a trade is made on the network, the bot would offset it at the exchange and create profit. Given enough bots, we can represent any number of financial exchanges inside of Ripple, no matter what currency they're dealing with.

The third step would be building services that use Ripple as middleware for their payment network. Say we want to tackle Europe<->Canada money transfers. We would connect to a gateway in Europe and a gateway in Canada. When we see a Euro payment on one end, we send it to the first gateway, use the Ripple network to trade it for Canadian Dollars, and send the money out on the other end as needed. Provided we have some floating balance on both ends, we just completed an international wire transfer in 5 seconds at a fraction of the cost.

The last step would be...

Optimization through competition

Obviously, the markets will only use a product if it’s competitive and affordable. Nobody will want to pay a premium to use one product over a cheaper one with the same features. However, the beauty of this approach is that all components are interchangeable and the best ones will win.

Looking at our BitPay example, their business can be broken down into the following components:

  • The frontend gets the current exchange rate and accepts payment for the goods from the user, eventually forwarding the coins to the exchange
  • A server offsets the trade at an exchange
  • A banking component withdraws fiat from the exchange and pays the merchant in their currency of choice

In Ripple those components could be run by different entities:

  • A system like BitPay would accept customers’ coins and use Ripple to pay the merchant. They could trade the coins directly for any fiat or any other currency on Ripple, and once the funds are secured, release the payment.
  • Trades would happen atomically in Ripple. No matter how many currency hops it requires, a trade could be made with one transaction. The Ripple network will find the most efficient route on its own.
  • Any trades happening in the Ripple system would be offset by independent bots arbitraging between Ripple and various exchanges (forex, Bitcoin exchanges, etc.)
  • Merchant payouts could be handled by dedicated gateways or payment processors working with the gateways. Say, any funds deposited to a given Ripple address could be paid to a specified bank account at the end of the day.

Since the system does not require one company to handle all of those steps, multiple entities can be competing against one another to build the most efficient pieces of the puzzle, and the system as a whole would benefit. If one arbitrage bot is replaced by another that has a tighter spread - the prices go down. If someone makes a direct market between two distant currencies - the network will route through the new path, saving money. If a new payment processor comes along, they don’t need to reinvent the wheel, they use the established network and focus on making a better product. All of the components are interchangeable, and the most efficient ones will win in the end.

Possible applications

Here is a list of applications that can easily use Ripple as a middleware money network, given enough development in the space:

  • Payment processing between any currencies (BitPay, Coinbase, PayPal)
  • Exchanges (using Ripple as an exchange engine)
  • Remittance and other international payment networks (Western Union, PayPal)

Near future developments

If our guess is correct, we expect to see the following projects to start appearing in the Ripple space in the near future:

  • More fiat gateways. They should appear in places financially close to big exchanges making payments between them easier. Alternatively, big exchanges will become gateways as well (like BitStamp)
  • Given efficient gateways, arbitrage bots will appear converting every Bitcoin exchanges’ market into Ripple. We’ll see BTC-e’s LTC/USD market reflected in Ripple, BTC China’s BTC/CNY market, and many more
  • Arbitrage bots will start appearing next to large forex markets, bringing in efficient fiat<->fiat exchange rates into Ripple
  • Given some of those, payment processors like BitPay will start appearing in the Ripple space offering payments to any currency accepted by the merchant
  • Either gateways will start offering new and convenient ways to convert people's traditional money into Ripple IOUs (say, through credit cards or other automated systems), or we might see companies like Coinbase appearing to offer this sort of services for them


As I wrote in a previous blog post, cryptos will succeed if the banks are failing. Due to the many inefficiencies of the current international payment systems, it is very likely that a system like Ripple would be used more and more as a common middleware to enable interoperability between many networks.

Recommended reading:


The need for a new measurement of value

As many of you might be familiar, there are a few key functions money needs to perform in our society. While the exact list may vary, here are some of the functions listed:

  1. Medium of exchange
  2. Measurement of value
  3. Standard of deferred payments
  4. Store of value

Today, I would like to talk to you about the measurement of value function of money in the context of the "Currency Wars".

Measurement of value

Money being used as the measurement of value (or a unit of account) means that we use the money units to denominate how much other things are worth. It is useful to have this standard reference because then we can compare things that would be otherwise hard to compare. While it might be easy to estimate that a loaf of bread is worth about a few buns, since they both fulfil a similar role and are essentially interchangeable, it is much harder to compare how many loafs of bread would be equivalent to a book in a pure barter system.

With money, everything is compared to the same unit of money, be it dollars, euros, bitcoin or otherwise. As such, everything has its own price and all of the prices are easily comparable, making everyone's life that much easier.

Currency wars

The topic of currency wars is rather big, and I don't think this post will do it justice. I recommend the book "Currency Wars" by James Rickards to learn more about this subject.

The short of it is, that a currency war, also known as competitive devaluation, is a competition between countries to achieve a relatively low exchange rate for one's own currency in comparison to everyone else. While at first it may sounds like a silly idea, after all, the stronger your currency is the more you can buy after all, it does make sense when you think about the state of your domestic industry.

If one's currency is going up in value relative to everyone else's, you will have more imports (you can buy more), but less exports (your products will become more expensive for everyone else and thus less attractive). In order to stay competitive on the global market, you want to reduce the cost of producing your goods. You can either do that through a long process of technical innovation and so on, or you can go the fast route and make your currency worth less. Since your money will be worth less, the wages you have to pay your employees are smaller, the cost to run your company are smaller, and thus your product gets cheaper.

This can be quite insidious, as it essentially means cutting everyone's wage without their consent or knowledge. One dollar today is worth less than one dollar last year and so on. Here is some rough overview of how much $1 is worth as expressed in 1913 dollars:

New measurement of value

As the money all over the world is fluctuating in value, its use as a measurement of value is a bit ridiculous once you think of it. You could compare it to trying to measure a height of a wave on a stormy sea in relation to other waves. We need a new form of measurement of value that would form a solid ground amidst the currency wars storm.

The reasoning as why we would want something like this is simple - for a lot of people, they would want to be earning the same value performing their jobs and pay the same value for their goods and services, no matter how much their local currency is fluctuating. This would allow them to detach themselves from the monetary policy of their countries that are doing their best to run it to the ground. Having an absolute measurement of value would promote real growth and innovation in becoming more and more competitive, rather than fake growth brought about through inflation.

As for what this measurement would be, this might be a bit complicated. If it was a commodity like gold, everyone would start hoarding it and its value swings would affect the economy. It cannot be a national currency, since those are too easily printed and manipulated. It cannot be a currency like Bitcoin, since it can be too easily gamed through a cycle of hoarding to increase its value and releasing to flood the market. I doubt there is anything that could be used as money in traditional sense that could be used for this purpose.

At the same time, none of this matters if we don't make it a currency. If instead, we take the VALUE of anything, be it $1 today, 100 years ago, 1BTC from January 1st 2015, or some handful of magical beans, and use that VALUE as a new standard for measurement of value of everything else, it would become like a metre stick (of for folds on imperial system, a yard stick) for the economic world. A metre is not a measurement of anything in particular, it's not a metre rod of iron, or a metre of water, it's a metre no matter what it's measuring. Similarly, our new Value Stick could be use to measure how much a dollar is worth and how much a euro is worth without actually being anything in particular.

So instead of seeing tags with dollar prices, we could see tags with Value prices, and an exchange rate of Value to dollars or any other currency, perhaps computed on the spot, like in BitTag:


In a world where countries go out of their way to change the value of their currency, we need a new standard for the measurement of value that is independent of any national currency, commodity or otherwise.


Crypto success vs. Bitcoin success

After researching a lot of Crypto 2.0 systems (tiny.cc/Crypto), I started thinking about whether some systems could surpass Bitcoin. We have a lot of proponents of a world with only Bitcoin, only some Bitcoin copy, or all of the cryptos going the way of the dodo. While I'm personally a proponent of the Singularity of Money concept (a world with many interchangeable currencies), it is still interesting to ponder whether Bitcoin or cryptocurrencies in general will gain mass adoption among the general population.

Thinking about this for awhile, the conclusion seems to be that

Cryptos will succeed if the banks are failing. Bitcoin will succeed if the governments are failing.

Let me explain why.

People want faster horses

A lot of you should be familiar with the quote allegedly by Henry Ford - "If I’d asked people what they wanted, they would have asked for a faster horse". A similar sentiment can apply to cryptos. People don't want a new currency, they want their old currency to be better and faster. People are used to thinking in USD and Euro, not Bitcoin or Dogecoin. It would take a lot of mental effort for people to switch over to a new currency, and that might be a large barrier to overcome, not to mention the issues of price stability and so forth.

At the same time, if you have a system that offers what the banks offer only better, you are very likely to be able to compete with them. This is why PayPal and Alipay are very likely to be used for online payments, while bank wires in North America are not as popular.

Banks surround themselves with a lot of policies and discriminate against their customers. International payments are a pain, credit cards are outdated and the whole system is filled with inefficiencies. As such, if you'd have crypto systems that allow you to pay in your national currencies only better and faster than a bank, those systems are likely to succeed in the modern world.

It is very likely that the 2.0 systems that allow people to deal directly with their local currencies without jumping through random hoops will thrive in the near future. Ripple is already positioning itself to be "the internet of money" and appealing to the current financial systems.

While Bitcoin and similar systems might be a part of the solutions used, it might also be seen as an unnecessary step when it comes to money exchange not denominated in BTC. However, there are some cases where Bitcoin might be the solution needed

Governments failing

If a national currency is stable, people want to use that currency. If the national currency is not stable, people want to get rid of it and use something else. If you're in a country like Argentina or Venezuela with an inflation rate of 10% or even 60%, or perhaps have experienced the Cypriot financial crisis or the more recent fall in the price of Russian Rubles, you might be thinking to yourself "I don't want to use this currency any more".

At times like these, we start looking at alternatives - gold, dollars, franks, etc. However, those can be seized or frozen. A more modern alternative would be to look at cryptos.

And herein lies the strength of Bitcoin. While it might look unappealing to the western world, it offers an alternative to people that are losing it all. It is apolitical, not controlled by any government and is easily transportable. As such, in a world where the governments fail everyone with their monetary policy, Bitcoin and similar currencies have a room to thrive.


It is very likely that cryptocurrencies will succeed in the near future due to the stagnation in the modern world. However, for Bitcoin to become widely adopted, we would need to see entire regimes start to fail and people wanting to take their economy into their own hands.


How to kill a currency

A lot of people have spelled Bitcoin's doom in the past. From a 51% attack to some other vulnerabilities, a lot of technical pitfalls are well known and documented. There is a whole Wiki page on this subject, and I even wrote a master's thesis on the subject. So while Bitcoin looks like it's around to stay, there are many other cryptocurrencies emerging nowadays that can be wiped out in some interesting ways. Lets discuss some of them.

Destroy the value of a currency

First off, a quick recap of the obvious for completeness sake:

The traditional 1.0 copycoins are perhaps the easiest to bring down. Their network is secured by the miners (in case the coin uses PoW) and in return the miners get paid in coins they mine. However, if the value of the coin was attacked, the miners wouldn't have any incentive to mine it. They would need to be subsidized by the people running the network. As I discussed before when talking about Quark, a repeated 51% attack coupled with double-spending various crypto-to-crypto exchanges would quickly ruin the coin's reputation and get it removed from all services, thus destroying the coin's value.

Now with that out of the way, lets talk about some new stuff.

End the "blockchain bloat"

The topic of blockchain bloat has been a heated topic in the Bitcoin community for a few years now. It started with SatoshiDice sending a lot of 1 satoshi transactions, and the topic got more interesting with the advent of Bitcoin 2.0 technologies. By "Bitcoin 2.0", I mean Crypto 2.0 platforms that use the Bitcoin blockchain as a store of their data. For example - Mastercoin and CounterParty. While those systems use the Bitcoin blockchain because they can rely on it being a universally stored immutable record, at the same time they are reliant on the network accepting and storing their extra data. This could be their potential downfall.

There are some people out there that could be called "Bitcoin purists". They create transaction blacklists to hamper the propagation of transactions from Bitcoin 2.0s and other blockchain bloaters. While those blacklists might be effective if there are a lot of nodes running this code (which is rather unlikely), a more insidious attack would be to convince the mining pools not to include data from the Bitcoin 2.0 platforms. As mining becomes more concentrated in big pools, and the mining profit margins become thinner and thinner, a few pools might welcome a subsidy from a purist or a 2.0 competitor.

Moreover, due to how Bitcoin works, this blacklisting can be quite easy to execute. Someone wishing the bloaters gone could check each block for those transactions. If there were no such offensive records in the given block, the attacker could just send the subsidy to the address from the coinbase transaction. This way one can reward censoring pools without even knowing who the parties involved are. You just have to let them know the rules of the game through an email or some public announcement.

To counteract this, the Bitcoin 2.0 would have to rely on the goodwill of the honest pools, increased transaction fees to give the pools an incentive to include their transactions or a direct subsidy from the 2.0 developers to the pools to let their transactions in.

All in all, this seems like an easy way to carve out your competition in the future if the competition between the Crypto 2.0 platforms will start to become more and more fierce.

Unenforceable embargoes

Many countries use the banking system and the flow of money as tools in their political regime. There is a lot of pressure to keep some countries, such as Iran or North Korea, from being able to deal with the rest of the world. However, in a decentralized Crypto 2.0 system, either everything goes or the system goes. This may very soon create a situation where the unstoppable force of innovation from the crypto space will meet with the unmovable object of nationalistic policies. In the end, only one will be able to prevail.

This issue affects a system like Ripple and Stellar the most. In those 2.0s one can freely trade between any pair of currencies. This means that if say, we have USD issued by a bank from the States and IRR issued by a bank from Iran, one can trade the USD for IRR just as easy as one would trade USD for EURO.

As the systems don't distinguish or discriminate between any currency or issuer, this makes the monetary sanctions unenforceable in the system without completely shutting the network down.

If this issue would ever come up, this would probably be the biggest legal battle a crypto system would have to face. Can a company develop a software that is by its very inclusive nature allowing some people to break the law? Can such a system be allowed to exist and run? Perhaps a combined pressure from a hegemonic government and oligopolistic banks would be enough to drive the crypto scene underground. However, given another outcome, we would see that the emperor has no clothes and progress cannot be stopped...


There is more than one way to kill a crypto. You can either attack its value to grind it down to dust, pay the miners to censor it into oblivion, or challenge the status quo and see what remains after the battle.


Convenient bugs and arbitrary features

As with any software out there, Bitcoin and related cryptocurrency systems occasionally get bugs and change some features of the network. That's to be expected - one needs to adapt to the changing world or the software will become useless, especially so when we're talking about moving money around. However, in the recent times I've noticed a few Crypto 2.0s dealing with issues that could be an interesting study into the incentives of their developers.

Keep in mind, I will be speculating a bit in this post. It can be safely assumed that unless there is evidence to the contrary, the various development teams have everyone's best intentions in mind when working on their software and as such any perceived malice is only in the eye of the beholder. Similarly, since software development is essentially using finite human resources to patch up seemingly infinite amount of bugs, there are priorities for what needs to get fixed when.

With all that in mind, lets discuss some convenient bugs and arbitrary features.

Convenient Bugs

What do I mean by convenient bugs? Generally, a bug is an unexpected way a piece of software behaves. Most often, it's an undesirable behaviour for the users - if it was desirable, it would be turned into a feature. However, what if a bug for the users can be seen as a potential feature for the developers or investors? That's what I would call a "convenient bug" - an error in the code that you don't want to fix too quickly since it unexpectedly rewards you for not fixing it.

Ripple fee spike

About two months ago some people reported a sudden spike in the load on the Ripple network. In turn, that spike caused the fees enforced by the network to go up by a factor of 1000. This means that a fee that used to be negligibly small suddenly started creeping to the level of a penny per transaction.

While that might seem like much, keep in mind that unlike Bitcoin, the fees are not transferred to the miners, as Ripple has none of those, but are instead burned. As such, the amount of XRPs in the system decreases in theory enriching everyone that holds XRPs. Since Ripple Labs holds most of the XRPs, they earn the most for this fee being left at a high level. As such, this convenient bug creates an interesting incentive for the developers to label it as "minor" and not fix it for awhile, conveniently earning them more and more money.

While the amount is small for now and I doubt the developers are this greedy for some pennies, some other system might encounter a similar bug in the future and the incentive might be greater to just let the bug stay for awhile...

Counterwallet BTC trading

On the Counterparty network, one can issue any asset and trade it for either XCP or BTC. Since BTC has a longer track record than XCP and has more established value, the usual issue applies - why would you want to use another token if you can use Bitcoin? While the network does burn some XCPs to create assets, there doesn't appear to be much use for the tokens over Bitcoin in the network. Well, at least until November that is...

At the moment, Counterwallet is the only Counterparty wallet, at least to my knowledge. In November, the wallet developers addressed some issue with the wallet having problems using BTC to trade assets on the network and removed the functionality. As such, it became impossible for people to trade Counterparty assets for anything besides XCP.

While the reasoning behind the scrapping of the feature is fairly reasonable - technical limitations from the Bitcoin network and so on, some people looking for a conspiracy could see this as a move to force people to use XCPs and thus increase their value for the holders.

Arbitrary features

While convenient bugs come from the software not working as initially intended, arbitrary features are deliberate changes made to the software to achieve new and sometimes undesirable functionality.

Mastercoin fee structure

For awhile now I wondered what use are mastercoins on the Mastercoin network? Early on Mastercoin didn't have much of fee structure and as I was told you could trade any token for any token on the network as well, thus there was no need for MSCs to really exist. Well, at least until June of this year.

Almost a year after Mastercoin was launched, the developers introduced a new fee into the system - a fee for fundraising. While that's understandable way to prevent network abuse, the form it took really stood out to me as greedy. While on Counterparty one is charged a fixed amount of XCP for asset creation, Mastercoin instead used a percentage fee. 0.3% of money raised would be converted to mastercoins and then burned by the network.

This arbitrary fee essentially became a way for people that hold mastercoins to monetize their investments. Since there would be a constant buying pressure from new assets being created on the network and no downward pressure from any new MSCs being created, the tokens are bound to increase in value over time.

While the previously listed bugs could be explained by the network or software behaving unexpectedly, I am still to hear a good reasoning for why this arbitrary feature was introduced to Mastercoin.


In conclusion, there are many factors that may influence how a decentralized financial system is developed. While one can hope that most developers will do their best to stand for the majority of the network and look out for their best interest, there might be some that would be catering to a minority that holds enough money to sway some interests...


The paradox of presales - pondering Gems

A few weeks ago during one of the Vancouver Bitcoin Meetups, we were introduced to the Gems platform. Gems is a social messaging app that allows the users to talk with other people securely and send them crypto tokens easily. Another big feature of the platform is that people can get paid to receive ads in the application straight from the advertisers, creating a new kind of relation between them and the consumer. The topic that sparked the most interest and a heated discussion, was the token presale and a small paradox it created.

Gems platform is issuing its own currency in a form of 100 million gems. Some of those tokens will be airdropped over the course of a few years, some will come in form of bounties, and a number of them will be sold during the presale to fund the project. The gems will have value on the platform because they will be used to create and pay for ads that will be displayed on the Gems network. In other words, advertisers will have to buy gems so they can pay people to view their ads. Seems simple enough.

However, as is usually the case with token presales, the first thing people ask is "why would I want to use gems if I can just use bitcoins?". The change would be simple enough from a development perspective - if a network can handle payments in gems, it should also be able to handle payments in bitcoins. Starting from this assumption, gems are an unnecessary level of abstraction - most people will prefer to be paid in Bitcoin, and most advertisers will be able to pay them in Bitcoin, so going in and out of gems just to display the ads seems unnecessary.

However! There is a third side to this coin. The most basic function of any presale is to earn money for the developers to be able to actually create the product. As such, if the Gems platform did not use gems instead of bitcoins, the developers wouldn't be able to keep the current platform design and still have money to build it. By introducing the gems, the developers can sell the tokens to raise the money to build the Gems platform.

And here lies the paradox of (a lot of) presales. In order to create a compelling product through a presale model, a developer needs to create a new token and integrate it with the platform. However, by the simple fact that the platform uses a new token rather than Bitcoin, it becomes less desirable to the end users. Without the token, there can't be a presale and thus the end product might not be made.