sau412 / provably_fair Goto Github PK
View Code? Open in Web Editor NEWFaucet with provably fair games
License: GNU Affero General Public License v3.0
Faucet with provably fair games
License: GNU Affero General Public License v3.0
Query error: SELECT SUM(spent
) FROM lotto_tickets
WHERE user_uid
='xxx'
The Exchange tab of freegridco.in is not working. After clicking on it nothing happens.
Consider the function:
function get_roll_result($server_seed,$user_seed) {
$hash=hash("sha256","$server_seed.$user_seed");
$bytes=substr($hash,0,8);
$number=hexdec($bytes);
//return $number;
$roll=round($number/429496.7295);
$roll=sprintf("%05d",$roll);
return $roll;
}
There are two issues with this code that make it unfair (ie. not uniform between [0-10000]). First is the use of round. $number/429496.7295
returns a real number between 0 and 10000 inclusive. If we assume is uniformly distributed, then a 0 or 10000 are both half as likely to be rolled than any other number. 0 is only selected if the input falls in [0,0.5), and 1000 only if [9999.5, 10000], where as a number like 1 could result from any input between [0.5, 1.5).
Secondly, $number/429496.7295
is not uniformly distributed. It only consists of values that are a multiple of 1/429496.7295, which can potentially mean an uneven amount of numbers will map to a particular interval if that interval is not also a multiple of 1/429496.7295. For instance, with the current round scheme, 429497 values for $bytes map to 1, while 429496 values map to 2.
May I suggest this alternative algorithm which fixes the above issues, but is slightly more computationally expensive and difficult to validate manually:
function get_roll_result($server_seed,$user_seed) {
for ($i = 0;;$i++) {
$hash=hash("sha256","$server_seed.$user_seed.$i");
$bytes=substr($hash,0,8);
$roll=hexdec($bytes) % 16384;
//return $roll;
if ($roll <= 10000) {
return $roll;
}
}
}
The website’s security certificate expired on July 5th 2023
On https://freegridco.in/#free_roll, the page persistently displays Wait for xx:xx before next roll
, even if I haven't been to the page in hours. It seems the system believes rolls were made that weren't, the balance doesn't increment, and clicking "view last roll seeds" shows the last roll was made two days ago.
If I leave the page open until the roll button appears and click it, it's replaced by red error text stating Only one roll in 3600 seconds allowed. Wait xxxx seconds more.
.
By making multiple withdraw requests for the total wallet amount, the wallet balance can be overdrawn.
transaction id is 9563f42780cdecc45d2df54a1ec3592534813109fe5ce68f2674368f0976a7f0
@sau412 free roll via email not working
Can someone put MFA on the login please? This would be great to prevent being hacking into.
pls do add referal link.pls ..so i can invite more to your website ..thanks.
When accessing the .onion server, Tor browser returns error: 504 Gateway Time-out
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.