A decentralized prediction market built on Mantle Sepolia Testnet with prediction chaining and borrowing capabilities.
A decentralized prediction market built on Mantle Sepolia Testnet with prediction chaining and borrowing capabilities.
Prediction Chaining: Create and participate in prediction markets with fixed stakes
Exposure Branching: Transfer up to 70% of your exposure from one prediction to another, enabling dynamic portfolio management
Capital Flow Architecture: Enables collateral to flow across live predictions, eliminating capital silos
Borrowing System: Leverage collateral to place bets up to 70% LTV with flexible borrowing
Real-time Updates: Live prediction data and user balances
MetaMask Integration: Seamless wallet connection and transaction handling
Modern UI: Clean, responsive interface built with Next.js and Tailwind CSS
Navigate to /predictions
Click "Create Prediction"
Enter question and stake amount
Submit transaction
Transfer Exposure: If you have exposure in a prediction, click the "Branch" button to transfer up to 70% of your stake
Dynamic Portfolio Management: Move exposure between predictions without closing positions
Strategic Rebalancing: Adjust your risk allocation across different markets in real-time
Direct Bet: Send ETH directly to match the prediction stake
Borrow Bet: Use collateral to borrow funds (up to 70% LTV)
View collateral balance and debt on /profile
Withdraw available collateral
Monitor health status (liquidation risk)
Resolved predictions show "Claim" button for winners
Automatic proportional payout calculation
Augurrix implements a sophisticated prediction branching system that allows capital to flow dynamically across interconnected prediction markets.
┌─────────────────┐ ┌─────────────────┐
│ Prediction A │ │ Prediction B │
│ "Will ETH │ │ "Will BTC │
│ reach $5000?" │ │ reach $100k?" │
│ │ │ │
│ User Exposure │ │ │
│ Yes: 10 ETH │ │ │
│ No: 5 ETH │ │ │
└─────────┬───────┘ └─────────────────┘
│
│ 70% Exposure Transfer
│ (Branching)
▼
┌─────────────────┐
│ Prediction A │ ┌─────────────────┐
│ "Will ETH │ │ Prediction B │
│ reach $5000?" │ │ "Will BTC │
│ │◄────┤ reach $100k?" │
│ Remaining │ │ │
│ Yes: 3 ETH │ │ Transferred │
│ No: 1.5 ETH │ │ Yes: 7 ETH │
│ │ │ No: 3.5 ETH │
└─────────────────┘ └─────────────────┘
1. Exposure Accumulation
Users build exposure by placing bets on various predictions
Exposure represents the user's stake and potential outcomes across different markets
2. Branching Mechanism
Users can transfer up to 70% of their exposure from one prediction to another
This enables dynamic portfolio rebalancing without closing positions
Branching maintains market liquidity while allowing strategic position adjustments
3. Capital Flow Dynamics
Exposure Transfer Flow:
1. User has exposure in Prediction A (10 ETH Yes, 5 ETH No)
2. User branches 70% exposure to Prediction B
3. Prediction A retains: 3 ETH Yes, 1.5 ETH No (30%)
4. Prediction B receives: 7 ETH Yes, 3.5 ETH No (70% transferred)
5. User maintains diversified exposure across both predictions
4. Branching Benefits
Portfolio Flexibility: Dynamically rebalance exposure across predictions
Risk Management: Adjust positions without closing existing bets
Capital Efficiency: Maintain market participation while optimizing allocations
Strategic Trading: Respond to market developments with exposure transfers
contract PredictionChaining {
struct Prediction {
string question;
uint256 stake;
address setter;
Outcome result;
bool resolved;
uint256 totalYes;
uint256 totalNo;
uint256 parentId; // Links to parent prediction
uint256[] branches; // Child predictions
}
// Key Functions:
// - createPrediction(): Create base predictions
// - bet(): Place bets on predictions
// - branchPrediction(): Transfer up to 70% of exposure between predictions
// - resolve(): Settle prediction outcomes
// - claimWinnings(): Distribute rewards
}Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS
Blockchain: ethers v6, MetaMask wallet integration
Network: Mantle Sepolia Testnet
Database: Supabase (prediction metadata and analytics)
Connect Wallet: Click "Connect Wallet" and approve MetaMask connection
Switch Network: Switch to Mantle Sepolia Testnet in MetaMask (use the network details above)
Add Collateral: Deposit ETH as collateral on the Profile page
Start Trading: Create predictions or place bets on existing ones
The core contract implements:
contract PredictionChaining {
// Fixed 70% LTV for borrowing & branching
uint256 public constant LTV = 70;
// Prediction structure with stake and outcome tracking
struct Prediction {
string question;
uint256 stake;
address setter;
Outcome result;
bool resolved;
uint256 totalYes;
uint256 totalNo;
}
// Key functions:
// - createPrediction(): Create new prediction markets
// - bet(): Place direct ETH bets
// - betWithBorrow(): Borrow against collateral
// - branchPrediction(): Transfer up to 70% of exposure between predictions
// - resolve(): Set prediction outcomes
// - claim(): Claim proportional winnings
// - withdraw(): Withdraw collateral
}The branching feature allows users with exposure in predictions to transfer up to 70% of their stake to other predictions. This enables dynamic portfolio management and strategic rebalancing across different markets without closing existing positions.




This project is licensed under the MIT License - see the LICENSE file for details.