A prediction market for cryptocurrency pair prices, built on Avalanche C-Chain (FUJI Testnet) & uses Chainlink price feeds to resolve markets.
- Add new prediction markets for currency pairs AVAX/USD, BTC/USD, ETH/USD & LINK/USD.
- Set predicted price and end date (deadline) for new markets.
- Buy shares in a prediction (Yes or No) using AVAX in a given prediction market e.g. "Will BTC/USD be greater than or equal to $50,000 by 31st Sept 2021".
- Update share prices dynamically using the probability of the expected outcome.
- Avoid price volatility for first bought shares by determining the price via the probability with an increasing spread until a suitable sample size is met.
- Display end time for a market in local time.
- Display all invested markets and user's current number of votes in them.
- Auto resolves markets on-chain using Chainlink price feeds after end date.
- Withdraw winnings calculated by total value locked in multiplied by the proportion of user's winning shares to total winning shares.
- Prevent buying shares after end date and withdrawal of losing shares.
To interact with the Avaxcast dApp you need a Metamask wallet on the Avalanche FUJI Testnet. For help setting up Avalanche FUJI testnet with Metamask, visit Avalanche's documentation
The backend smart contract PredictionMarket.sol
is currently live on the Avalanche FUJI Testnet. A new PredictionMarket.sol
contract is deployed to the Avalanche FUJI Testnet for every market i.e. when a user submits a market on the Add market page.
We use Skynet to deploy our frontend via their Github Action. To add our app to your Skynet Homescreen please press the button above. We also use SkyDB to store a JSON containing an array of all deployed Prediction Market contract addresses.
Full documentation can be found on Github Pages or in the docs folder