Are you using your capital efficiently? A deep dive into what the Lightning Network enables for traders

Kollider
12 min readAug 26, 2021

TL;DR: The Lightning Network can benefit all traders. Using it, traders can post less margin on trades, manage capital more efficiently and execute trades faster.

Over the last few months, Bitcoin Lightning Network nodes have grown in number and capacity, largely due to an enthusiastic user base of node runners, merchants, and an increased number of use cases. What’s also increasing is the number of traders. Let’s look at how the Lightning Network can be used in one of the most popular arbitrage trading strategies in crypto, the ‘cash and carry’ trade. In this article, I’ll dive into what futures and perpetuals are, what the ‘cash and carry’ trade is, and why the Lightning Network is great for traders using this strategy.

What are futures?

In cryptocurrency markets there are two main market types, Spot markets and Derivative markets. Spot markets are relatively straightforward, a trader sets the price at which they want to buy or sell an asset (e.g. Bitcoin for USD). If another trader is willing to trade, the exchange occurs with each trader physically owning the said asset.

Derivative markets on the other hand are a little different. A trader is not trading the actual asset, but rather a product that represents it, eliminating the need to actually own the underlying asset. For example, consider an ETHUSD futures contract. When trading this product, the trader is not buying or selling Ethereum for USD directly. Instead, they are trading a contract that is designed to follow the USD price of Ethereum. In other words, cryptocurrency traders can profit from Ethereum’s price changes without ever owning it since the contract price changes as Ethereum’s price changes.

There are many types of derivatives, but futures are some of the most popular. When trading futures, you’re essentially trading the promise to deliver the underlying asset on a future date. They’re one of the main contracts used by traders aiming to profit from price movement speculation but also used as a form of risk-management by hedging.

For example, a coffee bean farmer may want to sell a future coffee contract (enter into a short position) if they expect coffee to sell at a lower price after harvest. If the price of coffee beans goes down, they will have avoided a loss. If the price of coffee beans goes up, they will have missed out on more profit, but at least they were protected from uncertainty by entering into the futures contract.

Traditional futures contracts have an expiry date and are usually physically settled, meaning that at the expiry date, the buyer must purchase or the seller must sell the underlying physical asset at the set price (regardless of what the current market price is when the contract expires). Alternatively, futures can also be cash settled, which means that rather than exchanging physical assets after the expiration of the contract, buyers and sellers settle their positions relative to the underlying price by paying or receiving cash equivalents.

In spite of how futures contracts are settled, they are traded independently of the underlying price of the asset. Instead, their price reflects the expectation for what the price of that asset will be in the future due to supply and demand of the contract. For example, if the market thinks that the price of an asset will increase, then the futures contract will be priced higher than the asset itself.

However, this difference in price does not last forever. As the expiry date of a futures contract gets closer, the price difference between the underlying and the futures contract will converge towards zero. This convergence happens because the market will not allow the same product to trade at two different prices at the same time.

Contracts expire, but perpetuals do not.

To enable derivatives markets for illiquid assets, economist Robert Shiller proposed the idea of perpetual futures in 1992. Based on Shiller’s idea, Bitcoin derivatives exchange, BitMEX, implemented a perpetual futures contract for Bitcoin in 2016. The perpetual contract is a futures contract without an expiry date, allowing traders to hold Bitcoin exposure indefinitely without paying the extra costs to roll-on or ‘refresh’ a futures position onto a future dated contract. Today, perpetual markets are the most liquid markets in the cryptocurrency world. They facilitate many trillions of dollars worth of volume (last quarter the top 9 derivatives exchanges processed $5.6 trillion in BTC perpetual trading volume) and continue to become more and more popular. Arguably, they’re the most popular cryptocurrency product to date.

Now you might be thinking, “how does the price converge if the perpetual contract never expires?”

Since perpetual markets aim to emulate spot market prices, they use a funding rate mechanism made of two parts. The first is an interest rate component, which accounts for the difference in lending rates between the base and quote currencies. The other component is a measure of how far the perpetual market price is from the index price. The index price takes into account the real time price data of multiple exchanges to provide an accurate or fair value for the asset, e.g. BTC/USD. Together, these components create a funding rate mechanism, where one side, either long or short, pays the other side over a specified period of time. The amount paid is a reflection of the ‘Notional value’, or the total value the derivative controls.

In practice, this funding rate mechanism means that if the price of the perpetual is below the index price, short positions pay long positions. This encourages traders to take long positions and move the price of the perpetual market back in line with the index price. Conversely, if the price of the perpetual is above the index price, then long positions pay short positions. This encourages traders to take short positions. Overall, the funding rate mechanism ensures the perpetual market price will always be pushed close to the spot market price at an interval (e.g. every 8 hours).

IF perpetual contract price is above index price = funding rate is positive and longs pay shorts, disincentivising buying and incentivising selling. This lowers the perpetual swap price in line with the index price.

IF perpetual contract price is below the index price = funding rate is negative and shorts pay longs, disincentivising selling and incentivising buying. This raises the perpetual swap price in line with the index price.

The arbitrage trade

So now you know what perpetuals are, and you know that their price is encouraged to move towards (converge) the index price over time. So what is the significance of this for traders, and how does it apply to crypto? Well sometimes there’s an arbitrage opportunity here called the ‘cash and carry’ or ‘basis’ trade, and it relies on convergence.

Let’s imagine that the price of Bitcoin on a spot exchange is $48,000 and the price of Bitcoin on a perpetuals market is $50,000. As an example, you could open a 1 BTC short position on the perpetuals market and buy 1 BTC on the spot market, so you are protected if the price of bitcoin goes up or down.

If at the end of the funding event (~8 hours) the prices for both the perpetual and spot contracts converge to $51,000 and the arbitrage trade is closed, there is a loss of $1000 on the perpetual but a profit of $3000 for the spot trade, leading to a profit of $2000 (not considering any exchange fees).

Now we emphasise the difference between the spot and index price here, but sometimes the futures price does not trade high enough above the spot price to be profitable on the ‘cash and carry’ trade. So many traders use perpetuals to earn the interest paid by the funding rate mechanism as it can be quite profitable.

To do this, the trader must take the opposite side of the funding rate. For example, if the price of the perpetual is trading above the index price, the funding rate will be positive, meaning that long positions will pay short positions. In order to receive the interest paid by the funding rate mechanism safely, the trader opens a short position on the perpetuals market and buys the equivalent of the position size on the spot market.

While both these trades may sound simple, they innately carry risks of liquidation and execution.

Liquidation

In the above examples, we assume that an equal amount of Bitcoin was used for the margin amount (the amount of capital you’ve decided to put at risk for trading) for both the perpetual and spot positions, but perpetuals allow a trader to use leverage.

Leverage allows you to trade and make profits or losses based on the notional amount on a position and can be used to multiply gains or losses. In essence, leverage can be a tool that allows a trader to open a position without storing 100% of their funds on the exchange, reducing counterparty risk for the trader. However, reducing initial margin on a position brings the liquidation price closer to the entry price, increasing the risk of liquidation if price convergence doesn’t happen in time or the price moves against the position quickly. Leverage should be used with caution.

When prices fluctuate, traders may need to add more margin balance to their position to avoid liquidation. Traders often leave excess funds on exchanges in case they need to quickly update their margin balance to avoid liquidation. Some traders even fully collateralise their positions, leaving the full margin amount on the derivative position, so the liquidation price is infinite, thus avoiding liquidation forever. In either case, this balance is usually not utilised effectively.

Execution

It takes time for an arbitrage opportunity to be identified and executed. You can miss a lucrative opportunity or even face losses if your order is executed too late. In order to ensure a trade is executed quickly, a trader usually leaves funds on the exchange, pre-funding a wallet before they’ve even started trading. However, to make sure they don’t miss arbitrage opportunities, traders often spread their funds across multiple exchanges in case they need to execute an order quickly.

So how does the Lightning Network help traders?

The Lightning Network offers an off-chain transaction model for Bitcoin that enables:

  • Instant Transactions. Instant transactions without relying on block confirmation times and using a security model enforced by the Bitcoin Blockchain, but without posting transactions to it.
  • Fee reduction during busy times. Lightning Network transactions are settled off-chain, so it has exceptionally low fees (sometimes 0), making micropayments possible in real-time.
  • Scalability. The Lightning Network is capable of sending billions of simultaneous bitcoin transactions per second across the network.

For traders specifically, the Lightning Network enables greater capital efficiency and improved execution.

The Lightning Network is taking us to new places (Image:https://pixabay.com/photos/wormhole-time-travel-portal-vortex-2514312/)

Capital efficiency

Because sub-second transactions are possible with virtually no fees on the Lightning Network, traders can keep funds in their wallets instead of storing them on multiple exchanges.

When trading perpetuals, a trader needs to ensure they have enough margin locked into the position to avoid liquidation. Position margin might need to be topped up if the price is moving in the opposite direction of the trade, and depending on how much is left in the position, they might need to add margin quickly to avoid liquidation.

Let’s use the trades we mentioned earlier to demonstrate this. In those trades, the trader maintains a short position using a perpetual. If the BTC price goes up and the trader’s position gets close to liquidation, then the trader needs to send funds to the exchange to add margin. In this scenario, if the trader has no funds left on the exchange, they risk liquidation due to the long confirmation times of sending BTC on-chain to the exchange. In the 20–60 minutes it takes to get more funds on the exchange to update their margin balance, the price will move, and their position could be liquidated.

The Lightning Network is perfect for making traders more capital efficient. When using the Lightning Network, the trader is able to instantly update their margin balance without delay, helping them maintain their position and avoid liquidation.

On exchanges like Kollider, users can update their margin balances much faster using Lightning Network wallets such as Breez, Phoenix or Bluewallet. In edge cases where route reliability is low or node capacity falls short, it can take a payment a few seconds to confirm, which can result in a position getting liquidated before the trader is able to update their margin.

Since the Lightning network is made up of different payment channels between users, there must be an available channel between transacting parties in order for a payment to go through. If two users do not have a direct payment channel, they can still pay each other via a ‘route’ of one or more other Lightning channels, which forward their payment from the payer to the payee.

While a Lightning Network wallet may be adequate for most traders, optimal efficiency is achieved by traders that run their own Lightning nodes. By opening a direct, private channel with a lightning-enabled exchange, say Kollider, they’re able to eliminate transaction fees and guarantee a route that only they can use, without the uncertainty of long routes by passing through intermediary nodes. This direct connection means the trader is always able to reliably update their margin on positions, with transactions usually taking less than a second.

This speed makes it possible to use margin balances more effectively. For example, If the collateral on their short position on the perpetual reaches a margin balance of 10%, then the trader is able to instantly remove margin from the position and withdraw it to the safety of their own wallet, or even send the excess margin to another exchange.

Improved execution

Employing the Lightning Network as a rebalancing medium between traders own wallets and the exchanges they trade on can improve execution. Providing the trader maintains direct connections to all of their exchanges, a trader is able to instantly transfer a Bitcoin balance to the exchange where an arbitrage opportunity is detected. This enables them to execute a trade almost as soon as the opportunity is detected without having to expose themselves to counterparty/exchange risk through leaving their funds on the exchange.

Arbitrage trades using Lightning

Lightning is not changing the type of trade, it’s changing HOW it’s traded. Let’s use the same cash and carry trade from above to demonstrate what changes if exchanges supported Lightning.

Bitcoin price on spot exchange is $48,000

Bitcoin price on perpetuals market is $50,000

The trader wants to open a short position on the perpetuals market and go long on the spot market. Except this time, the perpetuals market supports Lightning Network transactions. With the speed and efficiency Lightning brings, the trader is able to instantly execute and open a position without having to pre-fund their wallet on the exchange. Allowing them to execute on the trade as soon as the opportunity is detected.

Let’s say the trader has decided to use leverage on their position, either because they did not have enough to open the short position fully or because they wanted to reduce their counterparty risk by safeguarding more of their own funds themselves.

So they may use $12,000 worth of BTC as their initial margin on their short position and leverage of 4x giving them a notional position size of $48,000 (Margin * leverage = notional position size). This use of leverage means that if the price increases by roughly 25% then the position will be liquidated. However, since the trader is using Lightning they are able to always push the liquidation price further away since they’re able to instantly manage their margin balance on the position.

By maintaining a direct lightning channel with the exchange the trader is able to keep a very low margin balance on their position and effectively increase their leverage as they are able to update their margin balance so quickly. In theory, by using the Lightning Network, the derivative exchange could completely change the behaviour of the trader by enabling automatic creation and payment of invoices. For example, should the trader’s short position drop below a certain price, they are able to receive an invoice and top up their margin balance enough to push the liquidation price further away. Or perhaps if the margin balance in their position goes over a certain threshold or is too high, they’re able to remove margin from their position and send it elsewhere. Enabling the trader to reduce their counterparty risk and use their capital more effectively.

The Lightning Network can benefit every trader

The Lightning network enables different things for different people. But for traders in particular, it allows them to execute faster, manage counterparty risk more effectively, and utilise their entire trading balance. In the case of derivative traders, using Lightning for Bitcoin settled positions may enable them to manage their risk more carefully and potentially help them avoid being liquidated when they don’t have enough margin to cover their position. The most important aspect is that Lightning brings these benefits to every trader, not just a select few with additional capital and access to a variety of third party providers that enable them to execute faster, safer, or better.

Interested in using the Lightning Network to trade perpetuals? Join the Kollider Alpha Programme: https://kollider.xyz/

--

--

Kollider

Building new ways to access cryptocurrency markets.