Skip to main content

Understanding Ark Liquidity Requirements

· 19 min read
João Bordalo
Developer

Bitcoin agora

This post discusses the liquidity requirements and calculates the funding needs of Ark Service Provider (ASP), as all transactions within Ark must be funded by the ASP.

What is Ark?

Ark is a promising second-layer solution for Bitcoin that improves the scalability and privacy of the network. It offers the following benefits:

  • No incoming liquidity required: Receivers can accept payments without having to worry about having enough funds in their wallets.
  • Confidential payments: Ark protects the confidentiality of recipients, which is not always possible with other second-layer solutions.
  • Scalable: Ark is a solution for enabling the scalability of Bitcoin and applications and services which utilize the Bitcoin infrastructure.
  • Secure: Ark is a secure solution that is built on top of the Bitcoin blockchain.
tip

It's recommended to read the Key Concepts page first.

Ark liquidity requirements

Introduction

When Alice wishes to board an Ark, she finances an output that is eligible to be recognized as a VTXO in a future round. This does not necessitate any liquidity from the ASP:

Oboard from onchain

info

Since this an onchain transaction, and VTXOs should be virtual, we marked it as VTXO*.

When Alice makes her initial payment, for example, 1 BTC to Bob, the VTXO* will be utilized to finance the Round transaction, so again, the ASP will not need to supply any additional liquidity. But if Alice tries to make a second payment, for example, 1 BTC to Charlie, she will now be utilizing a genuine virtual VTXO. In this case, the ASP will need to finance the following Round transaction:

Round from onchain

Finally, let's assume Alice also pays 1 BTC to Dave:

Round 2 from onchain

Summary

  • 10 BTC initial onboard from Alice
  • 4 payments:
    • Alice => Bob 1 BTC
    • Alice => Charlie 1 BTC
    • Alice => Dave 1 BTC
  • total payments = 3 BTC
  • ASP liquidity needed = 17 BTC

As we can see, the liquidity needs for the ASP depends on the following factors:

  • Capital onboarded
  • Value of the payments
tip

While onboarding does not require any liquidity from the ASP, next payments will.

The liquidity problem

If the ASP exhausts its liquidity, it will have to cease accepting new payments and will be compelled to wait for the timelocks (4 weeks) on the on-chain transactions to expire in order to regain liquidity.

To avoid the ASP from running out of funds, it must be able to anticipate how much liquidity will be required throughout a 4 week period.

As we observed, the liquidity necessary during a period will rely on the capital onboarded and the number and value of payments made with that capital

Given this, we can assume the liquidity needed will be the consequence of a function of capital onboarded and a percentage of this capital utilized during the 4 weeks period.

Therefore, how much capital can an ASP accept from users without risking not having enough capital to finance payments inside Ark? In other words, what proportion of the capital inside an Ark is transferred in a 4 week period?

This is similar to the definition of Money Velocity, as defined by the St. Louis Fed:

The velocity of money is the frequency at which one unit of currency is used to purchase domestically-produced goods and services within a given time period.

Money Velocity (MV)

Here are some Money Velocity numbers:

  • USD (Q3 2023): 1.327
  • Lightning (August 2023): 0.59 per month

If we use a Money Velocity of 1.00 (for simplicity), this means that each BTC inside the Ark will be spent once (1.00) during that given period. Since the ASP must fund all transactions and onboarding, this means that for each 1 BTC added to the Ark, the ASP will need 1 BTC to fund the onboarding and 1 BTC to fund the transfers inside the Ark. With an initial balance of 100 BTC, this results in a limit of 50 BTC allowed to onboard (100 = 50 for onboarding + 50 for trades).

If MV = 0.59, this means that those initial 100 BTC would allow for 62.89 BTC of onboarding, where (100 = 62.89 for onboarding + (69.89 * 0.59 = 37.11) for trades).

In reality, the Money Velocity of Ark is likely to be somewhere between 1.00 and 0.59. This means that the ASP will need to have a certain amount of liquidity on hand to fund both onboarded BTC and transfers inside the Ark. The amount of liquidity required will depend on the specific Money Velocity of Ark, which is not yet known for sure.

Comparison table:

Money VelocityBalance+Onboard (BTC)Inside Ark (BTC)Transfers (BTC)
0.59100.0062.890.0037.11
1.00100.0050.000.0050.00
1.327100.0042.970.0057.03

After one month, all the funds used by the ASP, plus the funds sent by the users, become available again. This means that the ASP will have more available liquidity, so it can increase the allowed value for onboards. On the other hand, there is now more capital inside the Ark, so the ASP needs to reserve more capital to fund the transfers:

Money VelocityBalance+Onboard (BTC)Inside Ark (BTC)Transfers (BTC)
0.59162.8979.1162.8983.78
1.0015050.0050.00100.00
1.327142.9736.9342.9757.03

