💡 Inspiration

Trillions of dollars in Bitcoin sit completely idle. To interact with the global derivatives market, Bitcoiners are forced to make dangerous choices: give up custody to centralized exchanges (CEXs), or wrap their assets and bridge to less secure Layer 1s, exposing themselves to smart contract exploits.

Inspired by the Human Rights Foundation's mission, we looked at countries like Venezuela and Lebanon where citizens use BTC to survive hyperinflation, but still suffer from its massive volatility. We wanted to give them "Permissionless Stability": the ability to swap volatility for stability without ever leaving the Bitcoin network.

⚙️ What It Does

FutureCoin turns Bitcoin from a passive store of value into Active Digital Capital.

Users deposit Signet BTC into a sovereign, over-collateralized smart contract (150% ratio). From there, they can instantly mint synthetic exposure to the world's most critical assets. Our supported asset classes include Equities (like NVDA), Indices (like S&P 500), Commodities and Metals (like Gold and Oil), and Crypto (like ETH and SOL).

The protocol mathematically pegs these synthetics to institutional-grade data from Pyth Network. When you close a position, your BTC balance dynamically adjusts based on the USD profit or loss of the asset. No central custodians, no dangerous cross-chain bridges. It is the $1 quadrillion derivatives market, settled entirely in Bitcoin on Alpen Labs' ZK-rollup.

🛠️ How We Built It

We built a full-stack DeFi protocol from scratch in 36 hours:

  • The Contracts: A UUPS upgradeable proxy architecture in Solidity deployed on Alpen Labs. Secured by OpenZeppelin's AccessControl, ReentrancyGuard, and Pausable.
  • The Hybrid Oracle: Because Pyth isn't natively on Alpen yet, we built a custom Python relayer. It fetches real-time prices from Pyth's Hermes API every 30 seconds and pushes them on-chain with a strict 5-minute freshness guard.
  • The Liquidation Engine: An automated Python keeper script that continuously scans the blockchain. If a user's collateral drops below 110%, the bot executes a liquidation and earns a 5% penalty fee, keeping the protocol solvent.
  • The Frontend: A React and Vite app featuring Google OAuth (via Supabase), MetaMask integration, live portfolio charts, and a low-bandwidth "HRF Mode" that strips out heavy components for users on 2G/3G networks.

⚠️ Challenges We Ran Into

  • The Dual-Volatility Trap: If BTC drops while Gold rises, naive accounting breaks. We solved this by normalizing all math to USD at the exact block timestamp to create a stable accounting unit before converting back to BTC for settlement.
  • The Massive Oracle Pivot: Realizing Pyth couldn't "pull" natively on Alpen's testnet forced us into a 12-hour detour to build our own push-based oracle infrastructure from scratch.
  • RPC Quirks & Latency Arbitrage: We fought stale testnet RPC data by piping our liquidation bot through Foundry's cast CLI for reliable reads. We also wrote strict freshness modifiers in Solidity to instantly freeze trading if our oracle lagged.

🏆 Accomplishments We're Proud Of

We survived a massive mid-hackathon oracle pivot and built an off-chain data pipeline that actually works. We are also incredibly proud of engineering a foolproof solvency guarantee: the smart contract mathematically caps payouts at the user's own collateral, meaning the protocol can never pay out more BTC than it holds. Seeing our liquidation bot successfully detect and liquidate an underwater position on the testnet in under 30 seconds was a massive win.

🧠 What We Learned

Building DeFi on a Bitcoin L2 is a completely different beast than Ethereum, requiring us to seamlessly bridge complex software engineering with rigorous quantitative financial analysis. We mastered the UUPS Proxy pattern (which saved our project state during testing) and learned the hard way that a flawless smart contract is useless without a bulletproof off-chain data pipeline.

🚀 What's Next for FutureCoin

Our immediate roadmap includes migrating to native Pyth or Chainlink oracles once deployed, implementing partial liquidations, and moving admin controls to a multisig. Long-term, we plan to launch "Global Economy Baskets" (like a synthetic S&P 500) and integrate with custodians like Anchorage Digital to let institutions route idle cold-storage BTC into FutureCoin strategies.

🔧 Tech Stack

Layer What We Used
L2 Network Alpen Labs ZK-rollup (Chain ID 8150), EVM-compatible with Bitcoin finality
Smart Contracts Solidity 0.8.26, UUPS proxy pattern, OpenZeppelin v5
Oracle Custom push-oracle fed by Pyth Network Hermes API (30s intervals)
Liquidation Bot Python with web3.py + Foundry cast CLI
Frontend React 18, Vite, ethers.js, MetaMask
Identity / DB Google OAuth and Supabase (Postgres)
Dev Environment System76 Pop!_OS, Foundry toolchain, GitHub Actions CI

Built With

Share this project:

Updates