Skip to content
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

CB-2Q23-03.2 : sBTC Bridge: Integration with Trezor & Ledger #873

Open
will-corcoran opened this issue Mar 21, 2023 Discussed in #848 · 6 comments
Open

CB-2Q23-03.2 : sBTC Bridge: Integration with Trezor & Ledger #873

will-corcoran opened this issue Mar 21, 2023 Discussed in #848 · 6 comments

Comments

@will-corcoran
Copy link
Collaborator

Discussed in #848

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. The sBTC Bridge is also a key component to sBTC operations. The development of an initial prototype for the sBTC Bridge has been led by @radicleart , you can review the sBTC Bridge repo here.

Critical Bounty Mission Statement:

The purpose of this Critical Bounty is to extend the list of wallets supporting sBTC to include Trezor and Ledger, two of the leading hardware wallets within the Bitcoin community. As a result of this Critical Bounty the sBTC Bridge will connect to the Trezor Bridge or Ledger Live applications the user is running to request the user sign the sBTC Wrap/Unwrap transaction for broadcasting. For better UX sBTC Bridge should allow for signing with multiple wallet providers.

Functionality / Deliverables (shall include, but not be limited to):

  • UI / API Development for all required user flows
  • Documentation including 'How To' videos and tutorials
  • Usable with P2PKH/P2WPKH wallets.
  • Support for latest versions of Trezor Bridge / Ledger Live and a single leading product.
  • 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:

  • Knowledge of Trezor / Ledger hardware wallets.
  • Knowledge of Clarity / Clarinet
  • Stacks js or Micro Stacks
  • Bitcoinjs or preferably scure-btc-signer libraries
  • Bitcoin transactions
  • Best practices in software testing / continuous integration

References:

  1. sBTC Bridge Design Doc
  2. Hiro Wallet Issue #2824
  3. Hiro Wallet Pull Request #3321
  4. sBTC Whitepaper
  5. Stacks Nakamoto Release Whitepaper
  6. sBTC project dashboard
  7. Clarinet Docs (reference for design system req’d for Typescript applications wrapped within a Rust application)
  8. TM Repo (code & documentation standard)

Critical Bounty Fee:

  • Maximum Fee: $30,000

Reviewers / Advisors:

Igor Sylvester, Core Engineering Lead, Trust Machines
Kyran Jamie, Hiro Wallet, Trust Machines
Mike Cohen, EcosystemDAO
Jesse Wiley, Integration and Security Lead, Stacks Foundation
Kenny Rogers, Developer Advocate, Stacks Foundation
Will Corcoran, 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


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) 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).
  6. 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
Copy link

👋 @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 will-corcoran changed the title CB-23Q2-03.2 : sBTC Bridge: Integration with Trezor & Ledger CB-2Q23-03.2 : sBTC Bridge: Integration with Trezor & Ledger Mar 27, 2023
@will-corcoran
Copy link
Collaborator Author

Congrats on being awarded this Critical Bounty @mijoco for $20.4k

More information on this Critical Bounty can be found here

@radicleart
Copy link

Thanks @will-at-stacks - please see wiki page for tracking deliver of this Bounty. Look forward to working with the Foundation to deliver this functionality.

@will-corcoran
Copy link
Collaborator Author

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

Thanks,
Will

@radicleart
Copy link

Bounty Application: Trezor and Ledger Integration

CB-2Q23-03.2: sBTC Bridge: Integration with Trezor & Ledger #873

The sBTC Bridge application currently supports users to make deposits into the sBTC protocol using the following wallets;

  • Electrum
  • Bitcoin Core
  • Hiro Wallet for Web

Since BIP174 introduced Partially Signed Bitcoin Transaction binary format it has become possible for signing devices such as Ledger and Trezor to provide integrations that allow users to asynchronously and securely sign bitcoin PSBTs built in web applications.

Ledger supports PSBT signing through its Ledger Live suite and Trezor through the Trezor Suite product. Running one or other on the user’s computer / device are prerequisites for the signing process to work.

One of the primary goals of sBTC is to be as accessible to Bitcoiners as possible. For this reason we propose to extend the list of wallets supported by the Bridge to include both the Trezor and Ledger hardware wallets.

Support for Ledger/Trezor will be provided as part of our open source sBTC Bridge. The intention is for this to be used directly by community members or cloned and tailored to the needs of other sBTC projects and experiments.

The ability to sign PSBTs using Trezor or Ledger will be integrated with our existing sBTC Bridge Client and API applications.

Our existing sBTC application is openly available in github;

  • sBTC Bridge
  • sBTC Bridge API

Scope

Based on experience of PSBT signing with software wallets our costing for this piece of work comes in below the maximum allowance for the Grant. For this reason we are also proposing to support Xverse wallet.

Our belief is that support for Xverse by sBTC Bridge is as high a priority as it is for Ledger and Trezor but it probably doesn’t warrant the overhead of specifying it as a separate deliverable.

Features & Costs

sBTC Bridge API

The sBTC Bridge will be updated to provide;

  1. Connectivity to any Ledger device via Ledger Live (10 days)
  2. Connectivity to any Trezor device via Trezor Suite (8 days)
  3. Connectivity to Xverse Wallet (5 days)
  4. Integration with existing wallet flows in sBTC Bridge (4 days)
  5. Integration Testing and with OP_DROP and OP_RETURN sBTC transaction formats (2 days)
  6. Documentation and blog post (2 days)
  7. Video Tutorial (3 days)

Delivery includes presenting regular progress reports at SIP Community Calls and sBTC public meetings. We will ensure high levels of adoption and opportunities for feedback on the tools delivered via the Bitcoin Builders Discord channel.

Costs

Figures in 8 hour person days at 75 USD per hour.

Total 34 days: $20,400

@radicleart
Copy link

Integration with Trezor and Ledger is no longer necessary - the flow for depositing and withdrawing will use the OP_DROP two stage commitment process.

This grant application is therefore withdrawn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants