Setting the Stage for Econia

Markets, Computers, and Global Economics

Econia Labs
Econia Labs
10 min readMay 16, 2022

--

Markets as a tool

The global economy, and as a result, human prosperity, is built on markets: buyers and sellers meet in a shared venue and exchange goods or services, setting a nominal price according to the collective analysis of all market participants. In deciding at what price they are willing to buy or sell, individual humans act as a neuron in a distributed financial brain, which has the emergent behavior of pricing resources relative to one another, thus facilitating their allocation according to the combined decisions of market participants, direct and indirect.

Questionable decision-making notwithstanding (e.g. “Why would someone be willing to pay x dollars for y?”), markets in general are a computer that synthesizes the financial information communicated by people’s decisions, and to that extent markets are a tool. Ultimately it is up to humans to decide how they want to use this tool, or more specifically, what they collectively value on an emotional level (Lower prices or less pollution? Higher investor returns or higher wages?), but once they have chosen, markets are the means by which they build the world according to their shared economic image.

Markets exist in a variety of forms, and one such instructive variant is the bazaar or souk, where merchants gather in a city center and sell foods, linens, and other physical goods, priced against a medium of exchange known as a currency. For instance:

  • 12 apples for 5 shekels
  • 100 shekels per rug
  • 20 currants per shekel

Currencies are basically a shared delusion, to the extent that they only have value so long as everyone agrees on using them, and they too come in a variety of forms: cigarettes, for example, are commonly used as currency in prison. Outside of prison, however, the most common form of currency is known as a fiat currency, which means that a government simply declares it: the United States, for instance, simply declares that the US Dollar (USD) is a currency, and mandates that its citizens use it to conduct their economic activity.

An agreed-upon currency is a fundamental market component because it frees people from having to barter for the goods they want to transact (e.g. “How many apples for one rug? For 5 pairs of shoes?”), and, for the present discussion, because it facilitates a phenomenon known as arbitrage:

  • Merchant A is selling apples at a price of 5 shekels per dozen on the east side of the bazaar
  • Merchant B is selling apples at a price of 7 shekels per dozen on the west side
  • So, arbitrageur C buys apples from A and sets up shop right next to B, selling apples at a price of 6 shekels per dozen (charging a premium for the cost of transport)*

C thus profits from reducing an inefficiency in the market, whereby apple prices were disparate in two places, and consumers now experience less variation in apple prices between the east and the west side.

* This example does not necessarily entail arbitrage in a strict sense of the word, but the term is still used for illustrative purposes, namely, to highlight that price inefficiencies can be exploited for profit.

Trading symbols, inefficiently

For the last several hundred years, markets have been used to sell not just apples or rugs, but also shares in so-called joint-stock corporations, which allow people to pool together resources and coordinate enterprises ranging from manufacturing, to farming, to basically anything that is legal in the given jurisdiction. Initially, shares of these corporations were represented by certificates or other physical manifestations, but over time they came to be represented by symbols in a computer, a development that partially unified stock markets and reduced opportunities for fraud or arbitrage. However, stock markets came to be presided over by national governments, who typically exclude other country’s citizens from investing directly therein, and stock markets’ operations came to be conducted on centralized databases owned by powerful financial institutions that auction off access to other powerful financial institutions.

Even for a middle-class citizen in the United States, for instance, who can invest in American corporations in the first place, their digital orders to buy or sell shares will pass through several middlemen en route to the trading database, with a cut taken at each level. Moreover, given that centralized financial institutions sequence all of the orders, they can look at trading data ahead of time and insert their own orders as they wish, conducting so-called front running, a kind of privileged arbitrage across time that further saps value from the system. Hence, the providers of the existing financial services infrastructure simultaneously reap massive profits and exclude participants, generally leeching off value from the global financial computer that they claim to hold in high regard, but which they actively render less efficient through parasitic tactics.

