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

Add paid/received interest rates to "listaccounthistory" #1736

Open
phigo90 opened this issue Feb 6, 2023 · 2 comments
Open

Add paid/received interest rates to "listaccounthistory" #1736

phigo90 opened this issue Feb 6, 2023 · 2 comments

Comments

@phigo90
Copy link

phigo90 commented Feb 6, 2023

Current situation: Listaccounthistory is a really powerful comment to get data for a specific address. Especially for tools that are tracking your transactions, received rewards, ... ! The problem is, that you can not track your vault in details once it is closed or the loan is paid back. Let us make an example based on an arbitrary selected address: https://defiscan.live/address/df1qk8k3sjd228myxw83awe29lsuy5slgf2mhj55ys. This address has a vault. By using the getvault comment, we are getting the following output:

{
  "vaultId": "100e2a0b0bb0dc515c80aceed04ba71c23543f7eddc72e1b6a4821e63be75c00",
  "loanSchemeId": "MIN150",
  "ownerAddress": "df1qk8k3sjd228myxw83awe29lsuy5slgf2mhj55ys",
  "state": "active",
  "collateralAmounts": [
    "37217.37994997@DUSD"
  ],
  "loanAmounts": [
    "0.00195135@NVDA",
    "557.73292685@UL"
  ],
  "interestAmounts": [
    "0.00003942@NVDA",
    "0.23902445@UL"
  ],
  "collateralValue": 44660.85593996,
  "loanValue": 28159.56044088,
  "interestValue": 12.07630551,
  "informativeRatio": 158.59926518,
  "collateralRatio": 159
}

Here, the current paid interests are listed. However, if the loan is paid back, there is no way to get this information again. One way would be to check the whole history (wallet balance, ...), what is in my view not a practicable solution.
Suggestion: Since each vault is related to one address, I suggest to add the paid/received interests to "listaccounthistory". The possible option could be "no_interests" which can be set by a boolean value. Currently we are doing this with "no_rewards" and this is a really helpful option.

{
"owner": "df1qk8k3sjd228myxw83awe29lsuy5slgf2mhj55ys",
"blockHeight": 2650874,
"blockHash": "1601fd0527b4b4f80c16c4449456f7e474798ef667fa0ebc5e6f1cd250e7bf9b",
"blockTime": 1675669679,
"type": "Rewards",
"rewardType": "LoanTokenDEXReward",
"poolID": "102",
"amounts": [
"0.00900873@DFI"
]
}

A possible output for "no_interests:false" should contain the following points:

  • the owner of the vault
  • the vautid
  • the blockheight
  • the blockhash
  • the blocktime
  • the rewardsType:"Paid/ReceivedInterests"
  • the TokenID
  • the amount

Why should we do that?: In my view, a large number of investors is not interested in DeFi because of the documentation for the tax report. In is not only a problem in Germany. In many other countries (like e.g. Austria) you need a well documentation of your crypto portfolio. By getting the paid/received interests for every block, it is way easier for e.g. tax tools to export the data to finally create a correct report. In addition paid interests are lowering the accrued taxes.
Currently, we have several solutions to create a tax report for the DeFichain. Adding the paid/received interests is the next step to deliver a one-click solution, that can potentially lead to a higher attractiveness of our project for many investors.
I know that devs are currently working on DMC. This point is not a time-urgent topic. But on long-term, I think it would massively help to add this option!

@defichain-bot
Copy link
Member

@phigo90: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

@LamboO
Copy link

LamboO commented Jul 29, 2023

(Feb 6) This point is not a time-urgent topic. But on long-term, I think it would massively help to add this option!

As the deadline for tax declaration in Germany is approaching for 2022 (Sep 30, 2023, without a tax accountant), I'm starting to get a bit nervous :D So it's becoming a time-sensitive topic for me. Do you have any plans to work on that after the successful release of DMC so that we can track received negative interest rates?

@prasannavl @phigo90

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

4 participants