What it does
BillEarn is the first subscription savings account on Starknet. Users deposit STRK tokens for their annual subscription budget, and BillEarn automatically optimizes their funds:
80% supplied to Vesu lending pools earning 4.2% APY 20% kept liquid for immediate payment availability Automatic payment execution when subscriptions are due Real-time yield tracking in user dashboard
Example User Journey:
Alice deposits 3,000 STRK for her annual subscriptions BillEarn supplies 2,400 STRK to Vesu (earning yield), keeps 600 STRK liquid Alice creates subscriptions: Netflix (50 STRK/month), Spotify (35 STRK/month) Each month, BillEarn automatically pays merchants from the liquid buffer After 1 year, Alice earned 126 STRK in yield—equivalent to 1.5 free months of her subscriptions
Merchant Integration: Merchants embed a simple "Pay with BillEarn" button using our SDK. When clicked, it displays a QR code that users scan with their Starknet wallet to create the subscription—no manual setup needed.
Challenges we ran into
- Understanding Vesu's Architecture Initial approach: We assumed Vesu had simple deposit() and withdraw() functions. Reality: Vesu uses a sophisticated modify_position system with signed integers (i257), amount types (Delta vs Target), and denomination types (Assets vs Native). Solution: Deep-dived into the Vesu v1 GitHub repository (github.com/vesuxyz/vesu-v1). Studied their vToken implementation to understand:
How to construct ModifyPositionParams correctly Using i257_new(amount, false) for deposits (positive) Using i257_new(amount, true) for withdrawals (negative) Proper handling of collateral without debt positions
- Balancing Liquidity and Yield Challenge: How much to keep liquid vs. supply to Vesu? Too conservative (50% liquid) = lower yield, less competitive Too aggressive (95% in Vesu) = payment failures if withdrawal delayed Solution:
Settled on 80/20 split after modeling payment patterns Keeper withdraws from Vesu 24 hours before payment due Added buffer safety checks to prevent over-withdrawal If Vesu position insufficient, payment fails gracefully with clear error
What we learned
- Learnt Cairo smart contract development and how contracts are deployed.
What's next for BillEarn: The STRK-Powered Subscription Savings Account
- Support for multiple tokens (ETH, USDC, USDT)
- Dynamic APY optimization (auto-switch to highest yield)
- Subscription management (pause, modify amounts)
- Payment scheduling (custom dates)
- Mobile-responsive optimization
- Multi-pool yield strategies (diversification)
- Automatic budget adjustments
Built With
- cairo
- nextjs
- sdk
- starknet
Log in or sign up for Devpost to join the conversation.