mirror of
https://github.com/scoobybejesus/cryptools.git
synced 2026-01-12 16:28:20 -05:00
Cost basis for ToSelf txns is allocating instead of assigning #8
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @scoobybejesus on 11/18/2019
In a toSelf transaction, for
nnumber of outgoingmovements, there will be a correspondingnnumber of incomingmovements. Though there will usually be a smaller quantity of cryptocurrency units incoming due to the network fee, the cost basis will remain the same.The behavior is currently that the cost basis for the outgoing movements is summed, and then it is allocated to the incoming
movements according to (quantity of incomingmovement) / (quantity of incomingaction_record) * cost basis sum of the outgoingaction_record.That's wrong. There should be no calculation.
The cost basis of the outgoing
movementshould be directly assigned as the cost basis of the corresponding incomingmovement. Sincelotorder is already preserved when creating newlots for the incoming ToSelfaction_record, this should be trivial.