Great concept, I am sure it will see a lot of use!
What I find most tricky is managing the onchain fee. Using the minimal fee is good for the Maker, but not suitable for the Taker. As required by the submarine swap model there are two transactions:
  • first the Maker deposits to the swap address - this can be a minimal fee transaction, but needs to be CPFP-d by the next.
  • then the Taker sweeps - using the minimal fee here as well results in transactions stuck for days in the mempool in the current environment. Even if there would be choice (which should be!) the sweep transaction needs to account for the deposit as well so even trying the next block fee might not be enough. For example a deposit could be a large, consolidating transaction which would have a much larger weight than the 1in-1out sweep txn. Prediction is difficult since all the fees need to be agreed beforehand.
For now there should be a warning to only swap to an own address and not use the platform to pay directly to a third party as the sweep transaction might need CPFP itself.
(also a bug report for the testnet page - querying the testnet mempool api returns a CORS error)
Proposing to use the mempool.space hourFee aka Low Priority instead of the minimumFee which results in funds in swaps being stuck for days: https://github.com/supertestnet/swap-service/pull/1
reply
bug report for the testnet page - querying the testnet mempool api returns a CORS error
Check if you have something like ublock origin running. For me, it did that til I turned off ublock origin.
Using the minimal fee is good for the Maker, but not suitable for the Taker
I reviewed and merged your pull request. Thank you for contributing!
reply
I reviewed and merged your pull request. Thank you for contributing!
back at you, thank you for building this and iterating fast!
Check if you have something like ublock origin running. For me, it did that til I turned off ublock origin.
I definitely have adblockers running. Will try again once bootstrapped a testnet node. On that note testnet channels would be welcome to: 0340a5fc39195696d42e4f43cc01f8c6726a0ef2c4b25e836352437e32d121b97c@rcl5jtbxbqqo5ttygooi53dyk7h33r4j5somy7xulkgosoytgjwa7kad.onion:9735
reply