BNBBets

406

2022.06.21

Disclaimer:

show more...

Conclusion:

The BNBBETS Smart-Contract found no vulnerabilities, no backdoors, and no scam scripts.

 

The code was tested with compatible compilers and simulated manually reviewed for all commonly known and specific vulnerabilities.

 

So, BNBBETS Smart-Contract is safe for use in the Binance Smart Chain main network.

CRITICAL ISSUES

(Critical, high severity)

0

HIGH ISSUES

(High, medium severity)

0

ERRORS, WARNINGS

(Medium, low severity)

0

OPTIMIZATION

(Low severity)

0

RECOMMENDATIONS

(Very low severity)

0

 

Independent description of the smart-contract functionality

The BNBBETS smart contract provides the opportunity to play two different games Lottery, and prediction.

  • Lottery, users can buy a ticket for 1 BUSD and participate in the lottery game and win a prize based on pair numbers from left to right.
  • Prediction, users can Predict if the price of BNBUSD will be higher or lower than it was when the “LIVE” phase starts.

 

Launch Date

based on the audit date (June 21, 2022) the project is not launched yet. The owner has access to activate the project and the launch date is dependent on the owner's decision

 

Contract Owners Fee

Lottery:

  • Buy ticket:                          10%

Prediction:

  • Calculate reward:             10%

 

 

Lottery

Users can buy a ticket to participate in the lottery game

  • The ticket price is 1 BUSD.
  • Each round is 24 hours.
  • Users can randomly and manually purchase a maximum of 100 tickets in one transaction.
  • The final number of each round is a 6-digit number in which order is also important, and the number in each position is between 0 and 9.
  • Winning is based on pair numbers from left to right in order.
  • Winners’ prizes:

Digit matched

Prize pool allocation

Matches first 1

10%

Matches first 2

12%

Matches first 3

15%

Matches first 4

18%

Matches first 5

20%

Matches first 6

25%

  • The draw is fully random and based on the combination of an encrypted private and unpredictable number.
  • After each round, the BUSD that is left in the pot and no one wins is transferred to the next round.

 

Owner privileges (Lottery)

  • the owner can set the ticket price from 1 BUSD to 5 BUSD
  • The owner can change the number of tickets that can be purchased in a transaction to 1 or greater.
  • The owner can withdraw all the BNBs that were mistakenly sent to the contract.
  • The owner can withdraw all tokens except BUSD that were mistakenly sent to the contract.

 

Token lock protection

10 days after the last ticket purchase or claim, the owner can withdraw BUSD according to the following rules to prevent the token from being locked in the contract.

  • if the contract balance is less than 1000 BUSD, the owner can withdraw all of the contract balance.
  • if the contract balance is more than 1000 BUSD, the owner can withdraw 20% of the contract balance.  (In this case, the protection step increases by 10 days)

 

Prediction

users can Predict if the price of BNBUSD will be higher or lower than it was when the “LIVE” phase starts.

 

Game rules:

  • users have 5 minutes to predict before a round goes live.
  • Each user can bet only once per round.
  • rewards will be distributed based on the Closing Price of the live round.
  • Users can enter the game with any amount of BNB (from 0.01 BNB).
  • The instant price of BNB in the game is automatically taken into the contract by the ‘Pancakeswap’ aggregator.
  • If the contract cannot receive the BNB price from Oracle in each round, users who have bet on that round can withdraw their bet amount.
  • If only one side of a round has positions entered into it, then that side loses. the losing funds will be sent to the treasury and developer pot.
    • imagine that user A enters a UP position, and no one else enters a DOWN position. user A loses, and there are no opposing positions for the winnings to be paid out to. Funds are sent to the treasury and developer pot.
  • if the locked price and closed price are the same, all funds entered into positions will be sent to the treasury and developer pot.

 

Users have two choices:

  • up position, if BNBUSD “Closed Price” is higher than the “Locked Price” at the end of the 5-minute LIVE phase, the user wins, and if it’s lower, the user loses.
  • down position, if BNBUSD “Closed Price” is higher than the “Locked Price” at the end of the 5-minute LIVE phase, the user loses, And if it’s lower, the user wins.

 

Calculate payment

The payment ratio is calculated based on the following formula:

  • UP Pool: Total Value of Both Pools ÷ Value of UP Pool
  • DOWN Pool: Total Value of Both Pools ÷ Value of DOWN Pool

Suppose there is a total of 100 BNB in both pools (10 BNB in the DOWN pool and 90 BNB in the UP pool). Based on this information payment ratio of the DOWN pool will be 10X and the UP pool will be 1.1X.

Based on the above information, if you committed 5 BNB to a DOWN position, you will get 50 BNB (The actual amount you receive is 45 BNB because it deducts a 10% project fee).

 

Owner and Admin privileges (Prediction)

  • The owner can withdraw all tokens that were mistakenly sent to the contract.
  • The owner can change the admin address.
  • The admin can set the round duration from 5 minutes to 1 day.
  • The admin can set the minimum bet amount from 0.01 BNB to 0.1 BNB.
  • The admin can define a new operator. Operators can do the following:
    • executing new round
    • start and lock genesis round
    • pause the game
  • The admin can change the contract address of the oracle (oracle is used for price feed).
  • the admin can change the oracle update allowance.
  • The admin can pause and unpause the game.