-
Notifications
You must be signed in to change notification settings - Fork 31
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
Resolve deposits and withdrawls #4
Comments
Just to confirm: Changing |
Changing the platform might resolve in a different price. The price of a coin at buy time is dynamically evaluated with the We might have to add an additional variable, so that we can distinguish between the buy-platform and the current platform. |
I agree, makes sense to add a new variable for the buy-platform and split up buy operations if necessary. Already an idea for how to match deposits/withdrawals if the amount is not equal? (If I remember correctly, some exchanges directly withdraw the deposit fee before crediting the amount. -> We could back-calculate the fee by subtracting the deposit amount from the withdrawal amount.) For deposits/withdrawals that cannot be matched, we could still move the respective buy operation to platform "unknown", so that at least the rest of the FIFO/LIFO tax calculation is correct. |
If it's unclear, we have to rely on user input and issue a warning or a question to the user. We might want to create a Is the withdrawal/deposit fee relevant for taxation? |
Yes, I also thought about a file that stores matching deposits and withdrawals like you explained. Possibly by storing the platform, transaction IDs (if available), timestamps, and if the fees are relevant for taxation (anything else?). I would say that the fees are relevant for taxation, if the assets are used for trading (not for buying stuff with crypto). |
I think for MULTI_DEPOT we would need a nested loop for that: First, sort all withdrawals chronologically, and go through the list. For each withdrawal, go to the platform and do the balancing similar to the taxation. Only then we can split up the respective buy operations correctly and move them to the deposit platform. |
I would resolve/match the withdrawals and deposits after the book reading and before the tax evaluation. Check that each withdrawal Operation has a deposit operation at the same timestamp or shortly after the withdrawal. Check that the transfered coin matches (fees might reduce the withdrawn/deposited amount. If we find a matching withdrawal/deposit, move some coins to the other platform. Now the fun question, which coins should be moved? I think that we can not move staked coins. But what about the others FIFO oder LIFO? This might lead to different tax evaluations. -- I would go with FIFO just because everything uses FIFO |
I agree with that we can't move staked coins and that we should use FIFO, but maybe we can even make it variable based on BalanceFIFOQueue/BalanceLIFOQueue. But still, in order to decide which coins / operations get moved, I think we have to do the full balancing of buys/sells/etc. |
You do not need to balance all coins. Just mark them or change the variables information beginning with the first in time. Operations need a new member To check if a coin is staked, we need to save a list of dates ( So we do
What do you think? |
What if you deposit a coin, which you stake afterwards? I think you have to evaluate staking and withdrawals in the same loop. |
True, we should match deposit and withdrals at the same time we evaluate the staking. Same is true for selling. So we have to do everything in the same loop. Problem: our tax evaluation is currently per platform. We need to change that and evaluate all operations sorted by time. |
What about evaluating all operations sorted by time, but having a separate balance for each platform? So we would have multiple instances of |
I like your idea. Run through all operations sorted by time. And resolve all deposits, withdrawals and note which coins were staked at which times. Using a balance queue per platform seems like a good idea for this. Afterwards we run over all operations sorted by time per platform, doing the tax evaluation. |
This is only affecting the calculation when In case of |
Yeah. This is for Multidepots tax evaluation and in general to pre-check whether all necessary Account statements exist. What ist the difference between Coinbase and Coinbase pro? |
Coinbase Pro is a product by Coinbase aimed to provide a more professional trading ui. You do have separate wallets however. |
Task if this issue is only to determine which deposit is linked to which withdrawal for all non It's not necessary to define, which specific coins gets moved by this. This is done on the tax evaluation. So balancing is not necessary here. |
Foreign currency/coin deposits have to match withdrawls from another exchange. Otherwhise the program is not able to calculate the tax gains properly.
Furthermore we have to resolve deposits and withdrawals between the exchanges to correctly evaluate the taxation (#86).
We should check this in between the book read-in and the evaluation nd raise a warning or an exception.
operations.platform
. Transactions might have to be splitted for this.Adressed in https://github.com/provinzio/CoinTaxman/tree/4-resolve-deposits
The text was updated successfully, but these errors were encountered: