Build a Solidity Betting Contract
Budget: $30 – $250 USD
We need a solidity contract to be built. It will be a betting contract. It needs to also be connected to a dApp so that user's are easily able to use. Also the contract should include an API connectivity (such as Chainlink oracle) so that it can fetch true random winnings.
The contract should work as following -
1. Imagine there are 10 horses on which people can bet. There will be a simple start timer for the betting to start at a specific time (given by owner) and also an end time for betting.
There will be two betting options - Winning Place bet, 1-3rd Place bet. They can enter both bets.
( Example: in bettings horses, you can either place bet on a horse like number 8's gonna win for sure - that's winning bet
and you can also place bet like am sure horse number 6 is going to be from 1-3rd place - that's 1-3rd place bet)
2. When all bets are in place, 20% will go to the owner address and remaining 80% will remain as winning pot.
3. An oracle would be called via API from the contract to get a true random number/seed from which random number of winning horse would be got. Also the 2nd, 3rd, 4th placed horse numbers.
4. 65% of the pot will be disbersed to winning place betters and rest 35% will be dispersed to 1-3rd place betters. Not automatically dispersed, they have to claim it. If they do not claim winnings within 3 days, the amount will be transferred to owner.
After this, again the whole process restarts.
This total contract need to have connectivity with dApp for the UI portion.
The contract should work as following -
1. Imagine there are 10 horses on which people can bet. There will be a simple start timer for the betting to start at a specific time (given by owner) and also an end time for betting.
There will be two betting options - Winning Place bet, 1-3rd Place bet. They can enter both bets.
( Example: in bettings horses, you can either place bet on a horse like number 8's gonna win for sure - that's winning bet
and you can also place bet like am sure horse number 6 is going to be from 1-3rd place - that's 1-3rd place bet)
2. When all bets are in place, 20% will go to the owner address and remaining 80% will remain as winning pot.
3. An oracle would be called via API from the contract to get a true random number/seed from which random number of winning horse would be got. Also the 2nd, 3rd, 4th placed horse numbers.
4. 65% of the pot will be disbersed to winning place betters and rest 35% will be dispersed to 1-3rd place betters. Not automatically dispersed, they have to claim it. If they do not claim winnings within 3 days, the amount will be transferred to owner.
After this, again the whole process restarts.
This total contract need to have connectivity with dApp for the UI portion.