Customer-job builder bonus: 2,000 TSKR on 100% payout (0007) #6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/customer-job-bonus"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Base:
feat/cr2-completion-review· Head:feat/customer-job-bonus· Decided by George 2026-11-09/10. Not deployed. Replaces #3.Design
BuilderBonus(Ownable2Step, owner = the Safe), separate from the Market: it only reads it (getJob,resolvedBuilderPct,reviews,isHeld,owner) and never touches escrow. Pull-based payouts.reserve(jobId)(anyone) once the builder is accepted;finalize(jobId)afterResolved: award on a final 100% payout (Klerosincluded) to a still-qualifying job (reverts
NotFundedif unfunded), otherwise release the slot. Never released while disputed.accepted price ≥
minBounty[token](0 = token not eligible).allocationVault, which must equal TSKR's genesiscommunityRewardsVault(elseBadAllocationVault);returnExcess()sends only TSKR abovetotalOwed + (5,000 − awarded) × 2,000and only there. No Safe default. Returned TSKR rejoins the vault and vests on its schedule.
periodStartandPERIODare read from the vault in the constructor;periodOf(t) == allocationVault.monthsElapsed(t)(fuzz-tested); period n begins at the same second the n-th monthly release unlocks.setExcluded(account, true, reasonURI)requires a reason URI (MissingReason).withdraw()blocked while the Market holds the builder (OFAC). Market change:resolvedBuilderPct(jobId).communityas the allocation vault;BONUS_FUNDERenv removed.Post-deploy note: the Safe calls
setMinBounty(USDC, 100e6); per-token equivalents (ETH ≈ $100, USDT 100e6, DAI 100e18) are notes only.DECIDED
a Safe setting, default 0, Safe sets USDC 100 after deploy; cap enforced with CE2.
PROVISIONAL (George decision pending)
REWARDS_DISTRIBUTOR(vault beneficiary that forwards TSKR) still defaults to the deployer in the phase-1 script.Tests and coverage
forge test: 195 passed, 0 failed (test/BuilderBonus.t.sol23 test functions incl. allocation return, wrong-vault revert, monthly periodfuzz and roll-over at the release, re-vesting of returned TSKR, CE2 reason; invariant suite near the 5,000 cap).
Indexer events / ABI
SlotReserved(uint256 indexed jobId, address indexed builder, uint256 indexed period, uint256 slotsUsed)BonusAwarded(uint256 indexed jobId, address indexed builder, uint256 amount, uint256 awarded)(the bonus credit)SlotReleased(uint256 indexed jobId, address indexed builder, uint8 builderPct)BonusWithdrawn(address indexed builder, uint256 amount)MinBountySet(address indexed token, uint256 minBounty),ExclusionSet(address indexed account, bool excluded, string reasonURI)ExcessReturned(address indexed to, uint256 amount)(tois always the allocation vault)(address governance, IERC20 tskr, TaskulerMarket market, MonthlyVestingVault allocationVault);funder()removed,allocationVault()added;PERIOD()is now an immutable read from the vault; new errorsBadAllocationVault,MissingReason.Changelog 2026-11-10
reasonURIrequired for exclusions (CE2); minBounty docs and deploy notes (USDC 100e6 after deploy).9b2c41de71toc988b9caa4