Skip links

Galoy Research: Self-Balancing Fee Structures for Inbound Liquidity

This post recaps new research from Galoy: “Pricing liquidity for Lightning wallets.”

As outlined in the report:

Here, we discuss fee structures for open source Bitcoin banks, with special attention to the case of managing onchain and offchain liquidity, where different usage patterns can accrue dramatically different protocol fees.

The Challenge: Being Used as an Inexpensive Loop Service

Developing infrastructure at the forefront of Lightning adoption uncovers unique challenges on a regular basis. As builders of the Bitcoin Beach Wallet and its underlying open source software, the Galoy team consistently must find solutions to problems few have experienced before. 

Recently, Galoy CEO Nicolas Burtey noticed that the onchain hot wallet was being depleted by a subset of users. These users consistently sent offchain bitcoin to the Bitcoin Beach Wallet only to withdraw it again onchain. To keep processing onchain payments for other users we had to use submarine swaps to replenish our onchain wallet and regain some inbound liquidity. This wouldn’t be a problem, except for the fact that inbound liquidity is a valuable resource on the Lightning Network. The “liquidity leechers” were using Bitcoin Beach Wallet as a less expensive alternative to a service like Loop from Lightning Labs.

Applying Data Science to Fee Structures

Nicolas and Galoy data scientist José Rojas Echenique set out to diagnose the issue and try to find an appropriate solution.

They first looked at historical data to get a better sense of the problem. They reviewed some of the options LN users have to acquire inbound liquidity and found that the price of inbound liquidity is roughly similar, no matter how you get it.

The rate for inbound liquidity a routing node could expect to get by either routing to Loop or selling on Pool over the course of 2021. Onchain fees plotted for comparison on the lower panel.

They then looked for a solution that would charge this roughly similar market rate across the full range of use cases – including those using Bitcoin Beach Wallet as a loop out service. The result is a dynamic fee structure (as described in the report) that charges each user a fair amount based on how they are using the service.

Dynamic, Self-Balancing Fee Structures Align Incentives

By solving the issue with fees, Bitcoin banks and other Lightning services can continue business operations as usual vs. attempting to detect and regulate actors who use their liquidity for looping.

With the fee structure in place, all users get charged the right amount based on their usage:

  • Everyday wallet users won’t get overcharged for temporary imbalances
  • Those using Galoy nodes for looping will be charged the right market rates

The result? An automated solution for Bitcoin banks, a good user experience for end users, and the right fees for all.

Read the report on Github

Follow Nicolas and José on Twitter