CoinJoin × Lightning · proposal

JoinMarket channel rings

One public funding output, two private peer balancesCoinJoin changebecomes sharedLightning liquidity.A proposal for the life of changeafter a CoinJoin.ONE PUBLIC FUNDING OUTPUTABTwo peers, a private balance split.The chain sees the total, not the divider.
01 / The problem

Equal outputs hide ownership. Change adds clues.

Four inputs fund equal outputs and ordinary change in one CoinJoinMakers A, B, C supply coins for a fee. T organizes the round and pays the fees.120,000A150,000B180,000C200,000TCoinJoinFOUR EQUAL OUTPUTS100,000100,000100,000100,000Same value; no owner labels.FOUR ORDINARY CHANGES20,20050,40080,60097,800T also pays 1,000 to the miner.A’s accounting: 120,000 + 200 fee = 100,000 + 20,200 change
01 / The problem

A repeated fee can suggest a candidate maker

Fee calculation and candidate maker matchOne earlier output enters a later 50,000-sat round.Earlier equal output100,000Later CoinJoinEqual output50,000Candidate change50,200One maker’s slice, not the whole transaction.Implied fee: 50,000 + 50,200 − 100,000 = 200 satsAdvertised feesA: 200B: 400C: 600200 matches A.A is a candidate.
01 / The problem

A maker can still link old rounds

Two residuals later enter a CoinJoin as inputs from the same makerEARLIER EQUAL OUTPUTSSEPARATE MAKER ROUNDSCHANGE STAYSin the source mixdepthEarlier equal output100,000from a previous CoinJoinMaker CoinJoin50,000 equal outputResidual50,200Earlier equal output200,000from another CoinJoinMaker CoinJoin50,000 equal outputResidual150,200Later CoinJoinSame maker,two inputsSubset-sum analysiscan isolate a maker’s input groupCIOH can then link the two historiesCommon-input-ownership heuristic, within that maker’s slice
02 / The construction

Put change into shared channels

Ordinary change and ring channel funding are alternative outputs of the same CoinJoinORDINARY CHANGERING CHANNEL FUNDINGFour outputs · 249,000 satsFour outputs · 249,000 satsA20,200B50,400C80,600T97,800AB60,000A 15,000 + B 45,000BC55,000B 5,400 + C 49,600CT70,000C 31,000 + T 39,000TA64,000T 58,800 + A 5,200A: maker AB: maker BC: maker CT: taker
02 / The construction

Two neighbors, two bilateral channels

A, B, C and T form a ring of four bilateral channelsABCTOne channel per edge.Two peers per channel.AB · 60,000A 15,000 + B 45,000TA · 64,000T 58,800 + A 5,200BC · 55,000B 5,400 + C 49,600CT · 70,000C 31,000 + T 39,000Capacity is public. The balance splits shown are private.
02 / The construction

One participant can keep ordinary change

Five equal outputs and five residual outputs, including ordinary change for DMaker Dkeeps ordinary change while A, B, C and T use channels.D: 130,000 + 800 fee = 100,000 equal output + 30,800 changeFIVE EQUAL OUTPUTS100,000100,000100,000100,000100,000FIVE RESIDUAL OUTPUTSAB60,000BC55,000CT70,000TA63,200D change30,800T pays D’s extra fee.TA is 800 smaller.Other channels unchanged.
02 / The construction

Same funding output. Different balances.

One 60,000-sat funding output, three settled balance snapshots, not payer/payee identitiesCHAIN VIEW One unspent AB funding output: 60,000 satsPEER VIEW · three settled snapshots of the same channelOpeningA 15,000B 45,0005,000 across B → AA 20,000B 40,0008,000 across A → BA 12,000B 48,000Forwarding, rebalancing, payments or receipts can shift the balances.
03 / Cooperative reuse

Reuse shared funding, then settle the peer

Shared-funding CoinJoin, Lightning peer settlement, and alternative outcomesReset AB: A 15,000, B 45,000AB funding60,000A’s ordinary input99,800CoinJoin+200 maker feeEqual output100,000Escrow60,000OFF-CHAIN SETTLEMENTAOther LN route45,000 satsBSuccessA: escrow · B: 45,000 over LNNo payment, timeoutA: 15,000 · B: 45,000 on chain1. Secure recoveryB holds it beforeCoinJoin signatures leave.2. Confirm CoinJoinFunding moves intothe agreed escrow.3. Pay B over LightningSame secret linkspayment and backup claim.4. Claim the escrowCooperate if possible.Confirm before timeout.
04 / After opening

Spend and receive on chain or over Lightning

Makers and takers retain on-chain spending and receiving, with Lightning and swaps as additional optionsFOR MAKERS AND TAKERSSPENDRECEIVEOn chainStill availableEqual outputs / ordinary change→ on-chain paymentOn-chain sender→ fresh wallet addressLightningAdditional optionChannel balance → LN recipientLN sender → channel balanceUse outbound liquidity.Use inbound liquidity.SwapAdditional optionLN → swap → UTXOOn-chain funds → swap → LNBuy a UTXO from counterparty coins.Convert a receipt into LN balance.
05 / Closing

What changes with channel rings

Shared change, off-chain balances and cooperative reuseShared changeIndividual residuals becomeshared channel funding.No single output is oneparticipant’s entire change.Off-chain balancesBalances evolve withoutspending the funding output.Payments need not extendan on-chain change trail.Cooperative reuseUse shared fundingin another CoinJoin.Successful settlement avoidsa routine public peer split.Strongest against an outside chain observer, not every observer.
Questions

Thanks, questions

Thanks and questions, project documentation and contact linksJoinMarket channel ringsThank you for listening.Questions and discussion are welcome.joinmarket-ngGitHub project and source codegithub.com/joinmarket-ng/joinmarket-ngsgn.spaceContact detailssgn.space

Slide overview

Presentation controls

→ or Space advances one build. ← reverses it.

Shift + → skips to the next slide. A reveals the full current slide. R resets it.

O opens the overview.

T hides or shows the toolbar and progress bar. Esc restores them. F enters fullscreen and hides the toolbar. Keyboard navigation remains available.

P or Export PDF opens the browser print dialog. Choose Save as PDF. Each build becomes a separate page, preserving the progressive additions. The 12 slides produce 28 pages.

Keep background graphics on and browser headers and footers off. Use the supplied 16:9 page size. Exporting does not change the current slide or build. Ctrl/Cmd + P uses the same build-preserving output.

The presentation works offline. Only the external links require a connection.