A lossless, transparent prediction market built with Aave, Pyth, Avail, and Blockscout.

SafeBet is a lossless decentralized prediction market where users can predict real-world outcomes — like asset prices or market trends — without risking their funds. When users stake USDC on a market, their money is safely deposited into Aave, where it continuously earns interest. At the end of the prediction, the Pyth Network’s verified price feed determines the result. The winning side takes home the interest earned, while everyone receives their full original deposit back — making SafeBet completely lossless. The platform is built to be transparent and verifiable from start to finish. Using Blockscout’s SDK, every market creation, bet, and resolution is easily traceable on-chain. With Avail Nexus SDK, SafeBet ensures reliable off-chain data availability, bridging real-world information with on-chain settlements. Together, these technologies create a trustless environment where users can predict outcomes safely, transparently, and confidently — while their funds grow through DeFi yield.
SafeBet is powered by Solidity smart contracts and a modular architecture: The MarketFactory contract deploys new markets dynamically, passing key parameters like USDC, Aave Pool, Pyth contract, and price feed ID. Each Market contract handles deposits, yield generation on Aave, and payout logic based on Pyth’s real-time price feeds. When a market is created, user funds are automatically sent to Aave, where they earn yield as aUSDC. Once resolved, the contract fetches accurate price data from Pyth to determine the winning side. Winners receive their share of the yield, and everyone gets their original stake back — achieving true loss lessness. The frontend is built with React, Ethers.js, and integrated with Blockscout’s SDK for real-time on-chain transparency and transaction indexing. Avail’s Nexus SDK ensures fast, verifiable data access for off-chain updates and efficient interaction with Pyth feeds. Together, these technologies form a seamless ecosystem where DeFi yield, oracle data, and transparent infrastructure meet — turning predictions into a secure and rewarding experience.

