Latest news about Bitcoin and all cryptocurrencies. Your daily crypto news habit.
Learn about Bitcoin
What you should know to start using Lightning for quick, cheap transactions.
The Lightning Network is one of the most revolutionary things to happen in bitcoin since its inception. It is a network built on top of bitcoin to let users quickly and cheaply process smaller payments without needing to confirm every transaction on the blockchain, making it more convenient to use bitcoin as a means of payment.
Below we’ll cover the basics of using a third-party Lightning wallet with a hardware wallet. More technically-adept users with their own Lightning infrastructure in place will have more control over their funds than those using the process described here.
A brief overview of the Lightning Network
To use the Lightning Network, you must first fund a payment channel that connects to another user. Channels are direct connections between you and another user, where bitcoin funds are locked in a multisignature address that’s controlled by both you and the other participant.
As you use the Lightning Network, the portion of the locked funds owned by you will increase or decrease in amount, but these transactions are not confirmed on the blockchain. It is only when you close a channel that the final balance of the multisig address is calculated and settled on the bitcoin blockchain, returning funds to your bitcoin address.
To use the network to send or receive payments, the lightning node you are using must remain connected to the internet, or open channels may be forcibly closed. Since your Trezor is designed to be used offline, it is not currently possible to directly manage Lightning Network funds from your device. Instead, you can send funds from your Trezor to a third-party Lightning wallet, which will manage funds for you and allow you to use them on the Lightning Network.
How to use Lightning with your Trezor
As the Lightning Network is not integrated into the Trezor ecosystem, the easiest way to use Lightning for payments is to install a Lightning wallet on your mobile phone or other device. The Lightning Network is not intended for large sums of money, and can not provide the same security as your hardware wallet, so it should be reserved for bitcoin that you plan to spend.
It can help to think of your Trezor as your bank account, where you keep your savings, and your Lightning wallet as the wallet where you keep your cash. If you were to be robbed, you may lose a few days’ worth of cash, but the thief would have no way to access your savings. It is fairly cheap to fund your Lightning wallet, so you should never need to store more than a small fraction of your money on your Lightning wallet at any time.
Choosing a Lightning wallet
There are lots of Lightning wallets available. Picking the right one is a matter of personal preference, but these points can help you make the right choice.
- Only use non-custodial Lightning wallets. Custodial apps do not give you control of your keys, meaning they own your funds until you withdraw them back to your Trezor.
- Use an open-source wallet to help ensure there are no backdoors or other malicious functions being carried out by the app.
- Use an app that allows you to manage your channels. While this is a little more technical, it gives you more control over your balances.
- If possible, run a Lightning node and pair it with a wallet app that allows you to connect directly to your node, to improve privacy and security of your funds.
The best wallet for you will depend on your technical ability, but bearing these points in mind should help you avoid using wallets that take full control of your coins.
Backing up your Lightning wallet
Lightning wallets use a similar backup method as hardware wallets. Your new wallet will in most cases display a list of words which you must physically write down using a pen and paper. If you delete the app or lose your phone, that list is the only way to recover your funds.
Note that unlike bitcoin keys on hardware wallets, your Lightning keys are generated and stored on your phone or laptop, and are therefore vulnerable to remote attacks. This is one reason why you should never keep a large amount of bitcoin on your Lightning wallet.
Funding your Lightning wallet
Adding funds to a Lightning wallet should be simple from the average user’s point of view. Most Lightning wallets simplify the process so that all you need to do is click a button and send bitcoin to the address it shows. But behind the scenes, these wallets have different mechanisms for how they provide access to your funds, each with their own trade-offs.
It is not yet possible to use your hardware wallet to fund a Lightning wallet directly without needing to trust a third party at some point, unless you run your own infrastructure. You don’t need to know exactly how the wallet you choose works in detail, but you should be aware that most common Lightning wallets require some degree of trust to function.
When funding a Lightning wallet, most apps will ask you to send funds from an existing wallet to a bitcoin address they control. They may then open a channel to your wallet app for the equivalent amount, or only convert the necessary amount of on-chain bitcoin to a Lightning payment when you spend it using their app, or use another method entirely.
Once you have loaded funds from your hardware wallet to the on-chain address provided, they should soon appear as a balance in the Lightning wallet app, where they can be used for paying Lightning invoices or other Lightning payment methods.
Returning your bitcoin to secure storage
The withdrawal process from Lightning wallet apps is usually as simple as funding. Depending on the interface, you may just need to click withdraw and provide an on-chain bitcoin address, or in other cases you will need to first close any open channels, and then provide a bitcoin address.
Once your withdrawal or channel closure has been initiated, it will take some time for the funds to arrive, as they must first be submitted by the app and then be mined into a block and then confirmed by bitcoin nodes, like any other regular on-chain bitcoin transaction.
Withdrawing funds from a third-party Lightning wallet still involves a degree of trust that the funds will be returned to you. Using Lightning wallets without hosting your own infrastructure is convenient but compromises security and privacy at each stage of funding, spending or withdrawing funds.
Trust issues
When using a third-party Lightning wallet this way, you may be shown a balance without being in direct control of those funds. There is always implicit trust that the app developers will use your funds to allow you to spend from the wallet. This is something Trezor aims to solve, but in the meantime the average Lightning user takes on risk during the funding or withdrawal of funds.
More in-depth guides are available to show you how to set up your own Lightning node and manage payments yourself, but for non-technical users it is enough to choose a wallet that fulfills the points described in the section Choosing a Lightning wallet, and to be conservative about how much bitcoin you keep in it.
The Lightning network is at a critical stage where many ideas are being explored at the same time. Using Lightning without your own infrastructure strips away a lot of the control and ownership rights that are so important to bitcoin. While Lightning solutions will continue to improve, it is important to know that Lightning wallets are not a secure place to keep your savings. Always keep the majority of your savings offline in cold storage, and only top up your Lightning wallet with a small amount of bitcoin.
Using the Lightning Network with your hardware wallet was originally published in Trezor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.
Disclaimer
The views and opinions expressed in this article are solely those of the authors and do not reflect the views of Bitcoin Insider. Every investment and trading move involves risk - this is especially true for cryptocurrencies given their volatility. We strongly advise our readers to conduct their own research when making a decision.