Now, what would happen in a one-year period?

info

You can run your own simulations with the Ark liquidity simulator.

Simulating for 1 year

Columns definition:

  • Inside Ark = Accumulated of allowed onboards
  • ASP Balance = Initial balance + Inside Ark
  • Reserved for trades = Inside Ark * MV
  • Remaining = Balance - Reserved for trades
  • Allowed onboards = Remaining / (1 + MV)

Money Velocity: 0.59

MonthInside ArkASP BalanceReserved for tradesRemainingAllowed onboards
00.00100.000.00100.000.00
10.00100.000.00100.0062.89
262.89162.8937.11125.7979.11
3142.00242.0083.78158.2299.51
4241.51341.51142.49199.02125.17
5366.68466.68216.34250.34157.45
6524.13624.13309.24314.89198.05
7722.18822.18426.09396.09249.12
8971.291,071.29573.06498.23313.35
91,284.651,384.65757.94626.70394.15
101,678.801,778.80990.49788.31495.79
112,174.592,274.591,283.01991.58623.64
122,798.232,898.231,650.951,247.27784.45

Money Velocity: 1

MonthInside ArkASP BalanceReserved for tradesRemainingAllowed onboards
00.00100.000.00100.000.00
10.00100.000.00100.0050.00
250.00150.0050.00100.0050.00
3100.00200.00100.00100.0050.00
4150.00250.00150.00100.0050.00
5200.00300.00200.00100.0050.00
6250.00350.00250.00100.0050.00
7300.00400.00300.00100.0050.00
8350.00450.00350.00100.0050.00
9400.00500.00400.00100.0050.00
10450.00550.00450.00100.0050.00
11500.00600.00500.00100.0050.00
12550.00650.00550.00100.0050.00

Money Velocity 1.327

MonthInside ArkASP BalanceReserved for tradesRemainingAllowed onboards
00.00100.000.00100.000.00
10.00100.000.00100.0042.97
242.97142.9757.0385.9536.93
379.91179.91106.0473.8731.74
4111.65211.65148.1663.4927.28
5138.94238.94184.3754.5723.45
6162.39262.39215.4946.9020.15
7182.54282.54242.2340.3117.32
8199.86299.86265.2234.6414.89
9214.75314.75284.9829.7812.80
10227.55327.55301.9625.5911.00
11238.55338.55316.5522.009.45
12248.00348.00329.0918.908.12
Results

Simulating the three different MV values over a one-year period, we can conclude the following:

  • If MV < 1, the ASP can onboard more BTC each month than in the previous month.
  • If MV = 1, the allowed value for onboarding BTC is always the same (half of the initial balance).
  • If MV > 1, the value of allowed BTC to onboard converges to 0 over time, with the maximum onboard value equal to (initial balance) / (MV - 1).
note

The Money Velocity (MV) for USD is quarterly. Assuming that M2 is constant and GDP is evenly distributed over the three months, the MV for one month should be ⅓ of the MV for the quarter, or 0.33.

Algorithm

Allowed onboard value

The value of allowed onboard BTC for this round will be:

Allowed onboard formula

(Available balance - User’s funds in Ark * MV) / (1 + MV)

Where:

  • Available balance = Initial ASP balance + User’s funds
  • User’s funds = All BTC onboarded by users until now
  • MV = Money Velocity

Money Velocity

To calculate the value of Money Velocity:

Money Velocity formula

Average for the last N rounds of (amount transferred / user’s funds)

Rational

The ASP keeps records of onboarded and transferred amounts from previous rounds, and uses them to calculate the Money Velocity (MV) for the current round. It then uses the MV to calculate the maximum amount that can be onboarded in the current round.

If you've read this far, thank you! But now it's time for the bad news.

The UTXO model

How the UTXO Model Works

In the UTXO model, each unit of cryptocurrency is treated as a unique and indivisible entity. When a user spends cryptocurrency, they are not actually spending their entire balance. Instead, they are spending specific UTXOs that they own.

Each UTXO has two important pieces of information:

  • The amount of cryptocurrency: This is the value of the UTXO.
  • A locking script: This is a script that specifies how the UTXO can be spent. The locking script typically requires a digital signature from the owner of the UTXO.

When a user wants to spend cryptocurrency, they create a new transaction. This transaction has two parts:

  • Inputs: These are the UTXOs that the user is spending.
  • Outputs: These are the new UTXOs that will be created as a result of the transaction.

The locking scripts of the input UTXOs must be satisfied in order for the transaction to be valid. This ensures that only the rightful owner of the cryptocurrency can spend it.

The change problem

But since Ark uses a UTXO model, this MV theory doesn't work, as the ASP will also need to fund the change on each transaction. For example, if Alice has a 1 BTC VTXO and wants to pay Bob 0.2 BTC, the ASP will need to fund two new VTXOs:

  • 0.2 BTC to Bob
  • 0.8 BTC to Alice (change)

Some simulations

Imagine that Alice boarded the Ark with 1 BTC. She has a 1 BTC VTXO and spends ⅓ of her money in the first month (MV = 0.33) using three payments of 0.11 BTC each.

Let's also assume that these payments are inside Ark (to Bob), which means that the ASP will also need to fund Bob's VTXO.

PaymentValueAlice VTXOBob VTXOs
(0.11 each)
Liquidity neededLiquidity accum
001.00000
10.110.8911.001.00
20.110.7820.891.89
30.110.6730.782.67

At the end of the transaction, Alice has one VTXO of 0.67 BTC and Bob has three VTXOs of 0.11 BTC each.

Huge funding needs (factor of 8)

The ASP needed 2.67 of liquidity to support 0.33 traded inside Ark.

Things get much worse if the user makes 10 payments instead of 3 (spending 0.033 BTC on each):

PaymentValueAlice VTXOBob VTXOs
(0.033 each)
Liquidity neededLiquidity accum
001.00000
10.0330.9711.001.00
20.0330.9320.971.97
30.0330.9030.932.90
40.0330.8740.903.80
50.0330.8450.874.67
60.0330.8060.845.51
70.0330.7770.806.31
80.0330.7480.777.08
90.0330.7090.747.81
100.0330.67100.708.52
Huge funding needs (factor of 25)

The ASP needed 8.52 of liquidity to support 0.33 traded inside Ark.

Possible mitigations

One can try to reduce these liquidity requirements by pushing several levers:

  • Reduce MV by reducing the timelock (e.g., 2 weeks instead of 1 month).
  • Reduce transaction change by creating a set of UTXOs with a range of values on the first place, and then doing coin selection with the purpose of reducing change to the minimum possible.

Reduce transaction change

  • Assuming MV = 0.33, and 10 payments of equal value during a month period
  • Dividing Alice’s initial UTXO into 10, 100, and 1000 VTXOs

Using a 1:10 ratio for VTXOs:

VTXO ValuePayment
number
Payment
value
VTXOs usedAlice balanceAlice VTXOsLiquidity neededLiquidity accum
0.100.00001.000100.00.00
0.110.03310.967100.10.10
0.120.03310.934100.10.20
0.130.03310.901100.10.30
0.140.03310.868100.10.40
0.150.03310.835100.10.50
0.160.03310.802100.10.60
0.170.03310.769100.10.70
0.180.03310.736100.10.80
0.190.03310.703100.10.90
0.1100.03310.670100.11.00

Using a 1:100 ratio for VTXOs:

VTXO ValuePayment
number
Payment
value
VTXOs usedAlice balanceAlice VTXOsLiquidity neededLiquidity accum
0.0100.00001.0001000.00.00
0.0110.03340.967970.040.04
0.0120.03340.934940.040.08
0.0130.03340.901910.040.12
0.0140.03340.868880.040.16
0.0150.03340.835850.040.20
0.0160.03340.802820.040.24
0.0170.03340.769790.040.28
0.0180.03340.736760.040.32
0.0190.03340.703730.040.36
0.01100.03340.670700.040.40

Using a 1:1000 ratio for VTXOs:

VTXO ValuePayment
number
Payment
value
VTXOs usedAlice balanceAlice VTXOsLiquidity neededLiquidity accum
0.00100.00001.00010000.00.00
0.00110.033330.9679680.0330.03
0.00120.033330.9349360.0330.07
0.00130.033330.9019040.0330.10
0.00140.033330.8688720.0330.13
0.00150.033330.8358400.0330.17
0.00160.033330.8028080.0330.20
0.00170.033330.7697760.0330.23
0.00180.033330.7367440.0330.26
0.00190.033330.7037120.0330.30
0.001100.033330.6706800.0330.33

Comparison table:

VTXO ratioMV# PaymentsASP liquidity needed
100.33101.00
1000.33100.40
10000.33100.33
conclusion

Dividing the initial UTXO into more VTXOs decreases the need for funding.

Conclusion

The liquidity requirements for an ASP will depend on three major factors:

  • Money Velocity: This is not under the control of the ASP, and if it is higher than 1, the Ark capacity will converge to a fixed value.
  • The locktime period on VTXOs: Reducing the locktime period will return the locked liquidity sooner. However, this also means that users will need to "recycle" their VTXOs sooner, which can be seen as a worse user experience.
  • The VTXO ratio: In other words, this is the maximum allowed value for a given VTXO. At one extreme, the ASP could force all VTXOs to be of 1 sat, which would eliminate any "wasted" liquidity on change. However, this would also require millions of signatures from the user and ASP to construct a payment, which would cause a worse user experience.

References