yoroi-frontend icon indicating copy to clipboard operation
yoroi-frontend copied to clipboard

Exported transaction history (CSV) is incorrect

Open nubbel opened this issue 3 years ago • 5 comments

I'm having a hard time making sense of the transaction history exported from the Yoroi dashboard. Here's an example that shows the exported data is incorrect: Screenshot 2021-12-05 at 23 00 01

The transaction history in the UI shows a deposit, yet the corresponding line in the CSV is a withdrawal. Also note that the net amount is in the fee column, which seems odd as well.

Please let me know how I can help to resolve this issue. Thanks! :)

nubbel avatar Dec 05 '21 23:12 nubbel

This is a withdrawal tx (you may have deregistered your keys) , which returned the 2 ADA deposit fee (minus tx fee that was required to pay for the withdrawal tx). This was deposit Fee paid when delegating (staking) against a pool, being returned to you.

rdlrt avatar Dec 05 '21 23:12 rdlrt

Thanks for your explanation. You are right, I deregistered my key. It’s still a bit unclear to me why this would classify as a withdrawal. Ultimately, funds are moving into my wallet, not away from it. Am I missing something?

The problem is -without further context- this makes the transaction history useless for accounting purposes. It’s impossible to differentiate this type of withdrawal (my balances increases) from an actual withdrawal, e.g. sending someone ADA (my balance decreases).

nubbel avatar Dec 06 '21 00:12 nubbel

I think from Wallet point of view, the only time you deregister the keys is when you withdraw your rewards. Your balance against Wallet account is divided into two buckets:

  1. Base Funds : Which you can operate normally (eg: pay 10 ADA out of 100 ADA to someone, or receive 5 ADA against an address, etc)
  2. Rewards: Think of it as a read-only bucket filled by protocol , you cannot send funds to it or cannot take funds out partially from this account

The only interaction with Reward bucket above is submitting a withdrawal transaction which moves all funds from your rewards bucket to Base Funds, hence - termed as withdrawal of rewards. The wallet makes it possible for you to - optionally - also deregister keys if needed, but the type of action performed is still withdrawal (just that deregister makes your account also return the 2 ADA deposit). I get that it sounds confusing if you associate withdrawal with taking funds out of wallet, but I believe it's where nomen-clature is tied to above concept on protocol itself.

(PS: There are more technical nuances to simplified statement above)

rdlrt avatar Dec 06 '21 00:12 rdlrt

Thanks for explaining the protocol concept, I've been wondering about this and what you say makes a ton of sense.

The nomenclature is actually not very important to me. What is important is that the transaction history should allow me to reconstruct what happened and in its current form it doesn't:

Screenshot 2021-12-06 at 20 59 06

In the screenshot above there are 3 transactions, all of which are Withdrawals in the CSV export. However, in the Yoroi UI the first and the last show up with a negative amount, the middle one with a positive amount. Said differently, I wouldn't be able to rebuild the UI purely from the information in the CSV. Nor would I be able to hand the CSV to an accountant to do my tax report.

Ideally, there would be entries for both buckets in the CSV, i.e. the Withdrawal from the rewards bucket would be matched by a Deposit to the base bucket.

I understand that this would be a bit of work, I'd be happy with just the "raw" data, i.e. whatever data is driving the UI.

nubbel avatar Dec 06 '21 21:12 nubbel

I fully agree that the CSV does not provide accurate information in the sense, and furthermore - staking rewards become more complicated depending on region 👍🏻 @vsubhuman - for your review, suggestions:

  1. the "Type" for CSV could include Intrawallet flag so that the CSV could make more sense?
  2. keyDeposits (deposit + withdrawal) and MIRs could reflect accurately in default comments.

rdlrt avatar Dec 07 '21 05:12 rdlrt