Splitty Project Story

Inspiration

The inspiration for Splitty came from a simple yet frustrating problem: subscription fatigue. In today's digital world, we're all paying for multiple streaming services, software subscriptions, and digital products that we barely use. The average person spends over $200/month on subscriptions, often sharing passwords (which violates terms of service) or paying full price for services they only use occasionally.

We envisioned a world where:

  • Trust is built into the system - No more password sharing or relying on friends to pay their share
  • Transparency is guaranteed - All payments and usage are recorded on-chain
  • Flexibility is key - Buy and sell unused subscription days as needed
  • Costs are truly shared - Fair distribution of subscription costs among group members

The rise of Starknet and Cairo presented the perfect opportunity to build this vision. With Starknet's low fees, fast transactions, and Cairo's powerful smart contract capabilities, we could create a truly decentralized solution that puts users in control of their subscription spending.

What it does

Splitty is a decentralized application in development that aims to transform how people manage and share subscription costs:

Planned Core Features

  • Create groups for subscription services (Netflix, Spotify, Adobe, etc.)
  • Set transparent cost sharing with customizable member limits
  • Automated escrow system for fair payment distribution
  • Security deposits to prevent non-payment issues
  • List unused subscription days for sale
  • Buy subscription credits from other users
  • Dynamic pricing based on market demand

Smart Contract Architecture

  • SubscriptionManager: Manages supported services and pricing
  • SubscriptionGroup: Handles group creation, joining, and payments
  • SubscriptionCredits: Powers the marketplace for buying/selling days

Key Innovations (In Development)

  1. Escrow-Based Payment System: Funds held securely until payment is due
  2. Security Deposit Mechanism: Prevents members from defaulting on payments
  3. Dynamic Credit Marketplace: Users can monetize unused subscription time
  4. Transparent Cost Distribution: All financial flows recorded on-chain
  5. Platform Fee Structure: Sustainable revenue model with 2-5% fees

How we built it

Smart Contract Development (Cairo) We are building three interconnected Cairo smart contracts on Starknet:

SubscriptionManager Contract

  • Manages service costs and support
  • get_service_cost() and is_service_supported() functions implemented

SubscriptionGroup Contract

  • Handles group lifecycle and payments
  • create_group(), join_group(), and make_payment() functions in development

SubscriptionCredits Contract

  • Powers the marketplace
  • list_credits() and buy_credits() functions being developed

Frontend Development (Next.js 14)

  • App Router with Next.js 14's latest routing system
  • TypeScript for type safety
  • Tailwind CSS for responsive design
  • Radix UI for accessible components
  • WalletContext for Starknet wallet connections
  • Custom hooks for contract interactions
  • Dashboard, Marketplace, and Group Creation pages in development

Development Workflow

  1. Contract Development: Using Scarb for Cairo compilation and testing
  2. Local Testing: Deployed contracts to Starknet devnet
  3. Frontend Integration: Building React components with contract interactions
  4. Testing: Currently testing on Sepolia testnet
  5. Deployment: Working on deployment scripts for both contracts and frontend

Challenges we ran into

Cairo Learning Curve Challenge: Cairo's unique syntax and Starknet's account abstraction model were completely new to us.

Solution:

  • Spent weeks studying Cairo documentation and examples
  • Built simple test contracts before tackling complex logic
  • Leveraged Starknet's excellent developer tools and community

Escrow System Complexity Challenge: Designing a secure escrow system that prevents both non-payment and fund theft.

Solution:

  • Implemented security deposits for all group members
  • Created time-locked withdrawal mechanisms
  • Added platform fee collection to prevent abuse

State Management Complexity Challenge: Managing complex state across multiple contracts and frontend components.

Solution:

  • Created centralized contract interaction layer
  • Implemented custom React hooks for state management
  • Built comprehensive error handling and loading states

Wallet Integration Issues Challenge: Starknet wallet integration was more complex than expected, especially with different wallet providers.