Moreover, markets are disjointed, with different companies trading on the New York Stock Exchange (NYSE), the NASDAQ, and the Shanghai Stock Exchange, for example, the 3 largest exchanges by trading volume, and these markets are not even open at the same time. What’s more, the top two global exchanges by volume are also both located in the United States, thus centralizing global wealth in one country, and on top of that, the country in question routinely employs coercive strategies in the interest of maintaining its fiat currency as the global standard. Different computerized exchanges exist for commodities like grain or metals, financial instruments like bonds that let cities, for instance, raise debt and build schools, and in each sector, there are operational inefficiencies, middlemen, and barriers to entry that hinder economic coordination and siphon off value to the arbiters.

Yet until now, there has not been a viable alternative to this model, because there has not been an agreed-upon global venue where computerized markets can be established, a credibly-neutral database that can track ownership of digital symbols, thus facilitating the exchange of various resources across borders. Until now, digital technology and communications methods simply have not been sufficient for the demands of a global digital marketplace, and so the legacy financial institution has proceeded to entrench itself further, concentrating wealth among the privileged, and stifling innovation. This is where the blockchain comes in.

Decentralizing computation

A blockchain is a computer — a permissionless, decentralized, globally-accessible computer, one that anyone with an internet connection can interact with, while trusting that their information will not be modified without their express digital consent (their cryptographic signature). The blockchain is not owned by any one person, it cannot be shut down by any one government, its contents cannot be arbitrarily modified without a signature, and to that extent, it is an ideal instrument for global financial unification.

Since anyone can publish their own programs to the blockchain, the world has thus effectively crowd-sourced — to the largest extent in history — a research and development program that is now culminating in an equalized market system where citizens of all countries can buy and trade digital assets 24/7, 365. The only barrier to entry is an internet connection, perhaps the most inclusive technology to date in all of history, which two thirds of humanity now has. Soon the whole world will be online, and soon everyone will be able to participate in markets, allocating resources to the enterprises they see fit, building the world in their shared economic image. Because digital assets, just like stock certificates on a piece of paper or in a centralized database, are but symbols in a computer, and the world now has the power to track ownership of those symbols in the most powerfully-inclusive way in history.

Blockchain technology is still evolving, however, and it is only at this point that decentralized markets are on the cusp of overtaking their centralized counterparts, because earlier blockchains did not offer the kind of web-scale throughput necessary to migrate trading volume from a venue like the NASDAQ, which processes some 500,000 transactions per second, onto a globally-distributed financial computer. Moreover, unlike the NASDAQ, which directly connects buyers and sellers through a financial tool known as a central limit order book (CLOB), the earliest versions of on-chain trading used a primitive technology known as an automated market maker (AMM), which requires non-trading actors to deposit their funds into a market-owned pool against which trades are placed. So-called AMM liquidity providers (LPs) are subject to a phenomenon known as impermanent loss, basically a complementary effect to arbitrage that takes place between an AMM and a centralized cryptocurrency exchange (e.g. Binance, Coinbase, FTX), and as such, AMMs have historically charged trading fees on the order of 0.3% to compensate LPs, thus providing buyers and sellers with a worse price for their assets. In effect, AMMs reward arbitrageurs for rigging up computers that constantly compare the price on centralized cryptocurrency exchanges with those on AMMs, placing automated trades whenever it is profitable.

But unlike in a bazaar, with an apple merchant on the east and an apple merchant on the west, there is essentially no value provided by relocating assets from one place to another: someone who is on the west wants an apple on the west, and someone who is on the east wants an apple on the east, but everyone is already on the internet, so in a basic sense there is no value created by simply buying on an AMM and selling on a CLOB or vice versa. Except, however, for the fact that CLOBs on centralized cryptocurrency exchanges are not accessible to everyone with an internet connection, and because crypto-native digital assets are often issued directly on-chain before they become available on centralized venues. Hence AMMs have historically been the only equal-access method for on-chain trading, and their technological inefficiencies, a result of inadequate blockchain performance, were simply an inescapable burden of the financial inclusion they provided.

How Econia scales up on-chain trading

