Develop a lotto game dapps on Tron network. Slightly different from lotto over the web. Player get to bets on 4 digits number of their own and to match with result to win prizes. On top of that, I will need a referral functions on uni level basis. This is needed to get users rewarded for bringing in more user.
Two phases of development.
ICO like with referral function. Open to 1000 shares at 100USDT each for certain period of time or until 1000 funder has been met. In return, funders will get a 2% sharing over dapps sales of lottery.
record of funders wallet address and number of shares at 100USDT each.
dividend to distribute once a month, 1st day of the following month.
2. Launch of the lottery by me depositing TRX into the smart contract. (Set bet limit, TRX deposited/6400=bet limit for first draw)
3. User connect wallet
immediately record referral relationship for new user
if user did not come by invitation link, by default the contract owner is the referrer
3 empty column for user to
Key in 4 digit number of their choice from (0000-9999)
key how much they want to bet on each set of 4 digit number
random number generation functio want to bet with random number instead of self chosen number
column if they want to bet more than 3 sets of number.
Total up the bet, if any bet exceed limit, inform user the balance they can bet (limit is at item 2). If not exceed limit, proceed to.
Confirm transactions, 100% of the bets go into smart contract.
At X time of the day, admin will close bet.
Admin call for result draw. 23 result start from
8.1 10 consolations (x60 per TRX bet)
8.2 10 starters (x180 per TRX bet)
8.3 3rd prize (x500 per TRX bet)
8.4 2nd prize (x1000 per TRX bet)
8.5 1st prize (x2500per TRX bet).
Pull prizes won from any bet (if any) from TRX in smart contract into Pool B. (Pool B is used to manage payout of user)
[login to view URL] Referral commission 23% (uni level), from "today's sales" from smart contract into Pool B. ( to clear smart contract so we can calculate bet limit for next round)
Pull managements 5% and funders 2% from today's sales from smart contract into contract owner address. ( to clear smart contract so we can calculate bet limit for next round)
Balance TRX in Smart contract is now clear of all payouts so we can proceed to calculate new bet limit for second round.
When smart contract is clear from any payout and new bet limit is set, can start second round bet.
Withdrawal of any users on Prizes won, referral commission from pool B will deduct 3% "Withdrawal fees" to contract owner.
As for funders dividend. I will allocate 2% (item 11) from daily sales to distribute among initial funders(item 1). Manually distributed once a month by admin..
I will need below data
15.1 how many funders and their shares. (From item 1)
15.2 their wallet address (from item 1)
15.3 how much sales within x period. (Example launch date - end of month)
I have 300 funders, 100USDT each. Sales total at 1,000,000 TRX and from launch at 1st June until end of month 30th June. I want to process dividend payout. As the funders 2% have been sent to contract owner at item 11. I now need to distribute dividend to my funders.
So I need a functions to trace the sales from launch date to 30th June, to get 1,000,000 sales.
So I can manually calculate, as below
1,000,000 x 2% /300 = 66.67.
I will distribute 66.67 TRX to all 300 funders on 1st July manually.
Is there a way to send bulk Trx to funders so I don't have to key in 300 addresses?
Dapps & smart contract deployment.
I will provide the UI, logo, domain and hosting.