On swap fees: the greedy and the wise

Nicholas Platias
Sep 9, 2019 · 8 min read

Terra has been designed as a family of stablecoins that are frictionlessly swappable. UST, pegged to the USD, can be swapped to KRT, pegged to KRW, with little to no friction. The motivation for this design was two-fold:

  1. We plan to make Terra widely used in multiple markets, each with its own regional currency. A locally pegged Terra is key for low-friction everyday use.
  2. There is substantial need for low-friction cross-border transfers, usually involving currency exchange. The $600+ billion global remittance market is a key use case.

The remittance opportunity

The global cross-border money transfer market, and particularly the remittance market, presents a huge opportunity for disruption. Global remittance — transfers from developed to developing countries — has grown steadily over the past five decades as can be seen in the following graph.

Remittance still represents only 6% of global cross-border transfers between individuals and small businesses. Nonetheless, it is the most prime for disruption as a result of the usurious fees money transmitters charge to facilitate them. The global average cost of sending $200 cross-border in 2017 was roughly 7%. This cost has barely declined over the past decade, despite the proliferation of alternatives to traditional money transmitters.

The cost of transfers that involve minor currencies can be significantly larger than this. Wiring $200 from South Africa to Nigeria can take days and costs over 25%, according to the Economist.

Cross-Terra swaps can offer a vastly simpler and more affordable solution to currency exchange and cross-border transfers. By virtue of eliminating middlemen and not being dependent on traditional payment rails, exchange can theoretically cost up to nothing, while transfer is subject to the minimal on-chain Terra fees (currently at 0.1%).

The use of swaps for speculative trading

An unintended consequence of frictionless cross-Terra swaps is that they also permit frictionless forex trading, allowing speculators to make positional bets on their favorite currencies. For instance, a speculator who wants to bet that the USD will appreciate relative to KRW could sell her KRT (KRW-pegged) for UST (USD-pegged), later sell the UST back for KRT in hope of a profit.

The following graph of the KRW/USD exchange rate in 2019 illustrates the point. Say that a trader wants to make a bet against the KRW, e.g. because she predicts a weakening Korean economy. She starts with 100,000 KRW on January 1st, which she trades in for 100,000 KRT and then swaps for roughly 90 UST based on the prevailing exchange rate, all with near-zero fees. In mid-August, when the USD/KRW exchange rate reached nearly 1,220, she swaps her UST for 109,800 KRT, which she trades in for 109,800 KRW. The trader has earned a handsome 9.8% profit in KRW terms as a result.

The problem with trading via Terra swaps is that the counter-party is the system itself — meaning every Terra and Luna holder. The system profits when the trader loses, and loses when the trader profits. In practical terms, the trader is able to issue new Terra via profitable trades (as in the earlier example), and burn Terra via unprofitable trades. The ability to do so violates one of the foundational principles of the Terra stability mechanism: Terra supply changes only in response to changes in Terra demand, which is how Terra’s price remains stable. In the USD/KRW trade above, demand for Terra did not change — the trader sold her KRT to lock in KRW profit. She was therefore able to issue Terra at the expense of Terra and Luna holders.

There is little reason to believe that the savviest of forex traders will move their business to the Terra platform. In fact, there are limitations to forex trading via Terra swaps, which we describe later in this post, that make this method fundamentally inferior to alternatives. Nonetheless, the ability for speculators to profit from exchange rate fluctuations against the system represents a downside risk that we want to minimize. Facilitation of speculative forex trading was never the goal of Terra swaps.

The line between remittance and trading

We are therefore faced with the following problem: how do we design Terra swaps in such a way that cross-border money transfers are frictionless, while currency trading is expensive?

To address this question, we compare key properties of the remittance and currency trading markets to hopefully identify a line that we can draw between the two. We make the following observations:

First, the cost of remittance is substantially higher than the cost of currency trading. While the global average cost of remittance is a usurious 7%, the cost for a retail investor to trade online a relatively liquid currency pair like USD/CHF, including market spread and broker commission, is on average less than 2 basis points, i.e. 0.02%. The cost of remittance based on those numbers is 350x the cost of trading, two orders of magnitude larger.

