Inspiration In the Bitcoin ecosystem, setting up "Recurring Payments" has always been a significant hurdle. Most existing solutions are either centralized or rely on custodial wallets, which goes against the ethos of decentralization. Our inspiration was to build a Decentralized Subscription Model that combines the speed of the Internet Computer (ICP) with the security of Bitcoin, allowing creators to earn "Sats" without any middlemen.

What it does BitSub is a comprehensive decentralized platform that automates Bitcoin subscriptions.

For Creators: Easily design custom subscription plans (Daily, Weekly, Monthly) and monitor growth.

For Subscribers: Fund an integrated Bitcoin testnet wallet and subscribe to services with one click.

Automation: An internal "Payment Processor" runs every 60 seconds to automatically deduct overdue payments from user wallets.

Real-time Pricing: Integrated with the OKX DEX API to provide live BTC-to-USDT price conversions for accurate billing.

How we built it We leveraged the advanced features of the Internet Computer (ICP) to create a seamless experience:

Backend (Motoko): A multi-canister architecture including a Wallet Manager, Subscription Manager, and Transaction Log.

Native Bitcoin Integration: Utilized ICP's direct integration to handle BTC transactions without the need for risky bridges.

Frontend (React): Developed a modern dashboard featuring interactive charts for revenue and subscriber metrics.

HTTP Outcalls: Enabled backend canisters to communicate directly with the OKX API for real-time market data.

Challenges we ran into Timer Reliability: Building a background processor that consistently checks thousands of subscriptions every minute without failing was a significant engineering challenge.

UTXO Synchronization: Keeping the local wallet balance in sync with the Bitcoin testnet while handling multiple concurrent transactions required precise logic.

Webhook Security: Ensuring that payment notification payloads reached the creator’s server securely and accurately without data leakage.

Accomplishments that we're proud of Zero-Wait Concept: We created a flow where users don't have to wait for multiple Bitcoin confirmations to start their subscription journey.

Live OKX Integration: Successfully deployed a price widget that refreshes every 5 seconds using direct canister-to-API calls.

Visual Analytics: Developed an automated insights system that transforms raw payment data into clear daily/monthly revenue graphs.

What we learned We gained deep insights into how Canister Timers can be used to replace traditional cron jobs in a decentralized environment. We also mastered the complexities of Bitcoin’s UTXO model and how it can be controlled via smart contracts on the Internet Computer.

What's next for BitSub Mainnet Launch: Moving from Bitcoin Testnet to the real Bitcoin network for live production use.

Multi-Asset Support: Expanding beyond native BTC to include ckBTC and other ICRC-1 tokens.

Mobile Interface: Developing a dedicated mobile app for on-the-go subscription management.

Advanced Webhooks: Providing developers with more customization, such as custom retry logic and encrypted payloads.

Built With

  • btc
  • ckbtc
  • icrc1
Share this project:

Updates