With the growing interest in Sport Betting and Social Gaming globally, we notice that there isn't truly a decentralized and fair gaming platform. All other Sport books or “Sport Exchange” were collecting high commissions along with other fees that would eat away at a fair playing experience. In the end, the “house” would always win. Thus we set out to collect industry advice and end users feedback to help create a free and open prediction market gaming experience.
What it does
DEGA will be launched in multiple phases, which will culminate into an omnichannel social gaming platform. With our initial launch of DEGA Exchange, we hope to build a Sport exchange that allows users all over the world to engage in market prediction in real world events. Individuals will be able to bid or lay action on events that they hope to turn out in their favor. Not only will they be able to exchange DEGA successful matching of bids, each user can choose to take the best market value on the probability of each outcome. With the launch of DEGA Sport Exchange, we hope to build a gaming ecosystem that will foster the development of other social gaming experiences.
How we built it
In the research phrase: we learned to code on Solana and studied Project Serum source code because our sports exchange’s functionality is very similar to any crypto exchange. We created some bet matching examples such as Dice Game (bet on low and high, odd and even).
We studied Betfair and MatchBook, the two biggest bet exchanges in the market. We realized the concept of Lay and Back is very complicated and sometimes confusing. Hence, we created a much simpler way to exchange: just choose on one side and make an offer with odds and amount. If odds match, there will be a trade depending on the risk and win amount. Since a trade consists of only two parties, we convert 3-way soccer moneyline betting into 2 different markets: team A win vs team B win and the event draw vs no-draw.
We also create a new Odds Type called Relative. One side will always have format 100 to win X (100-X) and the other side is Y to win 100 (Y-100) and the offers match when X equals to Y.
We wanted to create a sports exchange for crypto traders. The most important requirements are to make it easy to use and its UI has to look like Crypto exchanges. The Relative odds help make it possible. If you see the Order Book, you will see how easy it is to understand.
We created this application with a micro services architect in mind. There is NodeJS API to interact with smart-contact app to create, clone, call methods and delete Solana’s accounts. There is a core Java API for frontend to use. There are odd and backend services. Frontend is built mainly with React.
Since there is no Oracle about Sports data on Solana, we use a Betting API to grab sports events, time, markets, odds and scores. Sports, Leagues are synchronized and Events creation are scheduled automatically. There is a Staff Backend webapp to modify them as we need.
To avoid wrong grading/results, we implemented Voting mechanism so players can vote to appeal for the wrong scores when their bets are graded wrongly.
Challenges we ran into
We had a hard time deciding what will be the main cryptocurrency for the app, USDC or our own token. In the end, we chose to use our token DEGA and aim to run the exchange with a zero profit model for the next 2-3 years as long as the initial investment allows us to. In exchange for no revenue. We plan to reinvest in the project ecosystem, to build up a self-sustaining decentralized gaming community.
We believe the first group of adopters to use our sports exchange will be those who own and trade cryptos. That’s why we had to think of our sports exchange like a crypto exchange. Along with recent trends in the Sports Gaming sector, we notice that casual players were also interested in a more social and “exchange” based sports wagering system. We have Open Order, Order Type: Limit and Market, Order Book. We are also currently developing an interactive live-chart when the trading volume reaches our target milestones.
Another big concern for our project is the possibility for errors to arise due to technical or human inputs. Transactions in blockchain are non-reversible. And there are always wrong scores in sports data. It is very dangerous if we settle an event wrong. Unlike a centralized sportsbook where balance can be reverted easily in the database, it’s impossible to do so with our decentralized sports exchange. To avoid this, we created “delay of settlement” of funds and voting mechanisms. When scores are applied, there will be a 30 minutes grace period before funds are officially settled. Players who believe scores are wrong can send a vote to stop the automatic settlement process. If the number of votes meet some preset value, our system won’t do the settlement, instead it will wait for the review process to be done and settle later. (“Delay of Settlement” time can be reduced drastically as we improve our redundancy protocol to reduce and correct errors in a more timely manner, while also improving with our grade voting protocols)
Lastly, our compliance and legal dilemma will be addressed methodically as we move forward with our project. From a global perspective, there will be plenty of restrictions and complications due to governance and regulation. Thus, we are working with a legal team to help meet the legal requirements for each market. The European gaming market is well established with plenty of options to meet compliance laws, therefore market entry is highly attentable. The USA is a fast growing market, even though they haven't fully established the governance and restrictions are done state by state. But due to the popularity, it will only be a matter of time. Our DEGA exchange breaks away from all other current models of what is typically considered a SportsBook or Operator. With a zero profit model and skill base bidding design, we hope to build a social gaming platform that differs from all other operators. Thus avoiding a lot of restrictions that might hinder our goals.
Accomplishments that we're proud of
Blockchain programming in general and Rust in specific are new to our team. To be able to program and understand Solana in such a small amount of time really makes us proud.
What we learned
By working on this project, we not only created an exchange app, but also found a crypto startup. We learned that making a crypto startup is not just about whitepaper or a fancy website. The product is the core that we have to spend the majority of our time with.
We got to learn about optimizing data structure and size to save account’s hosting cost on the Solana network.
We learned to design and implement our app in the most decentralized way by reducing as much as centralized data. Although we can’t remove the centralized portion completely, we will try as much as we can in future releases.
What's next for DEGA Exchange
Implementing more security approaches to prevent order spamming, overflow of data storage of account, hacking...
Integrating many more Wallets, especially those mobile native apps.
Staking pools that integrate with social mini-games to play to win, never lose
Lending and borrowing with collateral. It will allow players to play with other SPL assets instead of DEGA tokens.
Public API for sports exchange, just like any crypto exchange APIs