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

Does this take crypto intra transfer fees into account? #9

Closed
Exegetech opened this issue Feb 23, 2022 · 4 comments
Closed

Does this take crypto intra transfer fees into account? #9

Exegetech opened this issue Feb 23, 2022 · 4 comments

Comments

@Exegetech
Copy link

Hi, sorry if this is described somewhere. Does this library calculate crypto intra transfer fees into account? Say I do these:

  • Buy 1 ETH from an exchange for $100
  • Transfer to my wallet, transfer to another wallet, transfer back to my wallet, then transfer back to exchange the leftover ETH, 0.9 ETH
  • Sell 0.9 ETH in an exchange for $110 (short term gain)

Would the cost basis would be 0.9 ETH for $100 or 1 ETH for $100?

@eprbell
Copy link
Owner

eprbell commented Feb 23, 2022

Thanks for the question. Transfer fees affect the in/out lot relationships and RP2 does keep track of them: check the "Investment Expenses" tab of the tax_report_us output for a collection of all transfer fees.

However you also need to consider buy and sell fees, which are used when RP2 computes cost basis and gain/loss: for more on this check issue 6 .

Hope this helps! Let me know if you have more questions.

@Exegetech
Copy link
Author

Thank you. That's amazing. How do you manage the computation flow? I sort of understand on bucketing the buys according to cost basis and then taking out from those buckets when selling, but with account for intra transfers, how does that work?

For example:

  • I buy 1ETH for $100
  • I buy another 1ETH for $120
  • From that first 1ETH, I sent 0.1 ETH to a friend, 0.9 to my wallet to another wallet to another wallet and back to exchange which left with 0.8 ETH due to transaction fees. From the second 1ETH, I do some other intra wallet transfers and it gets mixed up with the first ETH wallet.
  • I sell 0.8 ETH for $110

How do you trace the flow of that 1ETH@100 + intra transaction costs vs the 1ETH@120 + instra transaction costs

@eprbell
Copy link
Owner

eprbell commented Feb 23, 2022

RP2 fractions lots and pairs in/out lot fractions, according to the user-selected accounting method (FIFO and LIFO).

Regarding the example you gave, rather than using English, which can be imprecise, I think it would be best for you to model the scenario you have in mind using RP2 and then post results here with any questions and comments. That way we can focus more productively on specific concerns in a precise scenario.

A few suggestions to model the scenario above with RP2:

  • use InTransaction to model ETH you receive, buy, earn, etc. E.g.: buy 1 ETH for $100.
  • use OutTransaction to model ETH you give, sell, donate, etc. E.g.: send 0.1 ETH to your friend.
  • use IntraTransaction to model ETH you transfer between accounts you control (e.g. from your hw wallet to your Coinbase account). E.g. send 0.9 ETH from one of your wallets to another of your wallets or to your Coinbase account.
  • transfer fees are captured by specifying an IntraTransaction that has crypto_sent > crypto_received: the difference between the two is the transfer fee (see input files for file format details).
  • buy and sell fees are captured in the respective fee fields of InTransaction and OutTransaction (see input files for file format details).
  • after you're finished, check the generated rp2_full_report.ods output file, which contains full computation details and tracks the flow and pairing of each lot fraction in detail.

I also recommend reading the Running section of the documentation, which contains pointers to examples and to file formats.

@Exegetech
Copy link
Author

Thank you, I will check the examples more.

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

No branches or pull requests

2 participants