Horse Racing Bet Game 🐎 by Amazing - Lets Bet With Multiplayer

The blockchain is deterministic. It means that every node knows all the inputs to any smart contract before the contract executes (the block no, the timestamp, etc…). Also the contract code is easily decompiled. So if your “random technique” is based on inputs from the blockchain, the output can be calculated before executing it. I’m not saying it’s easy to do, but doable.
So the problem is not your “random technique”, but the idea that implementing randomness in blockchain is possible. It is not.

4 Likes

Thanks a lot @tonystark , its an honour to receive your comment on this project :star_struck: :innocent: :partying_face: :cowboy_hat_face: :sunglasses:

Oh may be something I failed to make understand, basically that random number calculation is done within game only and then submitted to blockchain smart contract. This all happen at runtime in game with encryption. And yes in upcoming updates I’ll improve from all the feedbacks like you have shared and from other feedbacks. And that is why currently it is on testnet. Thanks for you all suggestions and feedback. really appreciate it . :partying_face: :innocent: :star_struck:

2 Likes

Real betting event is live. Bet your horse :horse::racehorse: and use testnet

I think this is the relevant code snippet on the smart contract:

function endRace(uint256 _winnerHorseId) external onlyOwner {
    require(
        raceStatus == RaceStatus.Started,
        "Race not started or already ended"
    );
    raceStatus = RaceStatus.Ended;
    winnerHorseId = _winnerHorseId;

    distributeWinnings();
    resetRace();
}

So the winner is picked by the contract owner, you say “randomly”. How can the users be assured that the pick is fair? From the code is very clear that the owner could bet on a horse and make that particular horse win. The _winnerHorseId is passed as an argument to the function call.

2 Likes

May be I failed to make things clear but if you check my reply, I said randomly thing is generated within gameplay. so if you are online at racetime then that number will be generated within game with block information + hash + randomness technique so you will be able to see live winner in live race so that will make things clear that manually owner is not giving input for winner.
I had created logic in past that anyone can declare winner but then removed that part and still thing are in process here to make a great functionality which will fix your doubt of owner’s winner selection process. but yes like salt and other details will rely on off-chain data otherwise anyone can judge the winner.

I would love to learn if you suggest any technique from your experience. Thanks a lot

1 Like

bet your horse and chance to win pool prize :star_struck:

I suggest the use of an oracle as source of randomness. If the winner pick process is all in visible in the contract (without parts coming from off-chain) it’s much better for transparency. Nice game anyway, good luck.

1 Like

Thanks for suggestions. I know about VRF but this will be new to me. I’ll definitely try this. Thanks again for all your valuable feedback and time on this project.

Really appreciate it.

1 Like

Real Betting is Live on Testnet. Give it a try

2 Likes

I tried, nice game but unfortunately I didn’t win the bet pool prize :sweat_smile:
better luck next time. all the best.

1 Like

All the best for next real racing. try to put bet on multiple horse that will increase chance of winning pool amount :cowboy_hat_face:
Thanks

The game looks very enjoyable and fun, I wanted to try it immediately after the video and the comments I saw. But even though I connected the wallet, I got stuck in this menu. Do I need to do something different? Can you check? I’m excited to test it.

3 Likes

Hi @TritonTeam ,
sorry for inconvenience caused.
I want to confirm that make sure you are trying from laptop or desktop only. (mobile/tab does not work)
Metamask installed on browser with btt testnet configured in browser.

If you are already doing this all then kindly clear browser cache and retry. it should work !
even if not then let me know.

Thanks for putting your efforts and supporting my game. :partying_face:

2 Likes

Welcome to the greatest hackatron ever held. Your project is very good I like your project. Your game will rock itt🔱

1 Like

New real bet is live. try to set bet on your horse. As it is on testnet feel free to bet on multiple horses

3 Likes

Thank you so much @Spiderman01 , when spiderman is with us then I have super power. hahahaha.
Thanks a lot for the wishes and lovely feedback. :partying_face: :cowboy_hat_face: :horse: :horse_racing: :racehorse:

Does the prototype work efficiently now?

1 Like

We tested it from a different browser and it works without any problems. You have created a truly magnificent work. We hope you develop it further and reach many more users.

1 Like

Hey team Amazing, wishing you the best of luck in this voting stage :purple_heart:

1 Like