Second, the average remittance amount is substantially lower than the average size of a forex trade. The global average monthly remittance from developed to developing countries is $200. Average forex trade sizes are significantly larger — usually in the $100K’s for retail investors and often in the $ billions for institutionals, in other words, three or more orders of magnitude larger.

Third, the majority of forex trading, including retail, is highly leveraged, meaning that trade sizes are large multiples of account balances, often as high as 400x. The provision of margin for leveraged trading is an essential service that brokers provide to their clients. “Leveraged remittance”, on the other hand, has not been invented yet.

It is clear from the above observations that remittance and forex trading differ vastly in terms of their transaction amounts, cost and required services. To facilitate the former, while discouraging the latter, cross-Terra swaps should:

  1. be substantially cheaper than remittance, yet more expensive than forex trading
  2. be frictionless for small amounts, yet penalize large amounts

In addition to the above, the lack of a Terra margin offering tailored to forex trades makes trading with Terra swaps a priori uncompetitive to existing options. When a liquid Terra lending market does emerge, the above measures ought to make sure that Terra swaps are a strictly inferior option to traditional alternatives.

In summary, remittance and trading are fundamentally different use cases, with different audiences and market structures. We can draw a line between the two by making the remittance use case low-friction, while making trading high-friction and uncompetitive to existing options. We are thus protecting the Terra system from speculators attempting to profit against it. We are re-designing the cross-Terra swap mechanism for Columbus 3 to implement those changes. To penalize large transactions we implement swaps using a uniswap-like mechanism which quotes different prices for different trade sizes. Read more about the intuition behind this design in our earlier post on automated market makers.

The dream of zero-fee swaps

One of the consistent themes in blockchain rhetoric is eliminating fees and vilifying middlemen. Low-friction transactions and elimination of useless third parties are, in fact, core to Terra’s ethos. Terra has saved e-commerce companies more than $500K in fees in the past two months alone via its payments partner, Chai.

In the spirit of completely eliminating fees, we implemented cross-Terra swaps with no fees at all. As the earlier discussion should make clear, this is dangerous: it facilitates free currency trading irrespective of trade size, thereby providing a superior fee structure to forex platforms. As we demonstrated, trading using swaps creates downside risk for the system and can violate Terra’s foundational stability principle. Swap fees are therefore essential for the security of the system.

A second reason for the necessity of swap fees that we recently discovered is protection from front-running. Last month the following exploit took place: a trader was able to make profitable on-chain swaps during a period of high currency volatility by using forward information on exchange rates relative to those available on-chain. This was possible due to the delay in oracle prices relative to the global forex market, which tends to be greater than one minute. By having access to a live forex price feed, the trader was able to capitalize on the delay by executing a handful of risk-free profitable swaps. While the profit from those trades was very small — the most profitable trade earned less than 8 basis point (0.08%) — it is a loss for the system that must be averted in the future. The exploit was made possible because the on-chain market charged zero fees. A very modest fee of 5 basis points (0.05%) would have made all of the trades unprofitable — this is because two swaps were required to capture free profit. To solve this problem formally we calculated worst-case profits from exploiting delayed oracle prices using historical forex data, and used the results to calculate the requisite fees to make this kind of exploit unprofitable. To learn more about the exploit and our solution read this blog post.

The general pattern that emerges is that fees are required for secure functioning of on-chain swaps. This should have been obvious, in retrospect: virtually all currency exchange globally incurs a fee. This is not always because of greedy middlemen. In every trade there is a “maker”, who provides a price, and a “taker”, who takes it. The market maker is providing a service by offering liquidity. Market making entails risk, such as quoting an unfavorable price, taking an undesirable position and holding inventory, all of which need to be compensated. Large trades are more expensive to accommodate, as they can move market prices and create higher inventory risk (the risk that the market maker will not be able to offload the position at a favorable price). They therefore tend to charge higher fees. All of those principles equally apply to the Terra system, which acts as the de-facto market maker for on-chain swaps. The front-running exploit we described earlier is a typical example of a market maker quoting an unfavorable price. Fees are therefore not a priori “evil”, but rather essential for any market to function.

Terra Money

Terra is a price-stable cryptocurrency that will power the…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store