In the last few years, blockchain technology has advanced to the point of supporting an on-chain CLOB, where buyers and sellers either stipulate the price at which they are willing to buy or sell, or simply agree to take the best price offered by someone else. Notably, however, the first instantiation of such a decentralized exchange (DEX), the Serum DEX on Solana, fell just shy of offering web-scale performance, because while market participants’ orders were parallelized across trading pairs (pair 1: asset x denominated in asset y, pair 2: asset z denominated in asset w), they were not parallelized within a single pair. Essentially parallelism on a blockchain means that if Amy wants to pay Bud and Cal wants to pay Deb, these two transactions can clear at the same time, as opposed to serial processing, where Amy’s payment to Bud has to clear before Cal’s payment to Deb:

In Serum, orders on pair 1 can clear at the same time as orders on pair 2, but within pair 1, orders must be processed in sequence, which means that high-demand pairs are subject to performance bottlenecks. This is where Econia comes in:

Edit 2023–09–08: Paraqueues were originally slated for inclusion in the Econia protocol, but were ultimately not necessary for atomic and parallelism-aware transaction execution. That is, Aptos’ Block-STM execution engine allows Econia to achieve high performance *without* the additional complexity introduced by paraqueues.

That’s right, Econia is even simpler than described in this article, but just as performant, because Econia leverages the core design advantages of Aptos.

Econia leverages a key technical innovation of the Aptos blockchain, a so-called optimistic concurrency execution method known as Block-STM, to queue up orders within a single market in what are known as paraqueues. In short, Amy’s order on pair 1 can queue up at the same time as Bud’s order on pair 1, and on a regular interval, Econia’s matching engine batches up all transactions across all paraqueues, then re-sequences them in chronological order and connects buyers and sellers, directing funds accordingly. Moreover, in contrast with the two-transaction paradigm of Serum, where orders are converted into “events” during one transaction, before events are “consumed” in another transaction (e.g. administer x of digital asset y to user z), Econia collapses these two steps into a single transaction, a further efficiency gain that would not be possible within the pessimistic concurrency constraints that Serum faces on Solana. Isolating transactions within each market and within each paraqueue into siloed-off regions of computer memory (so-called non-overlapping state), Econia is designed from the ground up to prevent transaction collisions at every step of its operations, hyper-parallelizing computation to provide the most efficient on-chain DEX in history.

Economic engine of tomorrow

Again, it is up to people to decide what they value, and more specifically, in this case it is up to humanity to decide what assets they want to represent on the blockchain. At first these assets are likely to be cryptocurrencies or other more speculative financial instruments, but ultimately there is no reason why shares of stock in a company, municipal bonds, or transparent mortgage-backed securities can’t be traded as well — the latter already has been. As trust in the system builds, and as the same old institutions continue to exclude participants and charge exorbitant fees, the demand for blockchain-based assets will only grow, unifying the world’s economic activity and equalizing participation across borders. This will open up wealth-generating opportunities for people who have been historically forgotten, allow companies with progressive visions to raise more money for their ventures, and further expand bilateral trade (a known war deterrent) within the global economy. Moreover, as blockchains become the dominant venue for economic activity, their system-specific kernel resources (cryptocurrencies) will overtake fiat currencies as the preferred medium of exchange, diminishing the exploitative powers of global behemoths like the United States.

The day is coming when a citizen from any country in the world can invest even just one hour’s worth of their cryptocurrency-denominated wages into an American green energy company or a Norwegian cooperative housing bond, or alternatively garner international investments for similar ventures in their own country, and the day is coming when daily on-chain trading volume surpasses that of centralized exchanges. Because the world’s markets do not need to be disjointed, the wealthiest countries in the world do not need to dictate who may or may not participate in financial systems, and there do not need to be rent-seeking middlemen who charge exorbitant fees just to connect to their proprietary data centers. Decentralized markets are here to stay, Econia is the next generation in the evolution of economic access, and global financial inclusion is just around the corner. All it takes is time.

--

--