Market making for USD stablecoins is a sophisticated game these days. Emerging market stablecoins are some way behind, but the data suggests they are catching on more quickly than you might think.
To better understand the fundamentals driving this trend, read our prior art: here and here.
The LAVA research team has built software to market make for emerging market stablecoins and we are open sourcing it today. Our goal is to set a standard for what a market maker should be doing. We invite others to improve it and modify it according to their risk parameters.

A Quick Primer
The sophistication in the market we see today began with “simple arbitrage”, which looked at Uniswap V2 pairs against wrapped ETH. Once that software was released, people very quickly improved it, and extended the ideas to all sorts of markets, USD stablecoins included.
USD stablecoin markets grew deeper and more liquid, and branched off to other chains, while Uniswap launched v3 and then v4. In this environment, you could earn fees by providing smart capital at the right price, while also arbitraging those prices across whichever venues you could. This incentivised a whole new class of market makers, including some of the most sophisticated Wall Street firms.
The most sophisticated of these market makers are now “vertically integrated searcher-builders”, a delightful word salad that makes no sense to anyone outside crypto (and most people in it). In a nutshell, if you want to be optimally profitable, never share transactions. Pay for private order flow, use that to find the most valuable possible block, build it yourself, and then compete in an auction for validators to submit your block to the network.
There is more nuance to this in practice, and a great degree of specialisation across the “transaction supply network”, but it is a good enough description for our purposes here. The interesting thing to notice is that competitive market making for USD stablecoins has driven trading fees close to zero across the board, meaning market makers have had to become increasingly sophisticated at arbitrage, then searching, and now block building.
The big concern is that the economics are centralising. “Vertically integrated” anythings are inherently a winner-takes-all game, or a duopoly at best. Wintermute and SCP are illustrative of this, as are builders and relays. The most advanced researchers look at all this and continue to advocate for “geographical decentralisation”.
We may have a decentralised ledger, but the majority of market making and trading, along with the infrastructure required to do this profitably, is centralised in Western Europe and the East coast of the US. At its worst, this has resulted in periods of time where, despite having ~1m validators, Ethereum blocks have been built by 3 teams. This nullifies censorship-resistance and potentially alters the consensus properties of the network itself.
Flashbots can build some of the required infrastructure. However, geographical decentralisation doesn’t just mean running machines in different countries. It means making markets there and stimulating economic activity. Local stablecoins are critical to this, but we have to begin making our own markets: global players simply cannot.
Making Emerging Markets Matter
The logic is simple: local market makers can access local fiat and other relevant traditional markets, which they can leverage to get permanent asymmetric advantage over global players. If your arbitrage loop depends on access to a local bank account, you will be better off making that market than Wintermute, SCP, or any other global player.
This gives local market makers a permanent seat at the table, at the same time as it ensures that more valuable order flow is originating in regions outside the US and Europe, which creates stronger incentives to locate infrastructure there. This is a virtuous loop for those of us who care about geographic decentralisation.
Arbs dependent on local fiat were not part of the rise of USD stablecoins, which were first used as the instrument of choice to arb BTC on international exchanges. If the prices on Bitfinex and Poloniex diverged, you could sell BTC on one for USDT, move it easily to the other, and buy BTC there, without ever touching fiat dollars.
Non-USD stables are being used either in FX and associated hedging infrastructure, and/or in the tokenisation of assets. In order to arb FX effectively, you need to be able to get into the local fiat to complete some of the most lucrative loops.
Consider: ZAR/USDC trades at a premium on VALR (the largest exchange by volume in South Africa) compared to the bank-quoted rate. This is presumably because those buying USD on VALR can’t or won’t do so through the banks, and so are willing to pay the premium. If you have access to a South African bank account, with the ability to trade into USD easily, then you can make a tidy profit. This same basic structure will repeat itself across most, if not all, emerging market stablecoins and the venues where they trade.
Simple Market Making
So, how do we create a competitive environment around emerging market stablecoins?
We follow the same playbook, and our research team built a reasonably decent software that sets the bar for how to make markets, and we are open sourcing it for anyone to use.
This software targets cNGN, the only regulated stablecoin in Nigeria, though it can be generalised to any EM stablecoin. It includes the capabilities to:
- Fetch prices from all relevant markets, aggregate them by volume and time, and arrive at a blended price for NGN relative to USD. If you know anything about Nigeria, you will know that even this is a pretty big step forward for the Naira.
- Detect, optimize, and execute arbitrage across all relevant venues where cNGN is traded: both Uniswap V4 DEXes on Base and BSC; and CEXes like Quidax.
- Provide liquidity to both DEXes and CEXes in an intelligent fashion.
- For the CEX, this means looking at the mid price, and laddering asks and buys above and below it according to some parameter you set.
- For Uniswap pools, it means providing capital in some specific range defined by a multiple of the standard deviation over previous trades, adjusted by an Exponential Weighted Moving Average, and skewed by some amount depending on what you think the prevailing direction of trades will be.
The idea is that it does all of this automatically, with parameter choices out of the box that are set by back-testing and not just guesswork. You can fund the arbitrage accounts, and it will just work. You can fund the LP accounts with one token (USD or local stable), and it will automatically calculate the correct ratio, swap it, and then mint a position within an intelligent, fee-earning tick range.
It is not fool proof, but it does hopefully set the standard for what emerging market makers should, at a minimum, be doing. It is not a definitive statement: it is part of an ongoing conversation about how to make emerging markets matter in the context of global systems.
The software can be greatly improved. No actual arbitrageur does the number of network calls we do, nor do they care about conservative and “correct” patterns, which is what we opt for in this initial release. Our intention is to set the bar, and then let others make riskier trade-offs in their own implementations, which may also then be more profitable.
You will notice that there are two branches in the repo: main and research. We will be following up with a series of articles focused on the research we have been conducting for the last four months, detailing how we have improved the various prices we use for different actions, how we approach backtesting, what we have learnt from seeing the actual data, and more.
Summing Up
Non USD stablecoins are still finding their feet. Liquidity is dangerously thin across almost all onchain venues. Regulations are unclear. Regulators and issuers are still figuring a lot of stuff out, and there are some very deep complexities to navigate as we make more of the world’s monies programmable.
You can help, though.
By writing good software, and open sourcing it, we can prove that onchain markets are more efficient, more transparent, cheaper for participants, and easier to regulate. We can bring everyone along for the ride, and illustrate exactly how programmable money improves markets that are critical to national sovereignty and local productivity.
This is not a service you can provide to “the developing world” or “the Global South” or whatever other patronising term is the current fashion. It is a part of a critical quid pro quo, because ensuring these kinds of markets are deep, liquid, cheap, and transparent is likely to get us all closer to geographic decentralisation. And, though we don’t like generalisations, the one we do go in for is that everyone, yes everyone, needs to be a geographic decentralisation maxi.