Consider Movement field(s) for deferred_gains in like_kind exchange txns #20

Closed
opened 2025-07-08 08:35:36 -04:00 by AtHeartEngineer · 0 comments

Originally created by @scoobybejesus on 9/2/2019

At the time of this writing, the software doesn't track how much gain was deferred in a like-kind txn; it simply adjusts the movement's proceeds value to be equal to the movement's cost basis value, thus netting a $0 gain/loss.

What may be helpful to know/track is how much gain was deferred in that txn. Additionally, it would be helpful to know how much of the deferred gain is the result of a prior like-kind exchange txn.

Consider the following sequence of transactions.

  1. Buy 1 BTC for $1,000.
  2. Trade 1 BTC for XMR when BTC/USD is $1,500. (Gain would be $500)
  3. Trade all XMR for 1 BTC when BTC/USD is $2,000. (Gain would be $500.)

Then we'll apply like-kind treatment.

The proceeds in txn 2 would be adjusted from $1,500 to $1,000 (a $500* gain deferral). The resulting gain would be $0. The resulting cost basis of the XMR acquired would be $1,000.

Then for txn 3, the proceeds would be adjusted from $2,000 to $1,000 to result in a $0 gain (a $1,000* gain deferral). The resulting cost basis of the BTC acquired would be $1,000.

* The total of the gain deferrals is $1,500. But the total gains needing to be deferred was $1,000. The total of the gain deferrals is overstated by the amount of previous deferrals.

According, it may be appropriate to add two fields to Movement:

pub deferred_gain_prev: Cell<d128> and
pub deferred_gain_curr: Cell<d128>

*Originally created by @scoobybejesus on 9/2/2019* At the time of this writing, the software doesn't track how much gain was deferred in a like-kind txn; it simply adjusts the movement's proceeds value to be equal to the movement's cost basis value, thus netting a $0 gain/loss. What may be helpful to know/track is how much gain was deferred in that txn. Additionally, it would be helpful to know how much of the deferred gain is the result of a prior like-kind exchange txn. Consider the following sequence of transactions. 1. Buy 1 BTC for $1,000. 2. Trade 1 BTC for XMR when BTC/USD is $1,500. (Gain would be $500) 3. Trade all XMR for 1 BTC when BTC/USD is $2,000. (Gain would be $500.) Then we'll apply like-kind treatment. The proceeds in txn 2 would be adjusted from $1,500 to $1,000 (a $500* gain deferral). The resulting gain would be $0. The resulting cost basis of the XMR acquired would be $1,000. Then for txn 3, the proceeds would be adjusted from $2,000 to $1,000 to result in a $0 gain (a $1,000* gain deferral). The resulting cost basis of the BTC acquired would be $1,000. \* The total of the gain deferrals is $1,500. But the total gains needing to be deferred was $1,000. The total of the gain deferrals is overstated by the amount of **previous** deferrals. According, it may be appropriate to add two fields to `Movement`: `pub deferred_gain_prev: Cell<d128>` and `pub deferred_gain_curr: Cell<d128>`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/cryptools#20