-
Notifications
You must be signed in to change notification settings - Fork 94
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
Implement swap watcher nodes. #1431
Comments
For other protocols like ETH, simply generating a refund transaction won't work: adversary watcher node can broadcast it right away - it will fail due to lock time not expired burning taker ETH for gas fees. We will likely have to rework our swap smart contracts, allowing 3rd parties to call refund/spend fns for other nodes swaps. However, there should be a financial benefit or at least gas fees coverage for smart contract calls by watchers. So I think we should focus on UTXO first, and then figure out how we can do the same for other protocols. |
TODO List:
|
@caglaryucekaya @smk762 New |
|
@smk762 here's some test scenarios based on the integration tests I wrote: Swap set-up:
a) Watcher spends maker payment spend (https://github.com/KomodoPlatform/atomicDEX-API/blob/dev/mm2src/mm2_main/tests/docker_tests/docker_tests_inner.rs#L829): b) Watcher waits for taker: (https://github.com/KomodoPlatform/atomicDEX-API/blob/dev/mm2src/mm2_main/tests/docker_tests/docker_tests_inner.rs#L953) c) Watcher refunds taker payment: (https://github.com/KomodoPlatform/atomicDEX-API/blob/dev/mm2src/mm2_main/tests/docker_tests/docker_tests_inner.rs#L1019) 6 - Maker sends the maker payment, logs the |
TODO for Ethereum Swap Watchers:
|
As of now, we require trading parties to always be online during swap process. Going offline is specifically dangerous for takers due to how swap protocol works. To help them refund their payments or spend maker's in time, we need to add "watcher nodes" that will track swap transactions statuses and trigger the required action if the trading party doesn't seem to do it itself. It will be a concept similar to Lightning watchtower nodes.
The text was updated successfully, but these errors were encountered: