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.
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.8
BTC. As stated, we have 0.4
BTC which was received at $270 and the balance was received at $280. So the InValue of this transaction would be $270 x 0.4
BTC = $108 plus $280 x 0.4
BTC = $112. So the total InValue would be $220.
The dollar price at the time is $290 so the OutValue would be 0.8
BTC x $290 = $232. The Gain/Loss will be +$12 which were made up from +$8 on the first 0.4
BTC (InValue of $108 and OutValue of $116) and +$4 on the second 0.4
BTC (InValue of $112 and OutValue of $116).
4) A deposit of 1.5
BTC. Dollar price at time of transaction is $280 so the InValue is $280 x 1.5
BTC = $420. No OutValue and no Gain/Loss. NOTE: We now have 1.9
BTC 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.1
BTC. The coins being used to pay was received at $270 so the InValue for this transaction is $270 x 0.1
BTC = $27. The dollar price at the time of the transaction is $230 so the OutValue will then be 0.1
BTC x $230 = $23. So the Gain/Loss on these coins if measured in dollar value would be -$4.
2) Made a payment of 0.5
BTC. The coins being used to pay was received at $270 so the InValue for this transaction is $270 x 0.5
BTC = $135. The dollar price at the time of the transaction is $250 so the OutValue will then be 0.5
BTC x $250 = $125. So the Gain/Loss on those coins if measured in dollar value would be -$10.
1) Received 1
BTC, 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?