stacksgov / critical-bounties

1 stars 0 forks source link

Integration of sBTC into Electrum #9

Closed will-corcoran closed 1 week ago

will-corcoran commented 1 year ago

Discussed in https://github.com/stacksgov/Stacks-Grant-Launchpad/discussions/849

Originally posted by **will-at-stacks** March 17, 2023 ### Introduction: sBTC is a SIP-010 fungible token on the Stacks blockchain that can be used in DeFi protocols, NFT marketplaces, DAOs, governance, and several other use-cases. The sBTC Bridge is a trustless two-way mechanism that allows users to wrap and unwrap BTC as sBTC. In its current state, users of Electrum (the popular, open-source, "lightweight" Bitcoin wallet) who wish to use sBTC would need to use the sBTC Bridge web app, thereby leaving the Electrum app which hurts user experience. ### Critical Bounty Mission Statement: The purpose of this Critical Bounty is to develop an Electrum plugin that allows Electrum users to use sBTC without leaving the Electrum app. The plugin, if successfully merged upstream, would be deployed to all Electrum users which would fuel user growth of sBTC. Please note, the grantee will not be held accountable for the risk of not being able to merge the plugin upstream due to political or ideological reasons only. ### Functionality / Deliverables (shall include, but not be limited to): - Develop an Electrum Plugin for sBTC users. - Plug-in provides equivalent user stories to the OG sBTC Bridge web app. - User stories include: - wrap in and wrap out sBTC, - track and display transaction bundle of Bitcoin sBTC request and fulfillment transactions and associated Stacks mint/burn operations. - Bitcoin transaction signing is performed using Electrum’s wallet. - Contribution successfully merged into [Electrum’s plugin repository](https://github.com/spesmilo/electrum/tree/master/electrum/plugins). - Write written documentation and prepare a video user guide. - Product 'roadshow', feedback, and improvements: All recipients will be responsible for demonstrating functionality, championing early adoption, gathering feedback, and making one to two rounds of high-impact, feedback-based improvements. ### Required Knowledge / Skills: - Experience developing Desktop GUIs in Python using PyQT. - Experience with Bitcoin transaction construction and signing, ideally using Python. ### References: 1. [sBTC Whitepaper](https://stacks-network.github.io/stacks/sbtc.pdf) 2. [Stacks Nakamoto Release Whitepaper](https://uploads-ssl.webflow.com/618b0aafa4afde65f2fe38fe/6399d5ca541ccc6c51882bed_stacks.pdf) 3. [sBTC project dashboard](https://github.com/orgs/Trust-Machines/projects/5/views/10) 4. [Clarinet Docs](https://github.com/hirosystems/clarinet) (reference for design system req’d for Typescript applications wrapped within a Rust application) 5. [TM Repo](https://github.com/Trust-Machines/core-eng/tree/main/stacks-signer) (code & documentation standard) 6. [Electrum Website](https://electrum.org/#home) 7. [Electrum Plugins](https://electrum.readthedocs.io/en/latest/plugins.html) 8. [Electrum GitHub Repo](https://github.com/spesmilo/electrum) ### Critical Bounty Fee: - Maximum Fee: $20,000 ### Reviewers / Advisors: [Igor Sylvester](https://github.com/igorsyl), Core Engineering Lead, Trust Machines [Rena Shah](https://github.com/renashah), Head of Operations & Strategy, Trust Machines [Stjepan Golemac](https://github.com/stjepangolemac), Core Engineer, Trust Machines [Mårten Blankfors](https://github.com/netrome), Core Engineer, Trust Machines [Jesse Wiley](https://github.com/wileyj), Integration and Security Lead, Stacks Foundation [Kenny Rogers](https://github.com/kenrogers), Developer Advocate, Stacks Foundation [Will Corcoran](https://github.com/will-at-stacks), Grants Lead, Stacks Foundation ### Additional Comments: Recipient will be expected to attend sBTC Core Engineering Working Group calls while the bounty is in development and provide weekly updates. ### **[APPLY HERE](https://stx.is/5kVQbn)** ---- NOTES ABOUT CRITICAL BOUNTIES: If you have thoughts, questions, or comments on the rough outline for this Critical Bounty above, please comments below. Please note, all 2023 Q2 Critical Bounties that have funding approved for them will be moved to the Issues page ([here](https://github.com/stacksgov/Stacks-Grant-Launchpad/issues?q=is%3Aopen+is%3Aissue+label%3A%22CRITICAL+BOUNTY%22)) on Tuesday 03/21/2023. Some procedural items to keep in mind with 2023 Q2 Critical Bounties: 1. Each Critical Bounty will have a pre-approved minimum and maximum budget listed within the issue. 2. All applications will be submitted via a BlockSurvey which will be linked within the Issue. 3. Applications will be open from 03/21/2023 to 04/03/2023. 4. Critical Bounty applications will be reviewed by relevant members of the sBTC Core Engineering Team and technical staff from the Stacks Foundation. 5. The selected recipient will be the low, qualified bidder (in the eyes of the reviewers). 9. Selected Critical Bounty recipients will be announced on 04/07/2023 and will be expected to start work immediately and attend sBTC Core Engineering meetings to provide weekly updates on their work.
stacks-foundation commented 1 year ago

👋 @will-at-stacks
Thanks for your application! We will do a pre-review and let you know if we have any immediate questions. In the mean time please refer to our review schedule here for a detailed timeline and response dates.
Best, Will

will-corcoran commented 1 year ago

Congrats on being awarded this Critical Bounty @patoking12 for $20k

More information on this Critical Bounty can be found here

igorsyl commented 1 year ago

@will-at-stacks fyi is GitHub @patoking12 correct? It doesn't seem it is tagging it.

Patotking12 commented 1 year ago

Hey guys it's patotking12 missing a t

will-corcoran commented 1 year ago

@Patotking12 please post your original application for the Critical Bounty here for public awareness.

Thanks, Will

Patotking12 commented 1 year ago

Hi! My name is Carlos Eduardo Gomez & I go by Pato or SetPato. I’m a highly skilled cybersecurity professional with expertise in Clarity, Python, Bash & UX design. Since June of 2021 I’ve been a part of the StrataLabs team as a Clarity Engineer; additionally, I recently worked with BishopFox doing Attack Surface Intelligence which involves researching, analyzing and creating python programs & bash scripting to automate tasks, in general I have to find new things and look at everything the way people don’t usually look at things. As a big fan of Electrum, BTC, & with a good pulse of both SIP10/Clarity & Python, I’d be excited to take on this effort!

Key qualifications include:

Team Assistance I’ll be working with SetBern/Bernardo Garciarvias & Setzeus/Jesus Najera. While I’m the most familiar with Python & also comfortable with Clarity, I believe I’ll still need help in figuring out how to best integrate sBTC (or any placeholder SIP10 FT) to Electrum & will tap their expertise. Project Approach. Describe your proposed approach and methodology for tackling this project. Extensively research Electrum wallet's architecture & plugin best practices Review sBTC protocol in-depth with Setzeus Complete research phase technical scope & light design Kickoff core Electrum/Python engineering work Integration with sBTC / a SIP10 token Unit tests & demo completion Community showcase, feedback & iteration Plugin & documentation submission

Project Roadmap

Conduct extensive research on Electrum wallet architecture and plugin system Review the sBTC protocol in-depth Develop a Scope of Work document outlining specific modules/functions & draft up a minimal GUI inline with the current Electrum experience

Core Python GUI engineering work for plugin frontend

Core engineering work to integrate existing plugin prototype frontend with a FT/SIP10 (assuming sBTC mini isn’t out by then) Write & complete all necessary unit tests

Internal/Stacks community prototype showcase Post-showcase feedback sprint

Create written documentation to support end-users Final submission to Electrum for plugin approval

netrome commented 1 year ago

Note that the sBTC definition in SIP-021 is currently a draft. I don't expect any large changes to happen to the wire formats, but we do have some small changes pending as you can see in the SIP discussion https://github.com/stacksgov/sips/pull/113