what you say makes no sense. I don't understand , Why should we make the result 1 second early or late?
Let's use your provably fair demo:
const ROUND_CREATED = "6/20/2023, 10:31:12 PM"; // Timestamp when round was created.
const ROUND_HASH = md5(ROUND_CREATED); // MD5 of Timestamp.
const SECRET = "vo1Ee1o11CSv"; // A 12-characters string randomly generated.
const ROUND_ENDED = "6/20/2023, 10:31:32 PM"; // Timestamp when round has ended.
const GEN_OUTCOME = hexdec(sha256(`${ROUND_HASH}-${SECRET}-${ROUND_ENDED}`).substr(0, 8)) % 15;
console.log("Outcome is", GEN_OUTCOME);
[/quote]
That prints: [code]Outcome is 2
But let's say the round ended 1 second earlier (i.e. const ROUND_ENDED = "6/20/2023, 10:31:31 PM"; )
it would print:
Outcome is 13
Because we have no way of verifying when the round should have ended (or started!) there's no way to know if you have manipulated the result (or not).
A malicious site operator could easily cheat by picking secrets, start or end times to lead to what ever result they wanted. Therefor it's not provably fair =)[/code]