Skip to content

can you add Limbo verifier? #1

@teebu

Description

@teebu

Based on the sites example, they seem to truncate after 2 decimals, no rounding. I had to multiply by 100000000 then divide.

Had to use a custom toFixedTrunc func to truncate value.

https://stake.com/provably-fair/calculation?clientSeed=a&game=limbo&nonce=23&serverSeed=a

case 'Limbo':
        //100000000 / (81089656 + 1) * (1 - 0.01) = 1.220870868895154
        const bytes = Math.floor(this.bytes_to_number(this.bytes(8)) * 100000000);
        const result = (100000000 / (bytes + 1) * (1 - 0.01));
        return this.toFixedTrunc(result, 2);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions