# Fees

joinstr has no coordinator fee. Peers pay the mining fee between them. A paid relay may charge its own fee for writing events.

## Output amount

The pool announcement carries a fee rate in sat/vB. The output amount is computed from it, assuming 100 vbytes per peer.

```
output = round(denomination × 100,000,000) − floor(fee_rate × 100 × peers) ÷ peers
```

The division rounds down. Every output in the pool gets exactly this amount.

## What you pay

There is no change output, so everything your input holds above your output goes to the miners.

```
your cost = your input − output
```

Clients only let you use a coin worth the denomination plus 500 to 5000 sats, so your cost is the per peer fee share plus whatever your coin holds above the denomination. Pick a coin close to the denomination plus 500 sats to keep it low.

### Example

A pool of 0.001 BTC with 5 peers and a fee rate of 10 sat/vB.

| | sats |
|---|---|
| Denomination | 100,000 |
| Fee share per peer, `floor(10 × 100 × 5) ÷ 5` | 1,000 |
| Output for every peer | 99,000 |
| Your input | 100,600 |
| Your cost | 1,600 |

## Limits every peer checks

| Check | Limit |
|---|---|
| Your input | denomination + 500 to denomination + 5000 sats (the CLI allows up to + 15000) |
| Your output | at or above the dust limit for every output type in the pool |
| Your cost | at most 15000 sats |
| Total fee of the coinjoin | between 100 and 10000 sats per peer |
| Fee rate (daemon) | at most 100 sat/vB |

A creator who announces an extreme fee rate cannot drain joiners, because each joiner refuses to sign a round that would cost them more than 15000 sats.

The dust limit is 294 sats for P2WPKH, 330 for P2TR and P2WSH, 540 for P2SH and 546 for P2PKH.

## Where the fee rate comes from

| Client | Source |
|---|---|
| Electrum plugin | Electrum's fee estimate, 3 sat/vB if none |
| Daemon and CLI | mempool.space `hourFee` over Tor, 5 sat/vB if unreachable |
| Web UI | Fixed 3 sat/vB |
| Android app | The node's `estimatesmartfee`, falling back to its minimum mempool fee |
| Sparrow | The wallet's fee estimate, editable when creating a pool |

## Recovery transactions

If the [recovery phase](index.md#recovery-when-peers-drop-out) runs, the smaller transaction is sized as `100 × outputs + 68 × inputs + 100` vbytes and the fee is split the same way.

## Relay fees

Any nostr relay can be used. Some relays charge for writing events. When you join a pool, the Electrum plugin shows a QR code with your one time nostr public key so you can pay the pool's relay if it asks. Free relays need nothing.
