Voltage LSP
The Voltage LSP(also known as Flow) is a liquidity service from Voltage that is open to everyone on the network, not just those running their nodes on Voltage. The LSP automatically provisions channels when it detects payments. The LSP will be able to detect a payment going to your Lightning node and make liquidity decisions to ensure the payment makes it to your node successfully with zero down time.
In order to use the Voltage LSP, be sure you have SCID aliases and zero-conf enabled in your node settings or your lnd.conf if you are running outside of the Voltage platform.
This LSP is created by leveraging zero-conf channels and preimage hashes. With these capabilities of Lightning, we can determine on the fly if a new channel is required, open it instantly if necessary, and send the payment to the receiver without ever taking custody of funds. Here's how it works:
- The Receiver generates an invoice on their node.
- The Receiver sends their invoice to the Voltage LSP.
- The Voltage LSP returns a new invoice with the same preimage hash but the LSP Pubkey.
- Receiver gives this new 'Wrapped Invoice' to the Sender.
- The Sender pays the invoice which goes to the LSP.
- The LSP detects the payment and opens a zero-conf channel to the Receiver.
- The LSP forwards the payment to the receiver and the payment is completed.
This process has several benefits to highlight. First, the Wrapped Invoice uses the same preimage hash as the original invoice. This means that the LSP can't settle the payment without the final Receiver completing the payment. Secondly, the invoice that's given to the Sender container the Voltage LSP's public key meaning an increase in privacy for the Receiver. The Voltage LSP knows the Receiver but no one else does. Finally, this works even if the Receiver has 0 channels. There is no requirement to have any kind of liquidity established, you can start from a brand new node. Of course, it's important to mention that zero-conf channels are a trusted mechanism until the channel has confirmations on the blockchain.
Because our LSP uses Zero Conf channels, most nodes require some additional set up. Find your node implimentation below to learn how to properly prepare your node for Zero Conf channels.
Be sure to run your LND node with two additional settings enabled for zero-conf compatibility:
If you're running LND on Voltage, you can enable these options on the Settings page.
Clone our zero-conf LND daemon at the zero-conf-lnd repository. (Requires the Rust toolchain installed to compile) .
Create a config.yml file that points that looks like this:
Build the daemon and run it with the following command:
Your node should now be able to accept zero-conf channels from us, as long as the daemon is running.
Clone our zero-conf CLN plugin at the zero-conf-cln repository.
Run a testnet CLN node with the following flags included:
Your node should now be able to accept zero-conf channels from us.
Our service works with LDK, but since each LDK use case is different it will take more manual integration to get it working.
If you'd like to use Voltage LSP with LDK, please contact us and we'll help you get it set up.
You can use our UI to manually submit invoices for wrapping, but if you'd like to integrate Voltage LSP into your service or wallet, you'll probably want to do this automatically.
Example:
The API has a single endpoint, /api/v1/proposal, which accepts a POST request with a JSON body of the invoice (required), and your node's host and port (optional)
Curl example
JavaScript Example:
If your node is already connected to our node you don't need to pass your host and port information. This is especially useful for mobile wallets that might not have a public IP.
Here's the testnet connection info you need to peer to our node:
Testnet LSP node pubkey:
Testnet IPV4:
Testnet TORV3:
By default, the sender would be the one paying all fees because we add on the Voltage fee to the amount we receive in the original invoice. However, you can pay the service fee yourself (or split it between you and the user) but generating an invoice that is the amount due minus the Voltage fee.
For example, lets assume the receiver is expecting a payment of 100,000 sats and the Voltage fee is 5,000 sats. By default, the wrapped invoice generated from LSP would be for 105,000 sats which would mean the sender is paying for the channel open cost. Instead, we don't want the sender to pay the fee, so the receiver would generate an invoice for 95,000 sats. This would mean the Voltage LSP would return a wrapped invoice of 100,000 sats. This way the sender is paying the expected amount and the receiver pays the service fee.
You can use the Fee API (/api/v1/fee) to estimate what the fee is for a given payment from the LSP in order to generate the proper amount in the invoice:
The returned value would be the LSP fees in millisatoshis. This API also returns an ID for the fee rate. You can pass in this ID to the /proposals endpoint to ensure this exact fee is used by the LSP. Fee rates expire after 10 minutes.
Flow 2.0 has a dynamic fee structure. When requesting a fee rate, we look at the current mempool to estimate the onchain fee of the channel open. We use this fee in combination with the Voltage fee to present the final rate. Our LSP currently charges the follow fees:
Onchain Fee: Estimated directly from the mempool.
Base Fee: 1000 sats
Payment PPM: 500