Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fiat balance #61

Merged
merged 3 commits into from
Aug 18, 2023
Merged

Fiat balance #61

merged 3 commits into from
Aug 18, 2023

Conversation

osteel
Copy link
Owner

@osteel osteel commented Aug 18, 2023

Summary

This PR adds the tracking of the fiat balance.

Explanation

Since UK tax payers are to report any capital gain or loss occurred for any transaction, including crypto-to-crypto ones, the total reported capital gain or loss doesn't necessarily reflect the actual value gained or lost in fiat terms.

This PR monitors all the swap transactions where either the acquired or disposed of asset is a fiat amount, for share pooling transactions as well as NFT ones.

Since this value is for information only and isn't meant to be reported to HMRC, I didn't use Event Sourcing to keep track of its state.

There's simply a Summary "projection" (Eloquent model) that an UpdateSummary action updates. The action is called by both the SharePoolingAssetReactor and NonFungibleAssetReactor classes. A SummaryRepository class is used to retrieve the summary.

Checklist

  • I have provided a summary and an explanation
  • I have reviewed the PR myself and left comments to provide context
  • I have covered the changes with tests as appropriate
  • I have made sure static analysis and other checks are successful

@osteel osteel marked this pull request as ready for review August 18, 2023 17:12
@osteel osteel merged commit a379b7f into main Aug 18, 2023
4 checks passed
@osteel osteel deleted the feature/fiat-balance branch August 18, 2023 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant