-
Notifications
You must be signed in to change notification settings - Fork 14
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
Check that value_msat_total is less than or equal to the amount sent #12
Comments
So you’re saying to do a test against what’s in the invoice itself and use the smaller of the two values? |
Maybe that won't work either. I guess the point of |
I found a spec for the proposed 7629173 spec. https://github.com/satoshisstream/satoshis.stream/blob/67f5db14fac8260341f0a4733733e3b20b75faa7/TLV_registry.md#field-7629173-proposed Looks like it contains a signature field I really think that this will hurt adoption if its not addressed. What If someone wants to build award or knight system on this. If there is no signature solution then boosts should only not include |
Relying on the value_msat_total declaration in its current form is not a long term solution. Using a version of Helipad and sending hand crafted keysend payments, I was able to forge a boostagram from Breez with a note and a value that was false. Since the value of value_msat_total will almost always be higher than the actual payment amount (due to routing fees and declared RSS splits) there is no real way to validate that the number is legitimate. I understand that Adam wants real values to be read out on the show and how important numerology is to people. One potential solution is to have boostagrams sent to only one of the nodes in the split, and then the declared value can be compared to actual received value, and if it falls within a certain percentage it can pass the validity check. For instance, I boost the Podcasting 2.0 feed, select who receives the boost from the splits. This would be a modal split, only one of the nodes could be selected per boostagram. I would select the Podcasting 2.0 node, and boost 1000 sats. Due to routing fees, only 9998 sats arrive to your node with the boostagram, but the value_msat_total would be 1000 sats. Then there can be some logic in helipad, or any other boostagram extractor, that could compare the actual total to the value_msat_total and ensure it falls into a chosen percentage range before showing it. |
I can start by just showing the two values in the UI and flagging the value_msat_total in something like Red if it doesn’t fall within a sane fee percentage window? |
That may work if you can find a percentage that works for you, but it would only really work if boostagrams have no recipient split. Otherwise I can send you 100 sats and say I sent 1000 sats and gave you only 10% of the split. Unless you can verify the transactions to the other receivers in the split, you can't verify that you were sent 10% of 1000 sats or 100% of 100 sats. |
To clarify, I don't see a problem with entrusting producers to send correct amounts and not lie, but there should be a UI setting to set to validated amounts only. I believe there will be a time where boostagrams become main stream enough to consistently get people trying to send fraudulent amounts in. It is better to solve the issue before it becomes pervasive. |
If you integrated the value block from the feed you could compare the percentages to see if they are reasonable. I am starting to think we should consider |
Agree with this. |
When you consider programming for #21 two things come to my mind:
I think the only way to do it properly is to check if the invoice matches the expected percentage split of the original boost amount . We could even check it against the sending app for more accuracy. If you see the boost is from curiocaster, you know the breakdown of what your split should be after their fee structure is applied. If the percentage is off by some small amount, we could mark it as bogus and not respond to it in the program...keep the sats, don't play the pews. hell, we could even say only mark it bogus if the boost comes in under expected split amount but just treat original boost amount as true if it's over the expected percentage. After all there are scenarios where people can directly boost your node from certain apps, which would cause a higher than your expected percentage in the boost amount. But we have to eventually program a way to reasonably verify the original boost amount. |
That check could and probably should be implemented client side with JavaScript. |
Nothing prevents a user from putting a value in
value_msat_total
which is greater than the amount actually sent. These transactions should either be ignored, flagged in the UI, or use the smaller value in the UI.The text was updated successfully, but these errors were encountered: