Skip to main content

Onchain Bitcoin Deposits and Withdraws (Peg-ins and Peg-outs)

Fedimint's reserves are onchain bitcoin: the user deposits bitcoin through an onchain "peg-in" transaction and is issued ecash notes totalling the same amount. Users can then withdraw from the Fedimint by redeeming their ecash notes with the mint, who sends bitcoin to the user's specified receiver address.

You can do these onchain deposits and withdrawals directly in Fedi via the Send and Receive buttons, then clicking the arrow at the top of the screen to flip to "Bitcoin" from "Lightning". Fedimint onchain TXs will be higher fee, and it is almost always recommended to use Lightning Gateways or ecash transactions instead except for extremely high value transactions.

Nuances of Fedimint Onchain Transactions:

  1. DO NOT REUSE FEDIMINT PEG-IN ADDRESSES. Fedimint uses an atomic transaction structure to ensure the Fedimint only learns the secret to spend the pegged-in funds if it properly issues you the ecash notes. If you reuse an onchain address, the federation's wallet already knows how to spend the funds from when you last revealed it, and you are purely trusting the federation to issue you the ecash notes. Fedimint currently does so by default, but it's suboptimal and leaks privacy in practice. Address reuse is fiat, don't do it.

  2. Fedimint requires additional block confirmations for onchain receives (peg-ins) before issuing the ecash. In Fedi, you'll see an incoming bitcoin payment transition through 3 stages:

  • Unconfirmed when the transaction shows up in the mempool
  • Awaiting Extra Confirmations when the transaction is confirmed in the first block
  • Completed when the transaction has met the additional block confimations and you've been issued the ecash notes.
info

Extra block_confs is a configuration option set by the Fedimint guardians, and is usually an additional 3-10 blocks. These additional confirmations are required because the fedimint ecash notes you're issued after pegging in are blinded bearer-instruments: once issued it is impossible for the Fedimint to "recall" them, so if your peg-in transaction is reorganized out of a block the Fedimint will have issued notes without the corresponding reserves and enter a fractional reserve state.

  1. Fedimint onchain sends may take additional time to broadcast. Fedimint is a community banking solution and attempts to limit its onchain actions from multiple users. If you attempt to do an onchain withdraw, the Fedimint (depending on its wallet module version) might wait several minutes to consolidate payments from other users into a single transaction instead of doing 1 TX per user. This will make onchain withdraws slower, but massively improves privacy by hiding your payment in a larger crowd, and simultaneously saves on fees.