← Back to home

Bagra Markets

Trade prediction markets and borrow againts them on-chain, powered by Kalshi.

Problem Statement

BAGRA brings Kalshi's prediction markets on-chain by tokenizing market positions and enabling DeFi lending on top of them. Users can trade on real-world events (elections, sports, crypto, world events) while unlocking liquidity through blockchain-based lending markets.The platform tokenizes prediction market positions as on-chain assets tracked through ERC-20 smart contracts. This tokenization enables a DeFi lending layer where users can supply their market positions as collateral or borrow against them, creating liquidity and leverage opportunities that don't exist in traditional prediction markets.The trading interface lets users browse hundreds of markets with real-time pricing, historical charts, and event grouping. Deposit USDC to fund positions, with balances on-chain. A unified portfolio dashboard tracks all tokenized positions, lending activity, and performance metrics.Once user has a open position, he can borrow funds againts it, This unlocks greater capital efficiency and leverage, while also allowing users to perserve their exposure to the resolution of the prediction market.

Solution

When users open a position on Kalshi through our platform, the system mints corresponding ERC20 tokens representing that position. Each prediction market has its own token contract - if you buy 100 YES contracts on "Will candidate X win?", you receive 100 ERC20 tokens tracked on-chain. This bridges Kalshi's off-chain positions with on-chain asset representation.The backend acts as an oracle between blockchain and Kalshi. It monitors deposit events, creates positions via Kalshi's API, then triggers token minting.Lending protocol is inpsired by Morpho's architecture but simpler for hakathon purposes. Users supply tokenized positions as collateral to earn yield, or borrow against holdings for leveraged exposure.BalanceVault tracks USDC deposits and credits. Market-specific ERC20 contracts handle position tokens with standard transfer/approval. The lending contract manages collateral ratios, interest accrual, and liquidation logic.User deposits USDC → Backend creates Kalshi position → Smart contract mints ERC20 tokens → User supplies to lending pool or borrows against collateral. Position settlements flow reverse: Kalshi resolves → Backend triggers redemption → Tokens burned → USDC distributed

Hackathon

ETHGlobal Buenos Aires

2025

Prizes

  • 🏆

    Best DeFi Project on Zircuit2nd place

    Zircuit

  • 🏆

    SportsFi & Real - World Yield2nd place

    Chiliz

Contributors