provinzio / CoinTaxman

Calculate your taxes from cryptocurrency gains
GNU Affero General Public License v3.0
141 stars 31 forks source link

FIFO calculation per exchange, or total? #86

Closed uvok closed 2 years ago

uvok commented 2 years ago

Hi,

according to https://cryptotax.io/fifo-oder-lifo-bitcoin-gewinnermittlung/, the FIFO queue is supposed to be calculated per exchange. Quickly glancing over the code, I think currently CoinTaxman collects all operations in a single queue and then does the FIFO calculation. So if I put statements of multiple exchanges in the account_statements directory, the calculation might be incorrect.

Current workaround is to rename "unused" account statements to .csvx, .bak, or whatever, so they are not collected.

provinzio commented 2 years ago

If we change this, we have to acknowledge withdrawals and deposits between two exchanges. This is currently not supported. Does the withdrawal of coins also use FIFO principal?

uvok commented 2 years ago

Personally, I do not know that.

provinzio commented 2 years ago

In essence, however, I agree with your objection. The transactions should be evaluated separately according to depots. I've adapted the code accordingly. Currently only a warning is issued if there are disregarded deposits or withdrawals.

uvok commented 2 years ago

Cross-Linking issue from Rotki: https://github.com/rotki/rotki/issues/2438

Can this be made configurable?

provinzio commented 2 years ago

Cross-Linking issue from Rotki: rotki/rotki#2438

Can this be made configurable?

Should be really easy. Add a variable to config and extend taxman.evaluate_taxation with an if case.

provinzio commented 2 years ago

@uvok there you go