Inspiration
- Both UniswapV3 and ChainLink provide price oracles. Can these two oracles be used in a relatively simple scenario? The simplest scenario involves binary options.
- Can binary options use a liquidity algorithm similar to Uniswap? This is possible, which greatly facilitates small and medium-sized investors.
What it does
- A certain binary option is anchored to a certain price Oracle (ChainLink or UniswapV3), and the reward of the option that the player has purchased is judged based on the price provided by the Oracle in each time period.
- The capital side first provides liquidity. Liquidity also comes with potential rewards, which are roughly 10% of a player's winnings. If the player keeps winning, liquidity will be reduced to depletion. But according to normal logic or mathematical probability, half of the bets players participate in will win and half will fail.
- Players can invest when there is liquidity, and the odds are related to liquidity and investment amount: the greater the investment amount, the smaller the odds. This is similar to Uniswap. When the player invests, the price provided by Oracle will be recorded, and when the time is up, the price provided by Oracle will also be recorded. Based on these two prices, it can be judged whether the player has won.
How we built it
Download it from GitHub, and the open-source homepage URL is "https://github.com/heddhshan/BlockChain_BinaryOption/tree/master". Download the bin file "Bin_BinaryOptions_20231205.zip" and directly run "BlockChain.BinaryOptions.exe" (the URL of the download page is "https://github.com/heddhshan/BlockChain_BinaryOption/releases/tag/BinaryOptions") , running on windows 10 or windows 11, you need to install .net6.o and SqlServer Express on windows, this program has built-in installation guides.
Challenges we ran into
- The testing workload is huge.
- I didn’t handle the web program, mainly for two reasons: I didn’t have enough time, and I was unwilling to use a centralized website to support this decentralized DAPP.
Accomplishments that we're proud of
- Chainlink’s price Oracle is used.
- Improved liquidity algorithm.
What we learned
- How to use ChainLink’s price Oracle and understand the various features of this Oracle.
- Test methods for algorithms. Sometimes you may need to write some auxiliary programs.
What's next for BlockChain BinaryOptions
Oracle's price data is "passivated", which means it has a precision, such as one thousandth. If the price changes within this accuracy range, we should treat it as if the price has not changed. The harm of not having this accuracy is very great, so I won’t go into details here. Because of this precision, Chainlink can only update the price once or twice an hour, and the price of UniswapV3 (with a certain precision) will also change slowly, which results in the binary option price of this five-minute period being the same most of the time. If the investment does not change, it would be unreasonable for players to lose regardless of whether their investment goes up or down. How to change this situation? There are two ways. The first is to increase the time period of binary options, changing it from five minutes to one hour, but this will reduce the playability of this DAPP. Another way is to change the binary option to a ternary option. Adding an option means that the price remains unchanged. The so-called unchanged price does not mean that the real price has no change, but that the price rises and falls within a range, such as one thousandth. If it is within this range, the price is considered unchanged. The second method is a little different from traditional binary options, and there may be an acceptance process. I'm going to launch ternary options.
Log in or sign up for Devpost to join the conversation.