So I started playing around with beancount again and quickly ran into a 
`Transaction does not balance: (-0.0000000000000000000000001 USD)` when 
recording crypto swaps in the way I would have thought they should be 
recorded. I have attached a minimum example file showing the transaction 
that fails to balance. At its core, I purchase crypto A from an exchange in 
the base currency of USD and then attempt to swap crypto A for crypto B, 
paying the transaction fees in crypto A, and the transaction won't balance. 
What would be the proper way to do this? Note in this example that Crypto A 
and Crypto B have different decimal values (8 vs. 14).

```
2022-05-07 * "Dex Exchange" "Exchange Crypto A for Crypto B"
    Assets:Crypto:Ledger                      257.12987453124598 CRYPTO_B {}
    Expenses:Crypto:Transaction-Fees            0.00000895 CRYPTO_A { 
216.43 USD }
    Expenses:Crypto:Exchange-Fees               0.015 CRYPTO_A { 216.43 USD 
}
    Assets:Crypto:Ledger                       -1.25000895 CRYPTO_A { 
216.43 USD }
```

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/2beb76ae-227c-4951-8ec2-323e3a12d42cn%40googlegroups.com.

Attachment: test.beancount
Description: Binary data

Reply via email to