Author

Topic: Feature Request - Transaction History/Taxes/Gains-Losses (Read 723 times)

hero member
Activity: 619
Merit: 500
Sounds like a nice feature.

In addition to the described automatic behavior I think it should be possible to manually enter an amount into the InValue and OutValues.

For example for the following scenarios:

1. sweeping an address
One might have bought Bitcoins at a Value of $220 at a certain point.
But at the time the address is swept into Electrum the Value is $200.
In this case I would like to adjust the InValue to the $ at the time of the original purchase.

2. different market price
A webstore might not use the same BTC value as the plugin does.
If the web store requests 1 BTC for $220 but the plugin gets the value $200 from the set market I would like to adjust the OutValue to the exchange rate to what the store gave me.
full member
Activity: 162
Merit: 109
It could work.
I think it could be added to the existing 'exchange rates' plugin
Is it added?
Now i have v2.5.4 of Electrum and i see that my Total Balance (bottom line in Electrum) is X and incremental balance (Y) from exchange rate plugin (right column) has a same sum as Total X (X==Y). But previous column is "USD Amount" has a history binded price. And i see that incremental balance to be changed differently - for outgoing transactions incremental balance to be incr/decr for hostory's rate but incoming balance to be changed to other rate (is not history rate - may be full sum corrected value). Sorry for my English. But i think there some code changes which are related with same algorithm.

RustyNomad, and your suggestion is same as my suggestion by other words as i think Smiley
https://bitcointalksearch.org/topic/m.8503970
legendary
Activity: 1896
Merit: 1353
It could work.
I think it could be added to the existing 'exchange rates' plugin
sr. member
Activity: 336
Merit: 251
There are currently some websites and or software applications that assist bitcoiners with their accounting needs for their bitcoin transactions. These are focused on the tax aspects and especially on the capital gains and or losses from transactions.

I understand that this might not apply to everybody as tax regulations in all countries are not the same and some would thus not require such detail from each and every transaction. It would however still be a very nice feature to have for any bitcoiner which would allow them to see the actual gains and or lossed made over a period of time. I'm sure that this can be built into Electrum which would greatly add to the value of the software.


My suggestion would be to:

1) As a first step, keep the full transaction history of the wallet in a separate file as its currently being done with the contacts in the wallet which is saved to the 'contact' file within the Electrum folder.

2) Keep the option to export all history in a csv format so that the data can be used in a spreadsheet. Maybe include the option to be able to specify dates from or between which you want history exported.

3) Add an additional field to the history window where the actual dollar price of the transaction is recorded at the time of the transaction (InValue). This would apply to all incoming  transactions.

4) Add another additional field in the history window where the outgoing actual dollar price is recorded for all outgoing transactions (OutValue).

5) Add another field (Gain/Loss) where the actual dollar gain and or loss is recorded for each transaction.


How this will work:

Below is a representation of what the history tab might look like after the implementation. There are 5 transactions, earliest at the bottom. See the notes below (read bottom up) to see how this will work.

Code:
  Date             Description                         InValue     OutValue    Gain/Loss       Amount         Balance      
5) 2015-04-17 17:12 Donation to Electrum.org            $220        $232        +$12            -0.80000000    1.10000000
4) 2015-03-11 07:00 Payment received oninvoice 124      $420                                    +1.50000000    1.90000000
3) 2015-02-05 08:20 Payment to SatoshiLabs              $27         $23         -$4             -0.10000000    0.40000000
2) 2015-01-10 15:30 Payment to Bitcointalk.org          $135        $125        -$10            -0.50000000    0.50000000
1) 2015-01-01 10:00 Payment received on invoice 123     $270                                    +1.00000000    1.00000000

Notes (read from bottom up)
5) A donation to Electrum of 0.8BTC. As stated, we have 0.4BTC which was received at $270 and the balance was received at $280. So the InValue of this transaction would be $270 x 0.4BTC = $108 plus $280 x 0.4BTC = $112. So the total InValue would be $220.

The dollar price at the time is $290 so the OutValue would be 0.8BTC x $290 = $232. The Gain/Loss will be +$12 which were made up from +$8 on the first 0.4BTC (InValue of $108 and OutValue of $116) and +$4 on the second 0.4BTC (InValue of $112 and OutValue of $116).

4) A deposit of 1.5BTC. Dollar price at time of transaction is $280 so the InValue is $280 x 1.5BTC = $420. No OutValue and no Gain/Loss. NOTE: We now have 1.9BTC in the wallet. 0.4 of this was received at $270 and 1.5 of it was received at $280.

3) Another payment, this time 0.1BTC. The coins being used to pay was received at $270 so the InValue for this transaction is $270 x 0.1BTC = $27. The dollar price at the time of the transaction is $230 so the OutValue will then be 0.1BTC x $230 = $23. So the Gain/Loss on these coins if measured in dollar value would be -$4.

2) Made a payment of 0.5BTC. The coins being used to pay was received at $270 so the InValue for this transaction is $270 x 0.5BTC = $135. The dollar price at the time of the transaction is $250 so the OutValue will then be 0.5BTC x $250 = $125. So the Gain/Loss on those coins if measured in dollar value would be -$10.

1) Received 1BTC, dollar price at that stage was $270 so the InValue is $270.


I'm not sure how much coding would be required to implement something like this but believe that it would be more than worthwhile as it would essentially mean that you have a robust wallet and account package (of sorts) built into one wallet application.

Also, the above should work on a first in first out bases but this is not required. If you select random addresses to pay from then the values should still add up correctly in so far as the gains/losses are concerned as it will still be based on the InValue of the coins selected.

The ideal would be if it could be done in such a way so that historic dollar values are taken from an exchange site so that all historical transactions are updated with the necessary values.

EDIT: The historical values will just be to update the old historic data. Once implemented it should use the live price at time of transaction.


What do you guys think? Overkill or something that can work?
Jump to: