Demistables

Over the past year I've been having some interesting conversations about "demistables", stablecoins that combine two currencies in a fixed ratio (with sent amounts automatically rebalanced to that same ratio every time a transfer is made). To my knowledge there isn't a description of these online so I just wanted to write something up that briefly discusses them and some situations where they seem like they might be useful.

What Demistables Are

The technical construction of a demistable isn't complicated. A regular ERC20 contract allows minting of demistables in a prescribed ratio (we'll use 50:50 for this example) of two other ERC20 stablecoins by depositing at least one of the two stablecoins into the contract. You could use more than two and not stick to stablecoins of course but for the purposes of this post we'll be discussing why this is useful to do with two stablecoins. The demistable contract has some sort of built in reference to an Automated Market Maker (AMM) or really any credible mechanism that will provide both a market price and the ability to perform automated trades without too much slippage, and at minting time it does any necessary rebalancing to ensure that the minting account holds a value that is balanced according to the fixed ratio (in this case to ensure that the value held in each stablecoin is equal).

Asking the demistable for the account balance will check the market price and return a value in just one of the stablecoins that expresses the total value of both stablecoins held by that account, expressed in the units of the prescribed stablecoin. It is not possible after minting to "top up" just one of the stablecoins for an account, but if the market price of the coins moves relative to each other after minting no rebalancing of the ratio will occur until the next outgoing transfer is made, and then only to equalize the amount transferred (other policies are possible but again we'll keep it simple for the sake of the example). And that's it, that's the whole construction of a demistable.

To see what the user experience of the demistable is like, let's assume that one of the stablecoins is for a "stronger" global trade currency like the U.S. Dollar (USD), and one is for a "weaker" domestic/regional trade currency like the Nigerian Naira (NGN). To mint, User 1 deposits 200,000 NGN worth of cNGN stablecoin into a 50:50 USD-NGN demistable contract that we will call "demiNaira" (abbreviated as "dNGN") and which references a high liquidity onchain USDc-cNGN exchange for both pricing and automated trading. On deposit the dNGN contract immediately sells 100,000 cNGN on the exchange for USDc and registers the resulting value (approximately 66.66 USD at time of writing) as belonging to the minting account. Assuming minimal slippage, User 1 can now call the dNGN contract for their account balance and find that they have a balance of approximately 200,000 NGN. Behind the scenes this balance is composed of 100,000 cNGN and ~66.66 USDc. We can summarize the situation in the following table:

Account displayed balance exchange rate cNGN balance USDc balance
User 1 200,000 NGN 1500:1 100,000 cNGN 66.66 USDc

Suppose that User 1 returns to their account 1 year later to send a payment and the Naira has depreciated against the U.S. dollar by about 10%. First, they call the dNGN contract for their account balance. The contract looks up the market price of USDc in cNGN and finds that the 66.66 USDc held by the account is now worth about 110,000 NGN because of the depreciation. It therefore returns a total balance for the account of 210,000 NGN. Note that no balance held by the contract has changed, only the market exchange rate has.

Account displayed balance exchange rate cNGN balance USDc balance
User 1 210,000 NGN 1650:1 100,000 cNGN 66.66 USDc

The amount that User 1 wants to send to User 2 is 20,000 NGN, so they call the transfer function and specify an amount of 20,000 dNGN to be sent to the recipient's address just like they would with any other token. The dNGN contract notes that User 1's account is out of balance at a 55:50 value ratio instead of 50:50 as prescribed, so it automatically buys 1000/21 or ~476.19 cNGN using USDc to rebalance just the proportion of the balance being sent. Then it reallocates 10,000 cNGN and ~6.06 USDc to the recipient's account, and when User 2 checks their account balance they will have a balance of 20,000 NGN. Behind the scenes this balance is composed of 6.06 USDc and 10,000 cNGN. Remaining in User 1's account is ~90,476.19 NGN and ~60.32 USDc (since 6.06 USDc was sent and 0.28 USDc was used to purchase 476.19 cNGN, for a total reduction in the USDc balance of 6.34 USDc). If User 1 calls the contract to check their balance it will show a balance of 190,000 NGN.

Account displayed balance exchange rate cNGN balance USDc balance
User 1 190,000 NGN 1650:1 90,000 cNGN 60.32 USDc
User 2 20,000 NGN 1650:1 10,000 cNGN 6.06 USDc

In short, from a user experience point of view a demiNaira user can simply treat their dNGN as an NGN amount from which they send NGN amounts to other users, but where any time NGN depreciates against USD their NGN balance will increase to partially offset the loss. The counterside to this, of course, is that if NGN appreciates against USD then the user's displayed NGN balance will instead decrease. But in both cases the proportion of cNGN set (here 50%) will reduce that movement, leaving the user's assets in an intermediate position with respect to the two currencies.

Why Demistables Are Useful

So the obvious question is, why would anyone want to hold a demistable when they could just hold separate balances of the currencies that compose that demistable? That way they would retain strictly greater optionality, since they would not be forced to rebalance those currencies every time they want to send money to someone else. Now I will note that there is a certain point of view from which no holder of a demistable is ever forced to rebalance their own holdings, since only the sent amount itself is modified, and this occurs at market rates to ensure that the sender will never be disadvantaged by this operation. But of course that simply changes the question from "why would anyone want to hold a demistable?" into "why would anyone commit to accepting a demistable?" And while there may be some users for whom a specific intermediate hedge between two currencies is actually a natural asset balance to default to, even those users' preferences can change with time and circumstance. So the utility of a demistable is significantly less obvious when approached from a generic user's point of view.

But there is a different point of view from which demistables start to become really interesting, and that is from the perspective of a central bank and/or regulator. Stablecoins denominated in foreign currency, especially USD, are becoming a significant force in international trade and currency markets. But whether it happens via stablecoins, cash, or bank transfers currency substitution can have a significant effect on national economies. Today many countries restrict the use of foreign currencies, including stablecoins, as part of their strategy to manage the exchange rates and liquidity of their national currencies.

One simple to understand impact of currency substitution is the ability of a national government to subsidize the borrowing costs of growing businesses. These borrowing costs often have a direct connection to economic growth rates, since a successful business will usually need to borrow money in order to expand operations. If the international finance community has low insight into the business risks of a particular country, international lenders may not lend efficiently to businesses of that country, impeding growth. If local lenders have the necessary insight but lack sufficient capitalization to fully saturate the lending market, then governments are well positioned to stimulate that growth by issuing additional loans, acting as a lender of last resort, etc.

But what currency should this lending occur in? If the businesses in question are using foreign currency in their operations, then that is the curency lenders need to have in supply to meet the businesses' needs for expansion. A government will only be able to lend foreign currency in the amounts that it itself can obtain, and as noted above we are assuming the international finance market is not able to lend efficiently into this country. So this will not be able to fully address the problem.

If the government instead offers loans in its national currency to try and increase the liquidity of the lending market, businesses will be forced to sell that currency for foreign currency, and the exchange rate of the national currency could be negatively impacted. This might be okay if the larger economic consequences of business growth (employee savings, domestic taxes, etc.) create enough other demand for the national currency to balance out the amount being sold on currency markets. But if these policies are not balanced exactly right, this attempt to stimulate local business growth can result in runaway inflation, further eroding the trust people place in their national currency and destroying savings, damaging businesses, etc.

Foreign currency controls are often implemented in the full knowledge that they will limit economic growth, but with the aim of preventing the other damages that might result from excessive currency substitution (e.g. runaway inflation). In this context, regulators who are concerned that stablecoins will be used to evade foreign currency controls will certainly feel that these stablecoins are a threat to local economic stability.

So now we can see why a demistable could be a very interesting tool for a regulator to incorporate into their economic policy, because it allows for more exact finetuning of the currency substitution vs liquidity injection tradeoff. When a national currency falls in value vs a foreign currency, demistable operations composed of the same pair will result in increased demand for the national currency, since the foreign currency "locked" in the demistable cannot be spent without selling some of it to purchase the national currency. Meanwhile lending in the demistable can be done more "cheaply" than lending directly in foreign currency, because only a portion of the loaned amount has to come from foreign currency reserves or be borrowed on the international market.

If the circumstances are right, businesses can also benefit immensely from transacting in the demistable. Because of the reduced cost to lend in the demistable compared to foreign currency, growing businesses will be able to borrow more for the same cost. And many businesses in developing economies face extremely high borrowing costs, so this could have a significant impact on operations and growth. This can only happen, however, if the transaction partners the business needs to pay are willing to accept the demistable in the first place. Otherwise we are right back to the problem of the demistable getting sold for foreign currency and we have just wasted everyone's time with extra steps. But if demistable operations are more beneficial to the national economy than foreign currency operations are, regulators should be inclined to be much less restrictive with the use of demistables compared to pure foreign currencies. This is one place demistables make a lot of sense: in economies with significant foreign currency controls regulators can use demistables as an intermediate step to gradually loosen restrictions while still keeping watch to make sure that the resulting growth adequately compensates for the loosening of restrictions.

But even in economies without extensive controls on foreign currency, demistables can still be a win-win if the reduced borrowing cost associated with the demistable is well-matched to the specific business opportunities that increased liquidity can unlock. It's common for trade deals between countries to focus on specific growth industries that yield wider economic benefits for a country's economy, and trade deals that include cross-border payments denominated in demistables also present a unique opportunity for careful balancing of subtle tradeoffs. In this case, the additional factor to be considered is the degree to which business partners in another country are willing to be exposed to the national currencies of their trade partners.

Consider a manufacturing process that crosses a border multiple times during the progression from raw materials to finished goods. Even if there is little dependency on materials or services from the international market, contracts between these countries might still be denominated in a third currency such as USD today because neither country's businesses want to be exposed to the inflation or volatility of the other country's national currency. In such situations, we can often measure the approximate amount of time that currency is being held before it is again spent/converted/etc, and it may be that there is some fraction of currency risk which the same business might find entirely acceptable over that time period, especially if pricing business deals in a demistable with that ratio will allow the purchasing partner to significantly increase their order size (due to reduced borrowing costs).

In such a scenario we can view demistables as a trust building mechanism for cross border trade. As trade flows denominated in demistables increase, both countries can reduce their rates of currency substitution gradually and share in the economic benefits to their national economies. After all, the interest and fees paid out to the international finance market when dealing in a global trade currency like USD is only returned to the degree that those same institutions hire and spend within the economies where the borrowing is happening. Whereas the vast bulk of domestic lenders' operations occur within and benefit national economies directly. So again, demistables can prove an interesting and worthwhile tool for stimulating economic growth.

Demistables as pro-social constructions

There are many more scenarios and subtleties that can be explored in the world of demistables, but I hope this brief post helps to explain why demistables are an interesting construction to consider, even if they are not very technically complicated and can seem unnecessarily restrictive to the user. Indeed, the simplicity of demistables offers improved legibility for use cases which might otherwise be financially equivalent but which are constructed out of more complicated financial components. Whenever policy, inflation, and money are involved legibility can be a big component of a financial tool's success. And blockchains at their best become tools for public legibility and confidence: things that many economies desperately need today.

Not all concerns regulators have about stablecoins can be understood as merely fear of change or the unknown. There are very real economic challenges that countries are facing, and it's critical that those challenges are taken seriously. True economic access means access to tools of policy, economic independence, and the maintainance of public trust and coordination. This is where many of the conversations I've had around demistables have led. I will be very curious to see if demistables can be applied to improve subtle tradeoffs in liquidity, volatlity, growth, and public trust. I'm sure that identifying which scenarios demistables do and don't make sense in will prove challenging and subtle, or perhaps they will ultimately prove to not be very useful. There is much more work to be done here, especially in characterizing the necessary conditions to keep users safe from blockchain-specific risks such as MEV and automated market manipulation. But the idea seems interesting, and I will be particularly eager to see what happens if some of these constructions end up getting deployed in practice.