-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat(relay): report double payment #171
Conversation
803e1c4
to
4a444df
Compare
As mentioned on discord, if a vault makes 2 payments, and then uses the second payment for execute, the first block must be checked and reported by the clients after the execute. |
Either way this will be difficult to implement client-side, but the advantage of the alternate approach is that the data model is cleaner, each request is strongly linked to a single transaction ID and we would only require one function call to report theft. |
But it wouldn't be able to catch everything. What if the vault just makes multiple payments without ever executing the redeem? |
Good point, it would need to be executed before we could mark it for theft which isn't ideal - perhaps this is the optimal solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach. You could use the storing of the BTC tx id on redeem in combination flagging it as theft if it has not been executed after the redeem period expired. But I think this is cleaner since it does not introduce extra logic in redeem and kind of shifts complexity to the clients.
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
4a444df
to
0bab75b
Compare
Signed-off-by: Gregory Hill gregorydhill@outlook.com
See: https://spec.interlay.io/spec/relay.html#reportvaultdoublepayment