grants-program
grants-program copied to clipboard
CB-2Q23-03.1 : sBTC Bridge: API Continuation
Discussed in https://github.com/stacksgov/Stacks-Grant-Launchpad/discussions/847
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 champion the continued development of the sBTC Bridge API is the focus of this Critical Bounty. Required development improvements include: Unfinished Work:
- Filtering and Sorting
- Caching
- Replacing 3rd party service with a 1st party Bitcoin API, such as Bitcoin-sync or ElectrumX
Functionality / Deliverables (shall include, but not be limited to):
Statement on remaining work from original development plan: This component is a stateless, open API whose primary purpose is to make the sbtc-bridge application fast.
- It will achieve this by pre-reading and aggregating sBTC related blockchain and smart contract state into a Mongo database.
- Secondary purpose to provide additional metrics and business intelligence for SBTC.
- This component can be readily extended via Websocket API.
- 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.
- API application deployed via docker, provides; - access to bitcoin rpc and stacks node rpc - reads/caches contract event data on schedule - NodeJS / Typescript application
- Mongodb deployed via docker
- Deployment on GCP k8 Cluster
- Features
- Read and index sbtc peg in txids
- Read and index sbtc peg out txids
- Rest API calls to return these txids
Precise feature list is forthcoming. The estimate time to completion for a working prototype deployed on testnet implementing the minimal feature set above is 20-23 days.
Required Knowledge / Skills:
- Understanding of Stacks and Bitcoin blockchain transaction structure.
- RPC API development using NodeJS
- Tools: Typescript, NodeJS, MongoDB, Docker, Kubernetes, Google Cloud for deployment
References:
- sBTC Whitepaper
- Stacks Nakamoto Release Whitepaper
- sBTC project dashboard
- Clarinet Docs (reference for design system req’d for Typescript applications wrapped within a Rust application)
- TM Repo (code & documentation standard)
- sBTC Bridge Project Document
Critical Bounty Fee:
- Maximum Fee: $20,000
Reviewers / Advisors:
Igor Sylvester, Core Engineering Lead, Trust Machines Sergey Shandar, Core Engineer, 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:
- Each Critical Bounty will have a pre-approved minimum and maximum budget listed within the issue.
- All applications will be submitted via a BlockSurvey which will be linked within the Issue.
- Applications will be open from 03/21/2023 to 04/03/2023.
- Critical Bounty applications will be reviewed by relevant members of the sBTC Core Engineering Team and technical staff from the Stacks Foundation.
- The selected recipient will be the low, qualified bidder (in the eyes of the reviewers).
- 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.
👋 @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
Congrats on being awarded this Critical Bounty @mijoco for $18k
Supplementary funding is also going to @macxim for UX/UI services for $4,480
Congrats to you both.
More information on this Critical Bounty can be found here
Thank you @will-at-stacks and @stacks-foundation .
Look forward to working you @Macxim !
@radicleart please post your original application for the Critical Bounty here for public awareness.
Thanks, Will
Bounty Application: sBTC Bridge API
CB-2Q23-03.1 : sBTC Bridge: API Continuation #872
The sBTC Bridge API is missing some important features. This proposal addresses the needs of Bounty #872 by providing estimates for the delivery of features needed to turn sBTC Bridge API into an enterprise class restful application.
This proposal further develops the existing sBTC Bridge API which is openly available in github;
Features & Costs
sBTC Bridge API
Filtering, paging and sorting (8 days);
- Ability to filter API results intuitively using path/query string parameters
- Ability to sort API results intuitively using path/query string parameters
- Ability to page API results intuitively using path/query string parameters
Caching (4 days)
- Intelligent caching of API data - where applicable.
Websockets (4 days)
- Integrate websocket endpoints into the API.
- Consume websockets;
- Demonstrate ability for clients to subscribe to user and signer requests and fulfilments
3rd Party Independence (12 days)
- Investigation of Bitcoin indexing solutions; Bitcoin-sync and ElectrumX
- Integration of indexing solution
- Handling of CI and deployment issues
Documentation & Deployment (2 days)
- Documentation of end points using Swagger.
- Deployment on GCP k8 Cluster
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 30 days: $18,000
This grant is completed - see GitBook for details.
Work on the Bridge is ongoing @will-at-stacks I submitted an application for continued funding for the work to support the alpha release and for supporting sBTC Mini. Can't see this application in the bounty list - is it in the system ?
@radicleart yep! the grant request is on my radar
This grant is completed - see GitBook for details.
Work on the Bridge is ongoing @will-at-stacks I submitted an application for continued funding for the work to support the alpha release and for supporting sBTC Mini. Can't see this application in the bounty list - is it in the system ?
Update 5 Jul.
sbtc-bridge-api
23 Pull Requests completed to date
- PR 44 is the back end work for the two API apps (testnet and mainnet) to connect to testnet/mainnet bitcoin nodes on the staging (linode) servers.
- PR 35 keeping the api docs up to date
sbtc-bridge-web
121 Pull Requests have been completed!
- PR 167 means the staging application https://bridge.stx.eco can now connect to both testnet and mainnet Bitcoin nodes.
- PR 152 implements Maximes design system and brings the bridge to life.
- PRs 170, 169, 168 provide substantial UI/UX improvements.
Work is ongoing responding to feedback from various stake holders with several enhancements planned via Issues in Github. See GitBook for regular updates.
July 25th
PR 193 Several days debugging byte array and hex strings with @netrome. hard work paid off - led to first successfuly sBTC Alpha withdrawal: https://twitter.com/radicleart/status/1683801378668396545
July 18th
Testing and improvements of the withdrawal for op_return see discord and Issue 187 Currency support - see PR 185
attn: @will-at-stacks
Very cool @radicleart !!!
July 26th
See PR 53 covers work needed to support Coordinator development around agreement on wire format for deposit and withdrawal payloads and especially on building embedded signature for the withdrawal payload.