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 business logic preventing proving .unlock() without a signature from the recipient. #1

Open
maht0rz opened this issue Nov 16, 2022 · 0 comments

Comments

@maht0rz
Copy link
Member

maht0rz commented Nov 16, 2022

In case where the HTLC is being used for custom tokens, the actual funds transfer is done outside of the logic of the HTLC contract.
This means the the contract itself isn't in control of the balance update, since it's done in the same transaction, but not within the circuit. As a result of this, we have to add additional authorisation that prevents a valid proof from being created unless the caller can provide a signature of the intended fund recipient.

This issue is referenced as TODO here:
https://github.com/stove-labs/zk-htlc/blob/develop/src/HTLCPoseidon.ts#L200

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

1 participant