I want to make a smart contract where person 1 has a "jackpot" in, person 1 can ask person 2 to do something on their behalf for person 3 and include a promise of payment which includes a hash and an agreed number range (bigger range=bigger chance of winning jackpot). Once person 2 has done the thing for person 3, person 3 sends the seed of the hash to person 2 known only by person 1 and person 3 and then person 2 can send request to person 1 smart contract including the promise of payment and the seed of the hash proving they have done the requested action from person 1. The smart contract would then generate 2 random numbers and see if they are within the range in the promise of payment and if they are then payout the funds to person 2 address.
Hope that is understandable
would that be feasible and would it be feasible to have multiple users jackpots in one big contract to save on contract deployment cost?
Can include a counter in promise of payment that increases with every new one so that each one can only be executed once and in order
Edit: I am obvs a nube to smart contracts and solidity, could someone calculate how much the smart contract would cost to deploy if it were for single user and if was all in one contract (how scalable would that be aswell)
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments