Customer-job builder bonus: 2,000 TSKR on 100% payout (0007) #6

Merged
Taskuler-bot merged 3 commits from feat/customer-job-bonus into main 2026-11-11 03:50:08 +00:00
Member

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.
  • 2,000 TSKR flat to the builder for the first 5,000 qualifying jobs (10M TSKR), at most 10 per builder per funding period.
  • reserve(jobId) (anyone) once the builder is accepted; finalize(jobId) after Resolved: award on a final 100% payout (Kleros
    included) to a still-qualifying job (reverts NotFunded if unfunded), otherwise release the slot. Never released while disputed.
  • Qualifying: not a project job, not a CR2 review job, customer ≠ Market owner (the Safe), customer ≠ builder, neither excluded,
    accepted price ≥ minBounty[token] (0 = token not eligible).
  • Leftover TSKR → the 600M initial-builder allocation: constructor argument allocationVault, which must equal TSKR's genesis
    communityRewardsVault (else BadAllocationVault); returnExcess() sends only TSKR above totalOwed + (5,000 − awarded) × 2,000
    and only there. No Safe default. Returned TSKR rejoins the vault and vests on its schedule.
  • Funding period = the vault's monthly release: periodStart and PERIOD are 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.
  • CE2: per-address count plus Safe exclusions; setExcluded(account, true, reasonURI) requires a reason URI (MissingReason).
  • withdraw() blocked while the Market holds the builder (OFAC). Market change: resolvedBuilderPct(jobId).
  • Deploy: script deploys TSKR and BuilderBonus with community as the allocation vault; BONUS_FUNDER env removed.
    Post-deploy note: the Safe calls setMinBounty(USDC, 100e6); per-token equivalents (ETH ≈ $100, USDT 100e6, DAI 100e18) are notes only.

DECIDED

  • 2026-11-09: 2,000 TSKR × first 5,000 jobs; cap 10 per builder per funding period.
  • 2026-11-10: excess returns to the initial-builder allocation vault; funding period follows the monthly release; minimum bounty is
    a Safe setting, default 0, Safe sets USDC 100 after deploy; cap enforced with CE2.

PROVISIONAL (George decision pending)

  • Slot reuse: a released slot returns at once and frees the builder's period count (never while open or disputed).
  • A bonus needs a final 100% payout (AgreedSplit, Reviewed or Kleros at 100% count); unreserved jobs get no bonus.
  • No extra non-zero-fee requirement; exclusion appeals go off-chain to the Safe; no expiry for unfinished jobs.
  • 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.sol 23 test functions incl. allocation return, wrong-vault revert, monthly period
    fuzz and roll-over at the release, re-vesting of returned TSKR, CE2 reason; invariant suite near the 5,000 cap).
  • Coverage (earlier Nov 10 run): BuilderBonus 100% lines, 99.17% statements, 94.74% branches, 100% functions; TaskulerMarket 99.75% lines, 98.00% branches.
  • Sizes: TaskulerMarket 22,782 B (22.25 KiB, limit 24,576), BuilderBonus 6,535 B. Slither: 38 results, all triaged.

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) (to is always the allocation vault)
  • Changed ABI: constructor (address governance, IERC20 tskr, TaskulerMarket market, MonthlyVestingVault allocationVault);
    funder() removed, allocationVault() added; PERIOD() is now an immutable read from the vault; new errors BadAllocationVault, MissingReason.

Changelog 2026-11-10

  • Return target moved from a funder address (default Safe) to the TSKR genesis community vault, checked on-chain.
  • Funding period derived from the vault's start and monthly step instead of a fixed constant and a separate start parameter.
  • reasonURI required for exclusions (CE2); minBounty docs and deploy notes (USDC 100e6 after deploy).
  • 11:33 AM CT: rebased onto the updated CR2 head (ruling 0 / lapse decisions); no bonus code change.
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. - 2,000 TSKR flat to the builder for the first 5,000 qualifying jobs (10M TSKR), at most 10 per builder per funding period. - `reserve(jobId)` (anyone) once the builder is accepted; `finalize(jobId)` after `Resolved`: award on a final 100% payout (Kleros included) to a still-qualifying job (reverts `NotFunded` if unfunded), otherwise release the slot. Never released while disputed. - Qualifying: not a project job, not a CR2 review job, customer ≠ Market owner (the Safe), customer ≠ builder, neither excluded, accepted price ≥ `minBounty[token]` (0 = token not eligible). - **Leftover TSKR → the 600M initial-builder allocation:** constructor argument `allocationVault`, which must equal TSKR's genesis `communityRewardsVault` (else `BadAllocationVault`); `returnExcess()` sends only TSKR above `totalOwed + (5,000 − awarded) × 2,000` and only there. No Safe default. Returned TSKR rejoins the vault and vests on its schedule. - **Funding period = the vault's monthly release:** `periodStart` and `PERIOD` are 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. - **CE2:** per-address count plus Safe exclusions; `setExcluded(account, true, reasonURI)` requires a reason URI (`MissingReason`). - `withdraw()` blocked while the Market holds the builder (OFAC). Market change: `resolvedBuilderPct(jobId)`. - Deploy: script deploys TSKR and BuilderBonus with `community` as the allocation vault; `BONUS_FUNDER` env removed. Post-deploy note: the Safe calls `setMinBounty(USDC, 100e6)`; per-token equivalents (ETH ≈ $100, USDT 100e6, DAI 100e18) are notes only. ## DECIDED - 2026-11-09: 2,000 TSKR × first 5,000 jobs; cap 10 per builder per funding period. - 2026-11-10: excess returns to the initial-builder allocation vault; funding period follows the monthly release; minimum bounty is a Safe setting, default 0, Safe sets USDC 100 after deploy; cap enforced with CE2. ## PROVISIONAL (George decision pending) - Slot reuse: a released slot returns at once and frees the builder's period count (never while open or disputed). - A bonus needs a final 100% payout (AgreedSplit, Reviewed or Kleros at 100% count); unreserved jobs get no bonus. - No extra non-zero-fee requirement; exclusion appeals go off-chain to the Safe; no expiry for unfinished jobs. - `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.sol` 23 test functions incl. allocation return, wrong-vault revert, monthly period fuzz and roll-over at the release, re-vesting of returned TSKR, CE2 reason; invariant suite near the 5,000 cap). - Coverage (earlier Nov 10 run): BuilderBonus 100% lines, 99.17% statements, 94.74% branches, 100% functions; TaskulerMarket 99.75% lines, 98.00% branches. - Sizes: TaskulerMarket 22,782 B (22.25 KiB, limit 24,576), BuilderBonus 6,535 B. Slither: 38 results, all triaged. ## 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)` (`to` is always the allocation vault) - **Changed ABI:** constructor `(address governance, IERC20 tskr, TaskulerMarket market, MonthlyVestingVault allocationVault)`; `funder()` removed, `allocationVault()` added; `PERIOD()` is now an immutable read from the vault; new errors `BadAllocationVault`, `MissingReason`. ## Changelog 2026-11-10 - Return target moved from a funder address (default Safe) to the TSKR genesis community vault, checked on-chain. - Funding period derived from the vault's start and monthly step instead of a fixed constant and a separate start parameter. - `reasonURI` required for exclusions (CE2); minBounty docs and deploy notes (USDC 100e6 after deploy). - 11:33 AM CT: rebased onto the updated CR2 head (ruling 0 / lapse decisions); no bonus code change.
Taskuler-bot force-pushed feat/customer-job-bonus from 9b2c41de71 to c988b9caa4 2026-11-10 17:41:24 +00:00 Compare
Taskuler-bot changed target branch from feat/cr2-completion-review to main 2026-11-11 03:47:30 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
taskuler/contracts!6
No description provided.