Hi,
I ran into a new obstacle while dealing with my crypto:
Because of the eight digits most cryptocurrencies can be divided into, I
had to add a default EUR tolerance:
option "inferred_tolerance_default" "EUR:0.001"
E.g.:
option "booking_method" "FIFO"
plugin "beancount.plugins.auto_accounts"
option "inferred_tolerance_default" "EUR:0.001"
2020-07-01 * "" "Buy XRP"
Assets:Cash:Binance -200.00 EUR
Assets:Crypto:XRP:Binance 1,000 XRP {0.2 EUR} @
0.2 EUR
2020-07-15 * "" "Buy XRP"
Assets:Cash:Binance -214.158 EUR
Assets:Crypto:XRP:Binance 428.3171498 XRP {0.5 EUR} @
0.5 EUR
The second transaction will fail without the option.
Then I tried to book a transfer manually:
option "booking_method" "FIFO"
plugin "beancount.plugins.auto_accounts"
option "inferred_tolerance_default" "EUR:0.001"
2020-07-15 * "" "Buy XRP"
Assets:Cash:Binance -214.158 EUR
Assets:Crypto:XRP:Binance 428.3171498 XRP {0.5 EUR} @
0.5 EUR
2020-07-30 * "" "Buy XRP"
Assets:Cash:Binance -200.00 EUR
Assets:Crypto:XRP:Binance 2,000 XRP {0.1 EUR} @
0.1 EUR
2020-07-31 * "" "Transfer"
Assets:Crypto:XRP:Binance -2,428.3171498 XRP {}
Assets:Crypto:XRP:Coinbase-Pro 428.3171487 XRP {0.5 EUR,
2020-07-15} ; reduced by 0.00000011 XRP
Assets:Crypto:XRP:Coinbase-Pro 2,000.00000000 XRP {0.1 EUR,
2020-07-30}
; transaction fee leg missing, therefore unbalanced by 0.00000011
The transaction has an assumed fee of 0.00000011 XRP.
I saved the file while creating the transaction. I noticed that beancount
didn't yield a warning/error that the transaction doesn't balance, although
I didn't add all legs to the transaction and the numbers didn't add up.
That's because of the EUR tolerance. If I delete the line
option "inferred_tolerance_default" "EUR:0.001"
beancount yields me an error because of the incomplete transaction, but
then again also for the first transaction.
To sum it up: Without the tolerance option beancount yields me a lot of
unbalanced transaction errors where the (real) EUR amounts are off by a
tiny fraction of cents. But with the tolerance option set beancount seems
to ignore unbalanced crypto lots up to the third decimal digit. E.g.: I
could cap the XRP amount to:
2020-07-31 * "" "Transfer"
Assets:Crypto:XRP:Binance -2,428.3171498 XRP {}
Assets:Crypto:XRP:Coinbase-Pro 428.317 XRP {0.5 EUR,
2020-07-15}
Assets:Crypto:XRP:Coinbase-Pro 2,000 XRP {0.1 EUR,
2020-07-30}
And there's no warning/error.
If the same kind of problem could occur with BTC the capped 0.0001498 units
would sum up to 3,45€.
How can I deal with that?
Regards
--
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/c326bb4c-7357-4006-b65e-2ac8f915dd95n%40googlegroups.com.