The P2P Swap feature in Syrius offers users an easy and censorship resistant way of exchanging value, peer-to-peer, without intermediaries on Network of Momentum.
This funding request is meant to cover the development costs related to the Syrius P2P Swap feature and the additional tooling and services related to it.
Impact
Being able to trustlessly exchange value between individuals in a censorship resistant way over the internet without intermediaries and other third parties is one of the cornerstones on which the cryptocurrency revolution is being built upon. Currently there is no user friendly way to trustlessly trade on Network of Momentum.
P2P Swaps are not a replacement for an AMM or an orderbook based DEX, but the P2P Swap feature will offer a way for all users to conduct feeless OTC swaps with ZTS tokens, allowing for more economic activity to start taking place on Network of Momentum. The need for trustless ways of trading was once again highlighted by the recent unfortunate demise of the only CEX that ZNN and QSR were trading on.
The Zenon community has always had an active OTC market and large OTC trades are conducted regularly. A safe and liquid OTC market is especially useful when conducting large trades. Traditionally the downside of OTC trading is that the trading parties have to either trust each other or use a third party escrow that usually requires a fee to conduct the trade. With P2P Swaps in Syrius, there is no need to trust the trading partner or pay an escrow for their services.
Team
HyperCore One, with two members as the primary contributors (@vilkris, @sol), and three other members supporting with testing, reviews and user guidance.
Breakdown of work items
A breakdown of what this proposal covers:
-
UI/UX design, research and iteration => 160 hours
-
Prototyping, implementation and testing => 440 hours
-
Writing manual test cases and doing a write-up of the implementation => 40 hours
-
Incentivized peer review and testing => 30 hours
-
HTLC Watchtower: design, implementation and testing => 120 hours
-
Fixing potential bugs post release
-
A tutorial in written format
Areas of interest not in the scope of this proposal
Currently the P2P Swap feature does not have an automatic matchmaking system, which means that users have to find a trading partner themselves. A straightforward way to find a trading partner is to use OTC chat rooms for example. Automatic matchmaking/an orderbook would have to be considered in a separate proposal.
What about cross-chain swaps?
HTLCs can be used to facilitate cross-chain swaps and initially, when the P2P Swap project was started, the idea was to integrate a user interface for cross-chain swaps into Syrius. After a decent amount of time spent on researching and designing a solution for this, we have decided not to include the cross-chain swap feature into the scope of this proposal.
Reasoning
We could provide a relatively user friendly interface for the NoM side of the swap, but since there are basically no wallets on other chains that support HTLC-based cross-chain swaps, it would mean that the swap would have to be done via rudimentary command line tools on the other chains. Based on our testing, doing cross-chain swaps with Bitcoin using a command line tool is hard and error prone. So, even if there was a user friendly interface for the NoM side of the swap, the purpose is defeated when the user has to use rudimentary tooling on other chains.
Another option would be to attempt to integrate the full cross-chain swap flow into Syrius for some chains, like Bitcoin, but this will require a significant amount of research and effort to do and will have to be considered in a separate proposal, if there is enough demand for such a feature.
We are still actively continuing the testing of cross-chain swaps to see what is technically feasible and what makes sense from a user experience point of view.
What has already been delivered
The first iteration of the UI design was presented to the community in November 2022. After feedback from the community and prototyping of the UI, more iterations of the UI design were made until the final version of the UI design was presented to the community in March 2023.
After iteration and prototyping, the first version of Syrius with the P2P Swap feature ready for public testing was released a while ago. Instructions on how to try out the P2P Swap feature on the HyperCore One testnet can be found here.
Please note that the P2P Swap feature is only usable on testnet for now.
What is still to come
The P2P Swap feature has not yet been enabled on mainnet. We are close to having a release candidate of Syrius available for public testing that has mainnet support for P2P Swaps.
A deposit recovery feature is still pending development. This feature will allow a user to recover their deposited swap funds in the unlikely event that they completely lose access to the machine they started the swap on.
Further testing and code review is also needed and the tutorial has to be made.
Additional safety measures: HTLC Watchtower
Work on a watchtower service has been started. In short, the watchtower is a service that anyone can run to improve the safety of P2P swaps. Its purpose is to watch over the swaps that are being conducted on the network to make sure that swap participants receive their funds as expected in situations where Syrius fails to do so for whatever reason. The watchtower utilizes the proxy unlocking feature of the embedded HTLC contract.
A more detailed write-up of the watchtower can be found here.
HyperCore One is already running an MVP version of the watchtower on both testnet and on mainnet. Hopefully, in the future more watchtowers will be launched by the community to further improve swap safety.
Timeline
If nothing unexpected happens, fully featured releases of Syrius and the HTLC watchtower should be available in Q3.
Funding request
Total: 13,000 ZNN + 130,000 QSR
Total hours put in/allocated: 790h
If this proposal is accepted, a payout request will be made for the UI/UX design, research and iteration
phase and for 1/4th of the Prototyping, implementation and testing
phase.
This means a payout request of approximately 35% of the total requested funds, which will be rounded to 4,300 ZNN + 43,000 QSR.
If this proposal is accepted, work on the remaining items will be continued. The rest of the funds will be requested in batches, according to the following milestones:
-
1,700 ZNN + 17,000 QSR once a test version of the P2P swap feature that can be used on mainnet is available for public testing.
-
2,000 ZNN + 20,000 QSR once the swap recovery feature has been implemented and is available for public testing, the manual test cases have been written and the tutorial has been made.
-
5,000 ZNN + 50,000 QSR once the fully featured Syrius release and the HTLC watchtower are available and the work items have been completed.
We will wait for a couple of days to respond to feedback and gauge the general sentiment and amount of support for this proposal, until deciding whether to submit it on chain.