The current L1 smart contract based system is
<aside> ℹ️ Include spark points / glif points in the conceptual design (not just scheduled FIL rewards)
</aside>
Since the new service needs to keep track of balances across rounds, and doesn’t necessarily know how much FIL is still available (the FIL won’t live in the smart contract), assume that always the full per-round FIL amount is available. One round equals 0.456621004566210045 FIL
. This way the logic of converting scores to FIL is trivial: reward = score / MAX_SCORE * 0.45.. FIL
.
There are drawbacks of all these designs, without which off-chain scheduled rewards aren’t possible:
➖ Per-round scores aren’t stored in the smart contract
➖ Because per-round scores aren’t stored in the contract, you can’t put future rewards into the smart contract. You can only send funds to the smart contract for work that has already been done (through addBalances()
). This means that whoever holds the funds before retroactively sending rewards to the contract, will hold other peoples’ money.
<aside> ℹ️ For example: If we send rewards/scores to the contract once per 7d, and if an operator sees that they have scheduled rewards of 0.1 FIL, on day 1 of the payout period: Those 0.1 FIL will either be held by a Station admin wallet, or a Station service wallet. With the previous design, these 0.1 FIL would have been held by the smart contract.
</aside>