Inspiration

Tom and Sally were once inseparable. But Sally's screen time kept climbing while Tom stayed disciplined, and eventually the gap got too wide and Tom ended the relationship. Heartbroken, but determined that no one else should lose love to the endless scroll, he became Tariff Tom: the protector of discipline who charges a tariff to anyone who breaks their screen time goals.

Screen time limits are now built into most major platforms, but they don't enforce anything. iOS and Windows let users set daily limits and then bypass them with a single click and no consequence. They also don't use social competition, which is one of the strongest drivers of behavior change. Commitment apps like StickK and Beeminder show that putting money on the line works, but the money goes to a company or a charity, and you have to trust them to hold it. So we asked: What if the penalty went to your friends instead, in a competition-style game?

What it does

Screen Time Tariff is an accountability app. Participants stake SOL into a shared on-chain vault for a set period and agree on the same rules: a daily allowance, a per-minute tariff, and a list of blocked apps like Instagram, TikTok, YouTube, Valorant, and League of Legends. Each minute a participant spends beyond their daily limit on those apps moves a tariff from their stake into the group's penalty pool. When the period ends, the participant with the least time on blocked apps receives the entire pool, and everyone withdraws whatever is left of their own stake.

The dashboard shows each member's usage against the allowance, what they're on right now, remaining stakes, the growing pool, and a live penalty feed with Solana Explorer links.

Because the funds are held by a Solana program, no central party needs to be trusted, including us. And because each participant's losses go directly to their peers, every member of the group has a reason to stay disciplined.

How we built it

We split into four parts, one folder per developer, and agreed on one interface contract (docs/contract.md) before anyone wrote code. It covers API formats, account layouts and PDA seeds, and units (lamports everywhere, timestamps in milliseconds), which let all four parts be built in parallel and still fit together.

Anchor program (Rust, Solana devnet). Each group has a PDA holding the rules and the penalty pool, each member has their own PDA tracking deposits, balance, and minutes charged, and the staked SOL sits in a vault PDA that only the program can move. Users stake with their own signature. The backend holds an "oracle" key that can only do two things: slash a member's stake into the pool, and settle the pool to the winners in that group. It can't send money anywhere else. slash takes a cumulative count of minutes over, so a retried transaction never charges twice. If the oracle never settles, emergency_refund lets everyone take back their deposit.

The charge for a member with m blocked minutes, allowance A, and tariff r is:

$$ \text{charge} = r \cdot \max(0,\ m - A) $$

At settlement, the pool P is split evenly among everyone tied for the lowest blocked time:

$$ \text{payout}_i = \frac{P}{|W|}, \quad W = {\, i : m_i = \min_j m_j \,} $$

Windows tracker (Python, pywin32, psutil). The tracker reads the foreground window, matches blocked games by process name and blocked sites by browser tab title, and reports usage to the backend in near real time. It only looks at what's on screen and never touches the game process, so anti-cheat like Vanguard ignores it. We packaged it as a Windows .exe with a desktop Tariff Tom window, so nobody needs Python installed.

Backend (Node, TypeScript, Express, MongoDB Atlas). It handles pairing a tracker to a wallet with a code, usage ingestion that ignores duplicate batches and caps reported time at real elapsed time, and the /state endpoint the dashboard polls. A worker turns time over the limit into slash transactions, syncs on-chain balances back into Atlas, and calls settle when the period ends. If a tracker goes silent during the period, that time counts as over the limit, so closing the tracker doesn't help you.

Dashboard (React, TypeScript, Phantom wallet adapter). Connect a wallet, create or join a group, stake SOL, pair your laptop with a code, and watch the group live.

Challenges we ran into

  • Pivots mid-hackathon. We started with proportional payouts to the other members, then switched to winner-takes-pool because it's simpler on-chain and a better story. We also cut a Gemini "roast" feature to protect the core loop.
  • Making it feel live. We wanted the app to feel like watching a game in real time, so we moved the tracker to near-real-time reporting and added second-level tariff precision in the backend, so the pool visibly ticks up while someone is scrolling. The deployed program still charges in whole minutes, so on devnet the backend rounds to minutes and the on-chain balance always matches what the dashboard shows.
  • "Can't I just close the tracker?" We count silence from a tracker during the period as time over the limit, and we cap reported usage at real elapsed time so a modified tracker can't claim impossible numbers.
  • Matching the right apps. Window titles are messy: TikTok video pages often show just the caption, and a Google search for "tiktok" shouldn't count as TikTok. We use whole-word matching and only match titles for browser windows.
  • Devnet reliability. Transactions sometimes dropped or arrived late, which is why slash takes cumulative minutes. Resending the same total is always safe.

Accomplishments that we're proud of

  • A deployed Anchor program on devnet where stakes, penalties, and payouts are real transactions anyone can check on Explorer.
  • A trust model where the backend can move stake into the pool and award the pool to group members, and nothing else.
  • The full loop working end to end: open TikTok, watch the usage bar fill, see the penalty land on-chain, and see the winner's Phantom balance go up after settlement.
  • Tariff Tom, who turned a penalty system into something people actually laugh at.

What we learned

Most of us hadn't written a Solana program before, so learning how PDAs work and how a program can own funds was the biggest takeaway. We also learned how much the trust model matters: the first question anyone asks about a money app is what stops the developers from keeping the money, and limiting what the oracle key can do gave us a real answer. Designing for retries mattered much more on a real network than in local tests. On the team side, agreeing on the interface contract before splitting up saved us from integration problems late at night.

Built With

Share this project:

Updates

Submission history