Skip to main content

Ecash

Transacting with Ecash

The most efficient way to pay another member of your federation. Ecash notes are privacy-preserving, bearer instruments, and allow for unique payment types not possible with Bitcoin/Lightning. Fedi currently supports 2 ecash native payment mechanisms: Chat and Animated QR Code.

For detailed information on how the underlying ecash notes work with your wallet, see the bottom section of this page.

The most important thing to understand about ecash is that it's a bearer instrument: the ecash notes are physically stored on your device, and you can give them to someone else to reissue with the Fedimint to complete a payment.

Reissuing is the process of redeeming spent ecash notes. When you reissue ecash, the Fedimint invalidates the ecash notes you received and issues you new ecash notes of the same amount. This is how ecash payments are completed: the sender gives the ecash notes to the receiver, then the receiver reissues the ecash notes to complete the payment.

Ecash Payments via Chat


Fedi's native Matrix chat has a wallet icon that lets you send ecash as a push payment or request ecash from your contacts by username.

When you send an ecash payment, you'll see that it starts in a "Pending" state with a Cancel button: the sender has sent the ecash to the receiver. Only once the receiver opens their app to receive the payment by reissuing the ecash does the payment state update to Paid.

Send or Receive Ecash via Animated QR Code


Fedi supports ecash payments via animated QR code, or you can copy the ecash string and paste it in the receiving wallet. We HIGHLY recommend using the animated QR code because it's much easier to use and effectively allows 2 airgapped devices to transact even if the sender is offline.

info

Completing an ecash payment is a 2 step process:

  1. the sender sends the ecash to the receiver,
  2. then the receiver reissues the ecash to complete the payment.
    An offline sender can complete the payment by communicating the notes to the receiver in person or via QR animation.
    If BOTH sender and receiver are offline, Fedi will show the payment as "Pending" until the receiver reconnects to the federation and reissues the ecash.
warning

If you remain offline and attempt to do multiple ecash payments of the same amount, you may notice an error from Fedi stating that you have insufficient notes. This is because you've already used all the denomination of notes you have in your wallet up to the amount you're trying to send. You can fix this by reconnecting to the federation, and Fedi will automatically reissue your ecash notes to to yourself to maintain a health distribution of notes.

Overview of How Ecash Payments and Wallet Balances Work

A Fedi user's wallet consists of a set of ecash notes of different denominations. The notes live on the device.A Fedi User with a balance of 100 satoshis might have 6x1sat notes, 5x2sat notes, 1x12sat note, 1x24sat note, and 1x48sat notes in their wallet. These ecash notes are bearer instruments: they are phyiscally stored on the user's device memory. The ecash notes are derived from a root secret, so the user can rederive these ecash notes in a recovery, but it's an important distinction that ecash notes are on the device vs. Bitcoin or Lightning which can be better thought of existing on the Bitcoin blockchain.

When a sender Alices wants to send ecash to receiver Bob, Alice gives the ecash notes totalling the intended amount to Bob. This can be done via a direct message for a chat payment, or via scanning an animated QR code for an offline send. When the receiver first receives the ecash, both the sender and the receiver know the valid ecash notes secret. Bob then redeems the ecash notes he received from Alice with the Fedimint and is issued new ecash of the same amount. Now Bob has new ecash, and the ecash that Alice had is invalid and cannot be double spent.

When you do an ecash payment, it's extremely important to understand that the payment is not completed until the recipient performs the reissue, because until Bob reissues the ecash Alice could still reissue the ecash she gave Bob to invalidate it. Only one Bob has reissued is the payment complete.