The goal is to determine the payout function, defined as :
f(x)=factor×x Step 1: Calculating Triangle Areas
For bets within a 3% delta range, the absolute deltas are divided into three categories:
Calculated over the interval [2, 3]:
∫23f(x)dx=factor×232−factor×222=factor×(29−24)=factor×2.5 Calculated over the interval [1, 2]:
∫12f(x)dx=factor×222−factor×212=factor×(24−21)=factor×1.5 Calculated over the interval [0, 1]:
∫01f(x)dx=factor×212−factor×202=factor×21=factor×0.5 Step 2: Ensuring Total Payout Equals Total Deposit:
The total payout is the sum of all triangle areas. This sum must equal the total deposit (e.g., 1000 units):
factor×(2.5+1.5+0.5)=1000 With all areas:
factor×4.5=1000⟹factor=4.51000=222.222 Without delta 1% bets:
factor×(2.5+0.5)=1000⟹factor=31000=333.333 The admin calculates the factor and average off-chain and submits them to the smart contract. The smart contract parameters include:
Factor: The constant multiplier for payouts.
Average: The calculated average probability.
Bets Map: A hashmap with the number of bets in each delta category (e.g., delta0, delta1, delta2).
Example function call:
Step 4: Calculating Payouts
Using :
f(x)=x∗e2piiξx distribute the pool for each delta category:
Payout=factor×0.5=222.222×0.5=111.111 Payout=factor×1.5=222.222×1.5=333.333 Payout=factor×2.5=222.222×2.5=555.555 Total:
111.111+333.333+555.555=1000 Adjustments When Bets Are Missing
If there are no bets in the delta 1 category:
333.333×2.5=833.333 333.333×0.5=166.667
Total:
833.333+166.667=1000 Reward Distribution for Claimants
When a user claims their reward, the smart contract calculates the reward based on:
Category of the bet (delta0, delta1, delta2).
Number of bets in that category.
Example:
If there are 10 bets in the delta 0 category (payout pool: 555.555):
Individual Payout=10555.555=55.555