Rebalancejobs become available when voters cast votes on a ballot and then change their vote weight. This action prompts workers to recalculate that voter's weighted votes based on their new balance, and the worker is paid for performing this recalculation. Since a voter can participate on any number of different ballots, rebalance jobs become available on every active vote by that voter after a balance change.
Cleanupjobs become available after ballots close and the votes for that ballot are no longer needed in chain memory. Workers are paid for cleaning up the expired votes and returning the committed RAM back to the original voter.
telos.decidecontract for specific actions.
transfer(), etc. for rebalance work. However, since ballots have control over which token balance they read from (either liquid or staked) some of these actions may not warrant a rebalance job because the actual balanced used in calculating votes wasn't affected.
transfer()actions won't make a rebalance job available (since the voter's staked balance wasn't affected by the transfer, only their liquid balance).
rebalance()action to perform a rebalance on an active vote. The work will be logged on the vote, and when the vote is cleaned the total rebalance work will be credited to the worker's account.
cleanupvote()action to clean it up. Cleaning up votes submits all the rebalance work that was done on it as well.
claimpayment()action to claim their earned payment for work performed since the last
claimpayment()a worker must specify which treasury they are claiming work for, as worker funds are managed on a treasury-by-treasury basis. Only work performed for ballots under that treasury will be paid - this way it's always clear where worker fund money is going and treasuries only need to worry about funding their own ballots.
TESTtreasury will pay workers from the
TESTtreasury's worker fund. Funds for the
CRAIGtreasury will never be paid for work done on the
TESTtreasury, and vice versa, ad infinitum.
Rebalance Volumeis the total volume of rebalance work done for a treasury, measured by the amount of raw tokens rebalanced.
Rebalance Countis the total number of valid rebalances done for a treasury by the worker.
Cleanup Countis the total number of cleanups done for a treasury by the worker.
forfeitwork()action. This will delete all work done by the worker for the treasury and forfeit all payment they would otherwise receive.