đŸĻPool

How the payout system works.

Overview

The pool system is designed to ensure that every puzzle created within our protocol has sufficient funds available for potential payouts. This document outlines how funds are locked, unlocked, and managed within the pool when users create and play puzzles. For those who prefer to read the code directly, you can find it here. The code has been audited by Trust Security to ensure security and reliability.

Mechanics

Puzzle Creation and Fund Requirement

When users create a puzzle, it remains inactive until they deposit enough funds into the pool. The pool holds the funds necessary to cover potential payouts for puzzles in play. As long as the funds are enough to support the minimum payout, the puzzles will be visible to other people. However, if the funds are not enough to support the maximum payout, the toll players will be able to pay to play a game will be capped.

Locking Funds via coin Function

When a puzzle is played, the coin function locks the potential payout amount in the pool. Locked funds cannot be withdrawn or used to fund other puzzles until the puzzle is resolved. This ensures that payouts are guaranteed for successful solves.

Solving a Puzzle with solve Function

If a user successfully solves a puzzle, they call the solve function. The locked funds are immediately transferred to the user as the reward.

Expiring a Puzzle with expire Function

If a user fails to solve a puzzle, our frontend encourages players to call expire to unlock funds for the creator immediately. If they do not for whatever reason, the puzzle can be expired after 24 hours, at which point anyone can call expire to unlock the funds. To view the answer of a failed attempt, the puzzle must be expired first, providing further incentive for users to expire the puzzles they play.

Automatic Expiry and Community Unlocking

Players who want to play puzzles from creators with locked funds will typically call expire on their non-expired puzzles to unlock more funds so they can lock them instead. In most cases, this process ensures that all puzzles expire and funds are freed without requiring puzzle creators to manually expire their own puzzles.

Handling Locked Funds

If your funds appear locked due to an ongoing puzzle, be patient as they will become available once the puzzle expires or is manually expired. There is no attack vector where funds can be permanently locked. Our smart contracts have been audited to ensure fund security and smooth operations.

Last updated