Inspiration

Esports betting is often an added extension of existing betting platforms like bet365. The esports community is strong, but it feels as if it's not being served properly by existing betting platforms, as they don't care about their customers. This is why we have built on-chain, as it can bring an unparalleled sense of community through a DAO structure, shaping the way the platform evolves, being rewarded for staking, and being able to contribute to the development of the platform easily.

What it does

VEX is a betting platform that allows users to make bets on Esports matches using USDC. Currently, I create a new match and input odds. These odds are adjusted to the VEX standard of 5% fees, so 105% implied probability. The odds are multiplied by a weighting factor that determines the elasticity of the odds. We implement parimutuel betting, meaning that the odds change as a function of users' bets, this means the odds for a given match will decrease automatically if more users are placing bets on that match. Once the match is complete, the users who selected the correct team will be paid out.

How we built it

Please note this was a pre-existing project, and during this hackathon, I implemented the betting flow to be in USDC instead of NEAR.

I implemented this additional feature by first researching the ft_on_transfer function, and swapping the make_bet function for this. Then, I had to change the return_bets and finish_match functions so that the users are paid in USDC instead of NEAR.

Challenges we ran into

I ran into an error that was really quite simple in the frontend where I had to multiply one number by another and convert it to a string, but it would automatically turn it into standard form, which ft_on_transfer cannot accept. After looking at the screen for two hours and asking three different people, I was no closer to solving it. So I asked in the BOS telegram, and lord above Illia came and saved the day and fixed the issue.

Accomplishments that we're proud of

I had never played around with FTs before, so I was very pleased I was able to implement this functionality during the hackathon.

What we learned

I learnt how fungible token transfer works. It is really quite messy so I am going to start a discussion in contract standards to hopefully improve the flow.

What's next for VEX

I plan to implement incremental changes. There are plans to introduce a DAO structure associated with the contract such that community members can guide the development of the platform, and fees generated will be redistributed to stakers. I also want to add the addition of meta transactions so users don't have to hold any NEAR. An oracle will also be implemented so the flow is automatic and not centralised.

We hope to raise funds in the future so we can do this full time and hire some more devs. Then launch to mainnet.

Built With

Share this project:

Updates