Solution:

  • Used get-starknet-core for universal wallet support
  • Implemented fallback mechanisms for different wallet types
  • Added comprehensive error handling for connection failures

Transaction Cost Optimization Challenge: Ensuring smart contract operations remain cost-effective for users.

Solution:

  • Optimized contract storage patterns
  • Implemented batch operations where possible
  • Used Starknet's account abstraction for gas optimization

Accomplishments that we're proud of

Technical Achievements

  • Three Cairo smart contracts with core functionality implemented
  • Modern React frontend with TypeScript architecture
  • Wallet integration framework established
  • Contracts deployed on devnet and Sepolia testnet

Smart Contract Progress

  • Escrow System: Basic structure implemented for secure fund management
  • Security Deposits: Mechanism designed to prevent payment defaults
  • Marketplace: Foundation laid for subscription credit trading
  • Platform Fees: Revenue model structure defined

Frontend Development

  • Responsive Design: UI components built with Tailwind CSS
  • Contract Integration: Hooks and interaction layer created
  • Error Handling: Basic user feedback system implemented
  • Wallet Connection: Starknet wallet integration working

Current Development Status

  • Smart contracts have core functions but need testing and refinement
  • Frontend has UI components and wallet connection working
  • Contract interactions are implemented but need end-to-end testing
  • Some features are still in development phase

What we learned

Technical Learnings

  • Cairo's unique syntax and type system
  • Starknet's account abstraction model
  • Smart contract deployment and interaction patterns
  • Gas optimization techniques
  • The importance of comprehensive testing
  • User experience considerations in Web3
  • Security-first development practices
  • The power of composable smart contracts
  • Connecting frontend to blockchain
  • Managing asynchronous operations
  • Error handling in distributed systems
  • State synchronization challenges

Product Insights

  • People want transparency in shared costs
  • Security deposits significantly reduce payment issues
  • Marketplace features increase platform stickiness
  • Mobile-first design is crucial for adoption
  • Strong demand for subscription cost sharing
  • Users willing to pay small fees for convenience
  • Trust is the biggest barrier to adoption
  • Blockchain provides the trust layer needed

Development Process

  • Iterative contract development
  • User feedback integration
  • Rapid prototyping and testing
  • Community-driven feature development
  • Community contributions and feedback
  • Shared knowledge and best practices
  • Faster development through collaboration
  • Better security through peer review

What's next for Splitty

Short-term Goals (Next 3 months)

  • Mobile app development (React Native)
  • Push notifications for payment reminders
  • Advanced analytics dashboard
  • Multi-language support
  • Gas optimization improvements
  • Additional subscription services
  • Automated payment scheduling
  • Enhanced security features

Medium-term Vision (6-12 months)

  • Integration with major subscription services
  • API for third-party developers
  • White-label solutions for businesses
  • Cross-chain compatibility
  • AI-powered cost optimization
  • Social features and group discovery
  • Reputation system for users
  • Insurance products for subscription groups

Long-term Impact (1-2 years)

  • Token economy with governance
  • Decentralized autonomous organization (DAO)
  • Community-driven service additions
  • Global marketplace expansion
  • Become the standard for subscription sharing
  • Partner with major streaming platforms
  • Influence subscription service policies
  • Create new economic models for digital services

Innovation Roadmap

  • Zero-knowledge proofs for privacy
  • Layer 2 scaling solutions
  • Cross-chain subscription management
  • Subscription prediction algorithms
  • Dynamic pricing based on usage
  • Integration with IoT devices
  • Virtual reality subscription sharing

Built With

  • cairo
  • get-starknet-core
  • git
  • lucide-react
  • next.js-14
  • node.js
  • npm
  • radix-ui
  • react-18
  • scarb
  • scc3
  • starknet
  • starknet.js
  • tailwind-css
  • typescript
Share this project:

Updates