Customer-job builder bonus: 2,000 TSKR on 100% payout (0007) #3
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. Not deployed.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.10 bonuses per builder per funding period (
MAX_PER_BUILDER_PER_PERIOD).reserve(jobId)(anyone, e.g. the website keeper) once the builder is accepted (Assigned/Delivered/Disputed): checks qualifyingrules, the builder isn't held, the global and per-period caps.
finalize(jobId)afterResolved: awards when the final builderpayout is 100% (Kleros included) and the job still qualifies (reverts
NotFundedif unfunded); otherwise releases the slot.A slot is never released while a dispute is pending.
accepted price ≥
minBounty[token](0 = token not eligible).withdraw()is blocked while the Market holds the builder (OFAC). Governance can onlysetMinBounty,setExcluded, andreturnExcess()(only TSKR abovetotalOwed + (5,000 − awarded) × 2,000, only tofunder).resolvedBuilderPct(jobId)set on resolution. Deploy script deploys TSKR and BuilderBonus.Tests and coverage
forge test: 184 passed, 0 failed (newtest/BuilderBonus.t.sol, 20 tests;test/invariant/BonusInvariant.t.solstarts nearthe cap and checks CountCap, TotalCap, AwardsFunded, AwardAccounting, PerBuilderPerPeriod).
Indexer events
SlotReserved(uint256 indexed jobId, address indexed builder, uint256 indexed period, uint256 slotsUsed)BonusAwarded(uint256 indexed jobId, address indexed builder, uint256 amount, uint256 awarded)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)PROVISIONAL defaults (George decision pending)
setMinBounty(suggested USDC100e6).returnExcess) = the governance Safe by default viaBONUS_FUNDER; changed from the deployer EOA in this PR.non-zero-fee requirement; the Safe keeps the
excludedlist; no expiry for unfinished jobs.478f37962eto9b2c41de71Taskuler-bot referenced this pull request from taskuler/web2026-11-10 16:59:11 +00:00
Replaced by #6 (#6), reopened under the taskuler-bot account. Please review there.
Pull request closed