8000 CGS and coin age drop after transaction · Issue #406 · meritlabs/merit · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CGS and coin age drop after transaction #406

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

Open
disifi opened this issue Nov 14, 2018 · 1 comment
Open

CGS and coin age drop after transaction #406

disifi opened this issue Nov 14, 2018 · 1 comment
Labels
daemon meritd issues

Comments

@disifi
Copy link
disifi commented Nov 14, 2018

Describe the issue

CGS now depends on coin age, but when I send small part of my balance, coin age resets and my CGS drops. It happens if coins I'm sending are from one bigger transaction.

Expected behaviour

When I'm sending part of my balance, it shouldn't matter what way I received the coins. If it was in many small transactions or one huge. Coin age should be calculated better, ignoring transactions to my own wallet.

Actual behaviour

When I received higher amount of coins in one transaction (e.g. 5000), and I want to send small part of it out of my wallet (e.g. 100), transaction is split as 100 to recipient and 4900 back to me. In this process, coin age resets and my CGS drop. For example transaction cadac5e971ad255e608b591c5d291ff6701bdc7c88b8afb1c637f3a017747cde

Screenshots.

transaction

@adilwali
Copy link
Contributor

@disifi -- This makes a lot of sense. I'm not sure that there is an easy solution to this problem, however.

The underpinning transaction model to Merit (and bitcoin) is such that one or more entire input must be sent as part of the TXN. If the amount of the input is greater than what you want to send, the rest will be returned to you as change.

Conditionally handling coin age for just the change transactions is potentially challenging. If for no other reason, than for the potential exploitation vector. (Nothing prevents a user from sending themselves a small amount of MRT and then re-setting coin age on the rest of their balance via the change dynamic.)

With that said, there is likely a robust way to deal with this -- it's just going to take a lot of effort. So I'd like to commit to thinking about it and discussing with other members of the core team.

@eugene-sy eugene-sy added the daemon meritd issues label Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
daemon meritd issues
Projects
None yet
Development

No branches or pull requests

3 participants
0