Inspiration
Traditional centralized sports betting is vulnerable to centralized default, fraud or manipulation, so we try to build a decentralized sports betting operator based on Chainlink and believe that it's has true value in both social and business sense and it's a truly perfect fit with problems that can be solved by Chainlink. We really come up with this idea independently from scratch (while later we do realize that there exist some on-going projects trying to approach similar problems, we do believe we approach it in a more practical and cleaner way, with lots of great potentials, thankfully to Chainlink).
What it does
With the help of Chainlink and other technology, we enable user to make bets and win money truthlessly on the result of different games with dynamically adjusted odds based on real-life events & state of the contract without worrying about default, manipulation and single point of failure. Once deployed, all execution-crucial processes are fully automated and out of manipulation by any party (including Themis).
How we built it
Moralis, smart contract, google cloud (sql cloud, virtual machine, cloud function) alchemy, typescript, react, redux, material-ui, npm, etc.
Challenges we ran into
- How to use factory model to save gas
- How to dynamically adjust odds
- How to integrate Moralis and build real-time front-end with state control
- In general, How to make things work together
Accomplishments that we're proud of
- Make it End2end working, in a ready state to deploy on testnet
- True business value, and draft the dynamic odd adjusting model that automatically rebalances compeletely on-chain without the need of any off-chain components like running an order-book or match-engine (which doens't work very well for prediction market and non-linear product anyway)
- Customizable risk mode for different campaigns
- Smooth and real-time frontend with state control
- Factory model to reduce costs
- Integrate external adapter and keeper to fulfill data, work smoothly
What we learned
- How to work as a team effectively
- How to use Chainlink products, keeper, external adapter, aggregator, run a CL node, job, etc.
- How to integrate Moralis to provide execellent web3 interaction
- How to use EIP1167 contract to achieve low deploy costs and build really scalable solution
What's next for Themis
- More decentralization (never ever enough): Contribute or lead the initiation to build a multi-source sports data feeds that's updated by decentralized oracle network through Chainlink's decentralized data model, and aggregate them through aggregator, it's going to be pretty similar to the exisitng price data one. That's really one of the main things we are going to focus on.
- Tuning and refine betting model, more customization, more risk control, wiser odds-adjusting, incentive-staking-pool, off-chain auto-hedging through trusted hardware like SGX or zero-knowledge proof to enable more risk taking etc. How current betting model works: draft
- Contract auditing and bug finding. Test all edge cases and consistently detect any potential vulnerabilities in contract.
- Support more business lines (more sports, league, etc.), our system is built to be very easy to scale to support this, just with an additional component of campaignFactory manager
NOTE
Sorry about the length of the video, there's actually long part of the total time that can be skipped since we are waiting for the transaction to be confirmed, so the part that actually needs to be watched is shorter. Sorry for not getting the time to edit it before submission. Please take a look at the timestamp provided in the video description to see what can be skipped.
Built With
- chainlink
- external-adapter
- keeper
- react
- redux
- solidity
- truffle
- typescript
Log in or sign up for Devpost to join the conversation.