Lightning Gateway
A connector that lets other systems send into Lightning without implementing it themselves.
Basically
A Lightning gateway connects another payment system to the Lightning Network. It lets you send and receive Lightning payments through that system.
Key Takeaways
- A Lightning gateway is an intermediary service that bridges non-Lightning protocols, such as Fedimint, Cashu and Spark, to the Lightning Network. It lets you send and receive Lightning payments without running your own node or managing channels.
- Gateways differ from Lightning Service Providers (LSPs): LSPs operate natively within Lightning and open channels to users, while gateways convert between a separate protocol's native asset and Lightning HTLCs.
- Trust models vary by implementation: Fedimint gateways rely on federation consensus and reputation, Cashu mints act as single-operator gateways, and Spark uses atomic swaps through its SSP architecture for non-custodial Lightning interoperability.
What Is a Lightning Gateway?
A Lightning gateway is a service that connects protocols outside the Lightning Network to Lightning's payment infrastructure. It lets you use systems such as Fedimint federations, Cashu mints or Spark to pay Lightning invoices and receive Lightning payments without running a Lightning node or managing payment channels.
The gateway operator runs a Lightning node with sufficient channel liquidity. When you want to send a Lightning payment, the gateway pays the invoice on your behalf and receives protocol-native assets, such as ecash tokens or virtual UTXOs, in return. When you want to receive a Lightning payment, the gateway accepts the incoming HTLC on its Lightning node and credits you within your native protocol.
The gateway pattern emerged from the Fedimint project, which formalised the gateway role as a distinct component in its architecture. Other Bitcoin Layer 2 protocols have since adopted and adapted the concept, each with different trust assumptions and security guarantees.
How It Works
A Lightning gateway maintains liquidity on two sides: Lightning channel capacity for interacting with the broader network, and protocol-native balances for settling with users inside the connected system. The gateway earns fees for bridging between these two sides.
Outgoing Payments (User Pays a Lightning Invoice)
A user inside a gateway-connected protocol can pay a Lightning invoice through the gateway. The payment typically follows a defined flow between the protocol and the Lightning Network.
Incoming Payments (User Receives a Lightning Payment)
A user receiving a Lightning payment through a gateway triggers the reverse flow. The gateway accepts the Lightning payment and credits the user within the connected protocol.
Liquidity Management
Gateway operators must manage three distinct liquidity layers. These layers cover Lightning channel capacity, on-chain reserves and protocol-native balances.
A gateway cannot process incoming payments for a federation if it lacks sufficient ecash balance in that federation, even if it has ample Lightning liquidity. The three-layer balancing act is one of the operational challenges that distinguishes gateways from standard routing nodes.
Fedimint Lightning Gateway
Fedimint provides the most well-documented gateway implementation. The gateway daemon (gatewayd) is a specialised Fedimint client paired with a Lightning node, and it exposes a REST API that Fedimint clients use to request payment routing.
Fedimint's current protocol (LNv2) supports both LND and LDK as Lightning backends. A recent integration of LDK Node directly into gatewayd simplified deployment from two separate daemons to a single process. Gateway operators configure four fee parameters per federation.
Under LNv2, federation guardians must explicitly register gateways before they become discoverable to users. Multiple independent gateways can serve a single federation, creating competition on fees and reliability. Gateways are untrusted entities separate from federation guardians, so users rely on reputation and the timeout-based refund mechanism for protection.
Cashu Mint as Gateway
In Cashu, the mint itself acts as the Lightning gateway. Unlike Fedimint's separation between federation guardians and gateway operators, Cashu combines both roles in a single operator. The mint runs a Lightning node and handles two operations.
Inter-mint payments route over Lightning, enabling interoperability between separate Cashu mints. However, the single-operator model means users fully trust the mint with their deposited funds.
Spark's SSP Model
Spark takes a different approach to Lightning interoperability. Rather than relying on trusted gateways, Spark uses its Service Providers (SSPs) to route Lightning payments with atomic swap guarantees.
Outgoing payments use Spark's SSP model. The atomic swap construction links the Lightning payment and its proof of payment.
The design means neither the SSP nor the user can steal funds: the atomic swap construction ensures that payment and proof of payment are cryptographically linked. The trust assumption is distributed across SE operators (1-of-n or minority-of-n), a stronger guarantee than single-operator gateways.
Gateway vs. LSP vs. Submarine Swap
Lightning gateways are often confused with LSPs and submarine swap providers. All three facilitate Lightning payments for end users, but they operate at different layers.
A key distinction is that LSPs are peers on the Lightning Network graph, while gateways are intermediaries between two distinct systems. An LSP helps you use Lightning directly, while a gateway lets you interact with Lightning from outside it.
Gateway Liveness
If a gateway goes offline, users lose Lightning access until it returns or they switch to another gateway. Funds held within the protocol, such as ecash in a federation or leaves in Spark, remain safe, but pending Lightning payments may fail or time out. Protocols that support multiple competing gateways, like Fedimint, mitigate this through redundancy.
Custodial Risk Spectrum
Gateway trust models vary significantly. The implementation determines how much trust you must place in the operator.
Liquidity Constraints
Gateways face more complex liquidity challenges than standard Lightning nodes. They must balance Lightning channel capacity, on-chain reserves for channel management and protocol-native balances simultaneously. An imbalance on any layer can block payments in one direction even when other layers have surplus capacity.
Payment Completion Risk
A gateway could accept locked protocol-native funds but fail or refuse to complete the Lightning payment. Well-designed protocols protect against this with timeout-based refunds: if the gateway does not present proof of payment within a defined window, the user's funds unlock automatically. However, the user loses time and the payment must be retried through another gateway or at a later time.
Fee Overhead
Gateway payments incur fees on both sides: Lightning routing fees for the network hop, plus the gateway's own service fee for bridging between protocols. The double fee layer can make gateway-routed payments more expensive than native Lightning payments, particularly for small amounts.
The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.