Intermediate ยท 05 The button between the two accounts, and the transactions behind it
Moving money explained.
Moving money between savings and spending is a Bitcoin payment from a lock only you can open to a lock you share with a Lightning provider. Moving in grows that shared lock with a transaction called a splice, and moving out shrinks it the same way, so each move costs a network fee and waits for a block.
01 Two accounts
Savings lives on the blockchain and spending lives in a Lightning channel
Move to spending takes coins from savings and puts them in a Lightning channel. The example on this page has Alice with 300,000 sats in savings moving 100,000 of them.
The two accounts look like two balances in one app, but they are two different systems. Savings is a set of coins recorded on the Bitcoin blockchain, each one locked so that only Alice's key can spend it. Spending is a Lightning channel: one coin on the blockchain that Alice and a provider (ACINQ, or another company that runs Lightning nodes) lock together, plus a running agreement between them about how much of it is hers. Lightning explained covers how that agreement works.
What you see: two tabs, "Savings" and "Spending", each with a balance, and a button on each that moves money to the other: "Move to spending" and "Move to savings".
What it hides: the words channel, splice, swap-in and provider. The app only ever says "your channel".
Look underneath
Savings is a BDK wallet over the descriptor tr([fp/86'/coin'/0']xpub/0/*) for receiving and /1/* for change: single-key Taproot outputs, synced through an Esplora server.
Spending is one of two Lightning engines behind one Kotlin interface, SpendingNode. On mainnet the default is ACINQ's lightning-kmp library (the code inside Phoenix), which keeps one channel per phone and grows it. Any other provider runs through ldk-node with an LSPS2 provider, which on mainnet defaults to Megalith.
Example numbers
The 150,000 sat channel split 40,000 to Alice and 110,000 to the provider is illustrative. The provider's side is the room Alice has to receive payments into; see Lightning explained.
02 No relabelling
Moving money changes which keys lock the coins, so it needs a real transaction
A bank moves money between two of your accounts by editing two numbers in its own database. Bitcoin has no database that anyone can edit.
Each coin on the blockchain carries a lock, a short rule that says what has to be shown to spend it. A savings coin says "a signature from Alice's key". The channel coin says "a signature from Alice's key and one from the provider's key". The only way to change a coin's lock is to spend it: write a transaction that consumes the old coin and creates a new one with the new lock, and have the network record it in a block. So moving 100,000 sats to spending is a payment, with a network fee, from Alice's savings to a coin that ends up in the channel.
A savings coin carries a lock that says "a signature from Alice's key". Nothing else can spend it.
To change the lock, Alice signs a transaction that spends the coin. The old coin goes into it and is used up.
Part of the value leaves as the network fee, 600 sats in this example, paid to the miner.
The transaction creates a new coin of 100,000 sats, locked to Alice and the provider together.
Once a block records it, the old coin no longer exists. The money now sits under a different lock.
What you see: the confirm screen "Move to spending" with "Spending gets 100,000 sats" and "plus 600 sats network fee", then "Move 100,000 sats to spending. Network fee 600 sats."
What it hides: the address the savings payment goes to. The app asks the Lightning engine for it and pays it at the Normal fee rate.
Look underneath
The savings payment is an ordinary BDK spend. Move.kt asks the engine for depositAddress(), reads feeEstimates().normal, and builds prepareSendUpTo(address, amount, rate), or prepareSendAll when the amount is the whole confirmed balance, in which case the fee comes out of the amount.
The two locks
# savings output (BIP86 key path, one key) OP_1 <32-byte tweaked key of Alice> # an ldk-node channel funding output (BOLT 3, P2WSH) OP_0 <sha256 of:> 2 <key_a> <key_b> 2 OP_CHECKMULTISIG
The 600 sat fee is illustrative: one input and two outputs is about 150 virtual bytes, at 4 sat/vB.
03 Splice or open
A splice replaces the channel's coin with a bigger one, and the channel stays open throughout
There are two ways to get new money into Lightning. Open a second channel next to the first, or splice the money into the channel that already exists.
A splice is a transaction that spends the current channel coin and a new coin together, and creates one bigger channel coin with the same two-key lock. Alice's 150,000 sat channel plus her 100,000 becomes a 250,000 sat channel with 140,000 of it hers. The provider has to agree and sign, because the old channel coin needs both signatures to spend. Payments keep working while the splice waits for its block. Opening a second channel leaves the first one alone and creates a separate shared coin, which costs about the same on-chain fee but splits Alice's balance across two channels.
Alice's channel coin holds 150,000 sats under the two-key lock. Her new 100,000 sat coin is ready to go in.
A splice is one transaction that spends both coins. The provider has to sign too, because the channel coin needs both signatures.
Both coins are used up and one channel coin of 250,000 comes out, with the same lock and 140,000 of it Alice's. Payments keep working while it waits for a block.
The other way is to open a second channel. The old channel coin is left alone.
The open creates a separate 100,000 sat channel. The fee is about the same, but Alice's balance is now split across two channels.
What you see: nothing about either. Both cases end with "It shows in spending once the network confirms it."
What it decides: always a splice when the provider supports one. ACINQ always does. With other providers the app tries a splice first and opens a new channel only when the splice is refused.
Look underneath
Splicing is an extension to BOLT 2 built on the interactive transaction protocol that dual-funded channels introduced. The message flow, roughly:
stfu # both sides stop adding HTLCs (quiescence) splice_init # "I want to add or remove this much" splice_ack tx_add_input / tx_add_output / tx_complete # build the tx together commitment_signed # new commitment spending the new funding output tx_signatures splice_locked # after it confirms; the old funding output is forgotten
Until splice_locked, every channel update is signed twice, once against the old funding output and once against the new one, so whichever confirms the channel is still valid. That is why payments keep working during a splice.
The 140,000 sat result is illustrative and ignores the splice fee, which comes out of Alice's side.
04 The ACINQ way in
With ACINQ, savings pays a swap-in address and ACINQ splices the coins in once they confirm
On mainnet the default provider is ACINQ, the company behind the Phoenix wallet, and the move runs the way Phoenix runs it.
Savings pays Alice's swap-in address. It is a Bitcoin address whose lock has two ways to open: Alice and ACINQ signing together, or Alice alone after about six months. Once the payment has a few confirmations, the Lightning library in the app notices it, asks ACINQ for a splice, and both sign a transaction that spends the swap-in coin and the channel coin into one bigger channel coin. Alice does not press anything for this second step. ACINQ takes a fee for it, and the app refuses any fee above 5,000 sats.
Alice moves 100,000 sats from savings. With ACINQ, the destination is her swap-in address.
Savings pays the swap-in address. It is an ordinary on-chain payment.
The address has two locks. Alice and ACINQ together can spend it at any time, or Alice alone after about six months.
After a few confirmations, the Lightning library in the app notices the coin and asks ACINQ for a splice. Alice does not press anything.
Both sign one transaction that spends the swap-in coin and the channel coin into one bigger channel coin. ACINQ's fee for this is capped at 5,000 sats.
Both locks need Alice's key, so ACINQ can never take the coin alone. If ACINQ never shows up, she can leave by herself after the delay.
What you see: "It reaches spending after a few confirmations, usually within an hour. ACINQ takes a fee for adding it to your channel, at most 5,000 sats." While it waits, the spending tab says "100,000 sats is on its way from savings."
What it hides: the swap-in address, its two spending paths, and the splice. The app does not even keep a "move pending" flag for ACINQ; the library watches the address on its own.
Look underneath
lightning-kmp calls this swap-in-potentiam. The address is a Taproot output whose internal key is a MuSig2 aggregate of the user's key and ACINQ's swap-in key, with one script leaf for the refund:
internal key: MuSig2(user, acinq) # the normal, cooperative path leaf: <user_refund_key> OP_CHECKSIGVERIFY <refund_delay> OP_CHECKSEQUENCEVERIFY
The app passes lightning-kmp's DefaultSwapInParams (MinConfirmations, MaxConfirmations, RefundDelay) unchanged, and ACINQ's swap-in xpub is a constant in AcinqEngine.kt. peer.startWatchSwapInWallet() runs on start, so coins at the address join the channel by themselves within the liquidity policy.
The 5,000 sat cap
LiquidityPolicy.Auto(
maxAbsoluteFee = 5_000.sat + credit, # credit: fee credit already waiting
maxRelativeFeeBasisPoints = 100_00,
skipAbsoluteFeeCheck = true,
maxAllowedFeeCredit = 50_000 sat)
The fee covers the splice's mining fee and any charge ACINQ adds. When it would be higher, lightning-kmp declines and the coins stay at the swap-in address. lightning-kmp watches the address through ACINQ's Electrum server, the one place the app does not use Esplora.
05 Waiting
The move waits for confirmations because a splice cannot safely build on a payment that could still vanish
A transaction that is announced but not yet in a block can still be replaced. Alice's wallet could send a new version with a higher fee that pays the same coins somewhere else.
If the provider signed a splice that spends Alice's new coin while that coin was still unconfirmed, and Alice then replaced the payment that created it, the splice would spend a coin that never existed and the channel would be stuck on a transaction that can never confirm. So the splice waits until the payment is buried. A confirmation is one block on top of the transaction, a block comes about every ten minutes, and each one makes replacing it more expensive. ACINQ waits for a few. The other engine in the app waits for one.
What you see: the savings payment in the activity list as "Pending. It counts once a block includes it, usually within an hour.", then "1 confirmation", "2 confirmations" and so on.
What it hides: the threshold each engine waits for. The copy says "a few confirmations" for ACINQ and "after a confirmation" for the others.
Look underneath
BDK builds the savings payment with its default sequence, which signals replace-by-fee (BIP125). The app has no fee-bump button wired up, but any wallet holding the same keys could replace it, and the provider cannot know that one will not.
For ldk-node, move_in reads spendable_onchain_balance_sats, which counts confirmed coins only, and returns None while it is zero. For ACINQ, the threshold is lightning-kmp's DefaultSwapInParams.MinConfirmations, three in the version the app ships.
"About every ten minutes" is the average the difficulty adjustment aims for. Single gaps vary from seconds to over an hour.
06 The other way in
With other providers, savings pays the phone's own Lightning wallet, then the app splices or opens a channel
A user who picks a different provider under Advanced settings gets a different engine, ldk-node, and a different route in.
The Lightning software on the phone has a small Bitcoin wallet of its own, with keys from Alice's recovery phrase. Savings pays an address in that wallet. Nobody else has a key to it, so there is no swap-in lock to explain. Once the payment confirms, the app asks the provider for a splice into the existing channel. If the provider refuses, because it does not support splicing, the app opens a new channel with it instead. If there is no channel yet, it opens one. Either way that is a second on-chain transaction with its own fee, which the next section covers.
The Lightning software on the phone has a small Bitcoin wallet of its own, with keys from Alice's recovery phrase. Nobody else has a key to it.
Savings pays 100,000 sats to an address in that wallet. There is no shared lock and no refund delay.
After one confirmation, the app asks the provider for a splice into the existing channel.
If the provider accepts, the coins are spliced in and the channel grows.
If it refuses, or there is no channel yet, the app opens a new channel instead. Either way that is a second on-chain transaction with its own fee.
What you see: "It reaches spending after a confirmation. Adding it to your channel costs a second network fee of about 3,200 sats."
What it hides: the intermediate wallet, and the fact that the app has to finish the move. It remembers the move and calls the splice when the payment has confirmed, but only while the spending account is on screen. A move started and then left alone waits until Alice next opens it.
Look underneath
deposit_address() is node.onchain_payment().new_address(). After broadcasting, Move.kt sets the MovesIn flag. The spending panel polls every two seconds and, while the flag is set and the node has on-chain coins, calls move_in:
onchain = spendable_onchain_balance_sats # confirmed only amount = onchain - fast_rate * 400 # see section 07 if a usable channel with the provider: splice_in(channel, provider, amount) on failure: ConnectionFailed -> ProviderUnavailable, retry later provider disconnected -> ProviderUnavailable # never a 2nd channel anything else -> fall through open_channel(provider, amount)
The disconnect check matters: ldk-node reports every splice failure the same way, so without it a provider that dropped offline would get a second channel opened at it. While an earlier splice is still unconfirmed (tracked in splices.json, ignored after a week), moves fail with "Could not reach the provider. Try again in a moment."
07 The second fee
The app sets aside the second fee at the fast rate for 400 virtual bytes, and gives back what is not used
The splice or channel open is a transaction too, so it pays a network fee. The app cannot know its exact size in advance, so it reserves a generous amount.
Fees are priced per virtual byte, a measure of how much block space a transaction takes. The app takes the current fast rate, say 8 sats per virtual byte, multiplies it by 400, and holds back 3,200 sats. It splices the other 96,800 into the channel. A splice usually needs less than 400 virtual bytes, so if the real fee is 1,400 sats the remaining 1,800 stay in the phone's Lightning wallet, outside the channel, where Alice can send them back to savings.
What you see: the estimate on the confirm screen, "a second network fee of about 3,200 sats", and later on the spending tab "1,800 sats is left over outside your channel and can move to savings." with a "Move it to savings" button.
What it hides: how the 400 was chosen. The spending balance shows 96,800 sats, not 100,000.
Look underneath
// src/lightning.rs
const MOVE_VBYTES: u64 = 400;
fn move_fee_sats() = fee_estimates().fast * MOVE_VBYTES
The comment in the source: a splice spends the channel output plus a few wallet coins, so 400 is generous on purpose. A P2WSH 2-of-2 funding input with its witness is roughly 100 virtual bytes, each wallet input about 68, and each output 31 to 43.
The "fast" rate is the Esplora estimate for a two-block target. The leftover button calls withdraw, which is send_all_to_address to a fresh savings address; its fee comes out of the leftover. The button is hidden while a move in is still pending.
8 sat/vB and the 1,400 sat actual fee are illustrative.
08 Moving out
Moving to savings is a splice-out that pays part of the channel to a savings address
Move to savings takes part of the spending balance, 40,000 sats in this example, out of the channel and back on chain.
The reverse move is the same idea run backwards. Alice and the provider sign a transaction that spends the channel coin and creates two coins: a smaller channel coin, and a 40,000 sat coin at a fresh address in Alice's savings. The fee for that transaction comes out of her spending balance. The channel stays open and keeps working while the splice confirms.
The channel coin holds 250,000 sats under the lock Alice and the provider share. Alice wants 40,000 of her part back in savings.
Alice and the provider both sign a splice-out, a transaction that spends the channel coin.
The channel coin is used up, and the transaction creates a smaller channel coin under the same shared lock. The channel stays open.
The same transaction creates a 40,000 sat coin at a fresh savings address that only Alice's key opens. The fee comes out of her spending balance.
Both coins come from one transaction, so there is no moment when the 40,000 sats belong to neither account.
What you see: "Savings gets 40,000 sats" "plus 900 sats fee", "It shows in savings right away and is spendable after a confirmation.", then "Moving 40,000 sats to savings".
What it hides: the splice and its fee rate. The address is the next unused savings address, fetched for you.
Look underneath
ACINQ: peer.estimateFeeForSpliceOut(amount, script, feerate) for the quote, then peer.spliceOut(amount, script, feerate). Moving everything drains the balance less the splice fee at the moment it runs, so a fee that rose since the quote cannot overdraw it.
ldk-node: the fee is move_fee_sats() again (fast rate x 400), taken from the channel:
all = outbound_capacity - fee amount = requested, or all when moving everything splice_out(channel, provider, address, amount)
The 900 sat fee is illustrative.
09 Closing instead
When the provider cannot splice, moving everything closes the channel instead
Some providers do not support splicing. With them, Alice cannot take part of her balance out, but she can take all of it.
Taking everything out means ending the channel. Alice and the provider sign a closing transaction that spends the channel coin and pays each side its share: Alice's part to the phone's Lightning wallet, the provider's part back to the provider. Once that confirms, Alice moves her part to savings with one more payment. Asking for part of the balance with such a provider fails before anything is signed.
What you see, moving everything: "Your provider cannot move part of a channel, so the channel is closing. The money shows in spending until then; move it to savings once it confirms." Moving part: "Your provider can only move the whole spending balance at once."
What it decides: to close only when the splice fails while the provider is still connected. A dropped connection gives "Could not reach the provider. Try again in a moment." and never closes.
Look underneath
match splice_out(...) {
Ok => Spliced
Err if !connected(provider) => ProviderUnavailable
Err if moving everything => close_channel(); ChannelClosing
Err => PartialMoveUnsupported
}
close_channel is ldk-node's cooperative close (BOLT 2 shutdown and closing_signed). This path exists only for ldk-node providers; ACINQ always splices.
10 Provider vanishes
If the provider disappears mid-move, every coin still has a way out that needs only Alice's key
Suppose the provider goes offline for good while Alice's 100,000 sats are on their way in. Where the coins are decides what happens.
At the ACINQ swap-in address, the cooperative lock needs ACINQ's signature, but the second lock opens with Alice's key alone after about six months. In the phone's Lightning wallet, with another provider, the coins were only ever Alice's. Inside the channel, the coin needs both signatures to spend cooperatively, but Alice already holds a transaction the provider signed earlier that pays out her latest balance. She can publish it alone. That is a force close, and her share opens to her after a waiting period set when the channel was made. In each case the provider can stall Alice but cannot take her coins.
OnlyBits has no button for a force close and no screen for the swap-in refund. The coins are recoverable from the keys in Alice's recovery phrase, but today that needs other software. With another provider, a move in that keeps failing also hides the "Move it to savings" button while the app keeps retrying.
What you see: "Could not reach the provider. Try again in a moment." or "The money did not move. Try again later."
What it hides: that a failed move is not a lost move. The savings payment already happened, and the coins are waiting at one of the three places above.
Look underneath
Force close
Each side holds a commitment transaction signed by the other, spending the 2-of-2 funding output. Publishing yours pays the other side at once and pays you through a to_local output that is locked by OP_CHECKSEQUENCEVERIFY for to_self_delay blocks, a value the other side picked at open. One to two weeks is common.
The anchor reserve
ldk-node normally keeps on-chain coins aside to pay for a force close through anchor outputs. The app marks its provider as trusted not to need that reserve, so a brand-new wallet can accept a first channel. The source comment says the consequence: the provider has to get any force close confirmed itself.
After a restore
ldk-node keeps channel state only on the phone. A restored phone has none, the provider force-closes the channel it can no longer use, and src/lightning/recovery.rs sweeps Alice's side back using payment keys derived from the seed.
The six-month refund delay is lightning-kmp's default, not a value set in this app.
11 Alice cheats
Publishing an old, bigger balance after moving out hands the provider the whole channel
After the splice-out, Alice still has an old commitment transaction on her phone that says she owns 140,000 sats of the channel. She might try to publish it and keep both the 40,000 in savings and the old balance.
Two things stop her. Once the splice-out confirms, the old channel coin no longer exists, and her old transaction spends nothing. Before that, the old state is revoked: when Alice and the provider signed the new balance, Alice handed over a secret that lets the provider take all of the channel's money if she ever publishes the old one. Her own share is locked for the waiting period, and the provider uses that time to claim it.
After the splice-out, Alice's phone still holds an old commitment transaction that gives her 140,000 sats of the channel.
She publishes it before the splice-out confirms. Her share does not pay out at once: it is locked for the waiting period.
When she and the provider signed the newer balance, Alice handed over a revocation secret for this old state.
During the wait, the provider uses that secret to take her share. Publishing the old state hands the provider the whole channel.
Once the splice-out confirms, the old channel coin no longer exists, and the old commitment spends nothing at all.
What you see: nothing. The app has no control that publishes an old state; only the Lightning engine signs commitments, and it always uses the latest.
What it hides: that the engine has to keep watching the chain for the provider's old states while the app runs. A phone that stays offline for longer than the waiting period gives a cheating provider a window.
Look underneath
Each commitment's to_local output has two paths:
OP_IF <revocationpubkey> # the other side, with the revealed secret OP_ELSE <to_self_delay> OP_CHECKSEQUENCEVERIFY OP_DROP <local_delayedpubkey> # you, after the delay OP_ENDIF OP_CHECKSIG
During a splice both the pre-splice and post-splice commitments are revocable in the same way, so the splice does not open a gap. ldk-node and lightning-kmp both run their own chain watchers.
12 The bill
Moving costs two fees, a wait for blocks, and a provider that has to show up
A move in costs the savings payment's network fee and then the fee for the splice. With ACINQ the second is folded into a charge of at most 5,000 sats. With other providers it is a second network fee, reserved at the fast rate.
Each move waits for at least one block, and with ACINQ for a few, so money is not in spending the moment Alice taps the button. And every step past the first needs the provider to be online and willing. If it is not, the coins are safe but stuck for as long as the provider stays away, or for the six-month refund delay at ACINQ's swap-in address. Moving back to savings costs one fee again, or two when the channel has to close.
What you see: every fee before you confirm, as a number in sats, and the wait as plain words: "usually within an hour", "after a confirmation".
What it does not show: which provider-side step is pending at any moment, or a way around a provider that stops answering.
Look underneath
What did not get traded away
At no point in a move do the coins sit under a lock that the provider can open alone. They are under Alice's key, or under Alice's key and the provider's together with a path that Alice can use alone after a delay. A custodial wallet moves money between accounts instantly and for free because it is only editing its own database, and that database is the thing a custodial user has to trust. These moves are slow and cost fees because they are recorded on the chain instead.
What a submarine swap would be
This is not a submarine swap, where a third party pays Lightning in exchange for an on-chain payment locked to the same hash. The app never uses one: both directions are splices, opens, or closes of Alice's own channel.
One move in, one move out
Two locks, one transaction between them, and a provider that signs
- The two accounts
- Savings is coins locked to Alice's key; spending is her share of one coin locked to her key and a provider's.
- The move
- An on-chain transaction that spends a coin under one lock and creates a coin under the other.
- The splice
- A transaction both sides sign that replaces the channel coin with a bigger or smaller one while the channel stays open.
- The swap-in
- ACINQ's waiting room: Alice and ACINQ together, or Alice alone after about six months.
- The reserve
- With other providers, the second fee is held back as the fast rate times 400 virtual bytes, and the unused part stays Alice's.
- The way out
- A force close lets Alice leave a channel alone, after a delay, if the provider disappears.
- The bill
- Two fees in, one or two out, at least one block of waiting, and a provider that has to answer.
Alice is the wallet owner; the provider, drawn in yellow on this page, is ACINQ or any LSPS2 company, not Carol. The 300,000 sat savings balance, the 150,000 sat channel, the 600, 900 and 1,400 sat fees, the 8 sat/vB fast rate and the 1,800 sat leftover are illustrative. The 5,000 sat cap, the 400 virtual bytes, the fast-rate reserve, the one-confirmation wait, the splice-then-open fallback and the close-on-move-everything rule were read from the app's source (src/lightning.rs, Move.kt, AcinqEngine.kt), and the quoted copy is the app's own text. The swap-in script shape, its three-confirmation minimum and its six-month refund delay come from lightning-kmp's defaults as the app uses them, not from code in this repository, and are the details most likely to age first, along with splicing itself, which providers are still adopting. This matches the app as of October 2026. Read Lightning explained first if channels are new; Fees explained covers the fee rates, and Taproot explained covers the kind of address the swap-in and savings both use.