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
Stacks - Lightning Network Bridge #172
Comments
Thanks for submitting a grant proposal. Our team will review your submission and get back to you. |
Hi @pseudozach! We love this idea and would like to better understand the kind of support you’ll need to successfully complete this. Can you please schedule a quick call with Marvin to https://calendly.com/marvin-stacks. |
Calendly link shows no available slots, I'll try to reach out to Marvin via Discord and discuss. |
Congratulations. Your grant is now approved. Please complete the on-boarding link here: https://stacks-grant.netlify.app/onboard?q=896d058f896dbf92fb5189578a20c150 |
Hi,
This concludes M1, I'll continue on M2. |
@pseudozach nice work! some of the comments on the testnet contract still refer to Eth, I guess that should be STX? Question.. could you extend this for SIP10 tokens in general? Would be great to have LN invoices paid with Arkadiko's stablecoin USDA |
yes, I've noticed those after I deployed :), v2 will not have those references and I've also found a few potential improvements so I'll deploy v2 and update here (edit: done). The concept is certainly adaptable to SIP10 token exchange but SIP10 - LN swap contract would need to be developed, and backend/frontend would need work as well. maybe I can add that as M4, @RaffiSapire would that be ok? If approved, I can add a new milestone as below to support SIP10 swaps:
|
I'm happy to share a working demo of a successful submarine swap going from STX (mocknet) -> Bitcoin on Lightning Network (regtest): https://youtu.be/2GkRO_KLw4k Work on M2 and M3 is ongoing in parallel (and pending approval of M4), although lots of things to cover until it's ready for production, feels good to have a working demo of a sample scenario :) |
watched the demo, looks great @pseudozach! |
!M1_Complete |
Thank you for completing M1. The grant committee will review and confirm completion or send feedback within a week |
Hi Zach, I'm leaving some comments and questions on behalf of the grant committee:
Reference that can help: Great video by the way! Very exciting stuff. |
Thanks for the feedback Marvin. Please find my answers inline.
Thanks, |
Thanks @pseudozach - we are disbursing for M2. |
I see. And there is no way around that?
Looks good. Why do you have
Interesting! I had no idea that adding additional support had so many implications. I will bring this into the next committee meeting. |
This is the only way I could think of that accomplished submarine swaps, with all the security benefits and using the types in clarity. I was hoping I could convert principals <-> buffer as well but that doesn't seem possible at the moment.
Just as a fallback account that's for sure not controlled by either party, no special meaning. But now that you mentioned it, I guess it would make sense to have an impossible principal there for added safety. Any suggestions on what I can use?
Thanks, let me know the feedback from the committee. This was already quite an undertaking but so far good progress and I personally find it cool to work on. |
Something like |
All nodes/backend/frontend is now up and reachable at https://lnswap.org. I've also completed a reverse-submarine swap to ensure everything is OK. LN node has low liquidity so please test with small amounts.
|
I do use connect and @stacks/transactions in both views that user clicks to start a contract call here: https://github.com/pseudozach/lnstxbridge-frontend/blob/main/src/views/swap/steps/sendTransaction.js#L15 For other details (postconditions etc) I've commented on the repo issue with more details: pseudozach/lnstxbridge-frontend#1 |
!M3_Complete |
Thank you for completing M3. The grant committee will review and confirm completion or send feedback within a week |
This is fixed, contract calls use deny mode now: pseudozach/lnstxbridge-frontend#1 (comment) |
thanks to yours and another user report on discord, I've identified and resolved this issue. This is the relevant commit: pseudozach/lnstxbridge-frontend@9ae50b2 |
we've fixed a number of issues and pushed out a new contract version thanks to many users' reports: https://github.com/pseudozach/lnstxbridge/issues/10 |
Background
What problems do you aim to solve? How does it serve the mission of a user owned internet?
Project Overview
What solution are you providing? Who will it serve?
As part of this grant a new submarine swap implementation will be created and open sourced. This service will run an API that's reachable publicly and a front-end will serve non-custodial swaps between STX and bitcoin on Lightning Network.
This service will serve users that want a quick & non-custodial way to swap and services that want to accept other coins but do not want to deal with custody.
For instance this tweet, on integrating LN payments for Stacks apps, will be easily answered by integrating with this API: https://twitter.com/muneeb/status/1400134618230185985?s=19
Scope
What are the components or technical specs of the project? What will the final deliverable look like? How will you measure success?
Clarity contract that implements all required methods for submarine/reverse-submarine swaps
Backend server/API that manages an LN node, tracks payments to the clarity contract and executes swaps/refunds in case of failures in a non-custodial manner.
Frontend that makes it easy to complete swaps by preparing contract calls and guiding regular users through swap steps.
Once all the components are developed and deployed, we'll track usage if there's more demand for regular users to do non-custodial swaps or check if there's demand from both STX and LN app developers if an API is more useful, and focus accordingly.
Budget and Milestones
What grant amount are you seeking? How long will the project take in hours? If more than 20, please break down the project into milestones, with a clear output (e.g., low-fi mockup, MVP with two features) and include the estimated work hours for each milestone.
SoW: Clarity contract with required methods/checks/data structures for STX-LN swaps.
Deliverables: Contract code pushed to github, deployed to testnet.
Approx. Timeline: 1 month/100 hours
Grant Amount: $3000
SoW: Backend Server Implementation that can track/command LN node, track/communicate with Stacks contract.
Deliverables: Server code pushed to github, deployed to testnet.
Approx. Timeline: 1 month/100 hours
Grant Amount: $4000
SoW: Frontend Implementation to connect all components and guide user through UX to complete successful submarine/reverse-submarine swaps.
Deliverables: Frontend code pushed to github, deployed to testnet. Further testing and deploying all deliverables to mainnet.
Approx. Timeline: 1 month/100 hours
Grant Amount: $3000
Total Grant Request: $10000
Team
Who is building this? What relevant experience do you bring to this project? Are there skills sets you are missing that you are seeking from the community? Please share links to previous work.
Risks
What dependencies or obstacles do you anticipate? What contingency plans do you have in place?
Community and Supporting Materials
Do you have previous projects, code commits, or experiences that are relevant to this application? What community feedback or input have you received? How do you plan to share your plan to the community over time and as the final deliverable?
The text was updated successfully, but these errors were encountered: