Builder tax notice on payout screens + CR2 independent-review UI plan (sketch) #3

Merged
Taskuler-bot merged 5 commits from feat/nov9-tax-notice-cr2-plan into feat/phase1-scaffold 2026-11-11 03:40:56 +00:00
Member

Not deployed; awaiting George's approval. This is a branch PR into feat/phase1-scaffold. Please don't merge without sign-off.

This reopens the work from web #1 under Taskuler-bot so George can review it. Head: feat/nov9-tax-notice-cr2-plan @786e1f7. The CR2 plan matches contracts PR #5 @1f2e460 (CR2) and PR #6 @c988b9c (BuilderBonus), which replace the earlier contracts #2/#3. Each point was checked against the source at 1f2e460 (and the bonus head c988b9c). ABIs are not synced into src/contracts yet and are unchanged from the previous 877e607/9b2c41d heads; after the contracts merge they will come from out/TaskulerMarket.sol, out/ReviewerRegistry.sol, out/BuilderBonus.sol and out/WorkHistory.sol (PayoutLib and ReviewLib events are mirrored on the Market ABI).

Builder tax notice

  • src/components/TaxNotice.tsx has the verbatim text from docs decisions/0005-legal-review.md (adopted Nov 7, 2026):

    Payments for completed work may be taxable, including cryptocurrency payments. Keep records of what you receive and its value in your local currency when received. You're responsible for your applicable tax obligations; Taskuler may also have reporting obligations.

  • It shows on /withdraw and /history, both with and without a connected wallet, as a small .notice aside. There are no compliance claims.

CR2 plan (current version at 786e1f7, mapped to contracts #5 @1f2e460 / #6 @c988b9c)

  • docs/cr2-independent-review-ui.md is the UI plan. docs/indexer-queries.md is updated for the new Credited.reason field.
  • Credited ABI change (new topic hash): Credited(address indexed account, address indexed token, uint256 amount, uint256 indexed jobId, uint8 reason). CreditReason codes: 0 Payout, 1 Refund, 2 DepositReturn, 3 DepositForfeit, 4 ProtocolFee, 5 ReviewerFee, 6 ReviewerFeeRefund, 7 ArbitrationRefund, 8 ArbitrationReimbursement. Each resolution component emits its own Credited. The app adds a CreditReason type and labels in src/data/types.ts (there is no top-level src/types.ts) and src/data/mock.ts, and shows those labels on /withdraw and /history.
  • Reviewer fee escrowed until resolution. New event ReviewerFeeSettled(jobId, to, amount, paidToReviewer). The fee is no longer credited on submitRecommendation. It is paid to the reviewer on executeRecommendation, or when Kleros matches the recommendation. Otherwise it is refunded to the customer (j.customer, the Safe on build tasks).
  • Ruling 0 (DECIDED 2026-11-10, verified at 1f2e460): if the reviewer recommended 50%, they are paid (rulingToPct(0) == 50 and the earned check is builderPct == r.builderPct). Otherwise the fee is refunded to the customer. This is no longer provisional. ABI unchanged.
  • No silence payout on review jobs. reviewEndsAt returns uint256.max; releaseAfterReview reverts TooEarly. After 2 reassignments and a missed deadline, reviewLapsed(jobId) is true (a view only).
  • Lapsed review (DECIDED 2026-11-10): the Safe has no duty to escalate. The builder or the customer may call requestArbitration at any time after delivery until execution; reviewLapsed is not required. Funds stay in escrow until someone files.
  • ERC-20 Kleros prepay (DECIDED 2026-11-10): the filer bears the prepay; a filing builder is not repaid by the Safe. The plan and sketch say this wherever they show who prepays.
  • OBJECTION_WINDOW() is a constant fixed at 5 days (DECIDED 2026-11-10), independent of the settable settlementWindow. objectionEndsAt uses it.
  • BuilderBonus (PR #6 @c988b9c): constructor is (governance, tskr, market, allocationVault). allocationVault() replaces funder(). PERIOD follows the vault's monthly release. ExcessReturned.to is always the vault. New errors BadAllocationVault and MissingReason (exclusions require a reason URI). minBounty is a Safe setting, default 0; the Safe will set USDC 100e6 after deploy.
  • Other decided items (2026-11-10): reassignment cap of 2, conflict check on every Safe-funded job, RL2 reviewer onboarding, OFAC review-clock restart on ordinary jobs, a held party cannot raise Kleros.
  • Still open / provisional: bonus slot reuse and the 100% payout rule; the $50 minimum in ETH and TSKR. Deployment still needs the Arbitrum One Safe address.
  • Indexer needs (events, tables, queries; GraphQL enums use underscores) are listed in the plan for Infra Compute Ops.
  • src/sketch/Cr2Sketch.tsx at /sketch/cr2 is a SKETCH. It uses hardcoded mock data, has disabled buttons, isn't linked in the nav, and changes no data source, contract or indexer code. It shows the reviewer list, the Safe assignment panel (fee escrowed until resolution; ruling 0 pays a 50% recommendation), the review panel with the 5-day OBJECTION_WINDOW countdown and "auto-release: never", a lapsed panel with no Safe duty and the ERC-20 prepay rule, the reviewer submit form, and a one-line BuilderBonus note. Local preview (not hosted): /workspace/tw/previews/web-cr2-sketch.png.
  • This PR only plans CR2 and ships the sketch and credit labels; it does not implement the review flow against contracts.

npm run build passes (tsc + vite). Local previews (not hosted) are on the bot box: /workspace/tw/previews/web-withdraw-tax-notice.png, web-history-tax-notice.png, web-cr2-sketch.png.

**Not deployed; awaiting George's approval.** This is a branch PR into `feat/phase1-scaffold`. Please don't merge without sign-off. This reopens the work from [web #1](https://git.taskuler.com/taskuler/web/pulls/1) under Taskuler-bot so George can review it. Head: `feat/nov9-tax-notice-cr2-plan` @786e1f7. The CR2 plan matches **contracts [PR #5](https://git.taskuler.com/taskuler/contracts/pulls/5) @1f2e460** (CR2) and **[PR #6](https://git.taskuler.com/taskuler/contracts/pulls/6) @c988b9c** (BuilderBonus), which replace the earlier contracts #2/#3. Each point was checked against the source at `1f2e460` (and the bonus head `c988b9c`). **ABIs are not synced into `src/contracts` yet** and are unchanged from the previous `877e607`/`9b2c41d` heads; after the contracts merge they will come from `out/TaskulerMarket.sol`, `out/ReviewerRegistry.sol`, `out/BuilderBonus.sol` and `out/WorkHistory.sol` (PayoutLib and ReviewLib events are mirrored on the Market ABI). ### Builder tax notice - `src/components/TaxNotice.tsx` has the verbatim text from docs `decisions/0005-legal-review.md` (adopted Nov 7, 2026): > Payments for completed work may be taxable, including cryptocurrency payments. Keep records of what you receive and its value in your local currency when received. You're responsible for your applicable tax obligations; Taskuler may also have reporting obligations. - It shows on `/withdraw` and `/history`, both with and without a connected wallet, as a small `.notice` aside. There are no compliance claims. ### CR2 plan (current version at 786e1f7, mapped to contracts #5 @1f2e460 / #6 @c988b9c) - `docs/cr2-independent-review-ui.md` is the UI plan. `docs/indexer-queries.md` is updated for the new `Credited.reason` field. - **`Credited` ABI change (new topic hash):** `Credited(address indexed account, address indexed token, uint256 amount, uint256 indexed jobId, uint8 reason)`. `CreditReason` codes: 0 Payout, 1 Refund, 2 DepositReturn, 3 DepositForfeit, 4 ProtocolFee, 5 ReviewerFee, 6 ReviewerFeeRefund, 7 ArbitrationRefund, 8 ArbitrationReimbursement. Each resolution component emits its own `Credited`. The app adds a `CreditReason` type and labels in `src/data/types.ts` (there is no top-level `src/types.ts`) and `src/data/mock.ts`, and shows those labels on `/withdraw` and `/history`. - **Reviewer fee escrowed until resolution.** New event `ReviewerFeeSettled(jobId, to, amount, paidToReviewer)`. The fee is no longer credited on `submitRecommendation`. It is paid to the reviewer on `executeRecommendation`, or when Kleros matches the recommendation. Otherwise it is refunded to the customer (`j.customer`, the Safe on build tasks). - **Ruling 0 (DECIDED 2026-11-10, verified at 1f2e460):** if the reviewer recommended 50%, they are paid (`rulingToPct(0) == 50` and the earned check is `builderPct == r.builderPct`). Otherwise the fee is refunded to the customer. This is no longer provisional. ABI unchanged. - **No silence payout on review jobs.** `reviewEndsAt` returns `uint256.max`; `releaseAfterReview` reverts `TooEarly`. After 2 reassignments and a missed deadline, `reviewLapsed(jobId)` is true (a view only). - **Lapsed review (DECIDED 2026-11-10):** the Safe has no duty to escalate. The builder or the customer may call `requestArbitration` at any time after delivery until execution; `reviewLapsed` is not required. Funds stay in escrow until someone files. - **ERC-20 Kleros prepay (DECIDED 2026-11-10):** the filer bears the prepay; a filing builder is not repaid by the Safe. The plan and sketch say this wherever they show who prepays. - **`OBJECTION_WINDOW()`** is a constant fixed at 5 days (DECIDED 2026-11-10), independent of the settable `settlementWindow`. `objectionEndsAt` uses it. - **BuilderBonus (PR #6 @c988b9c):** constructor is `(governance, tskr, market, allocationVault)`. `allocationVault()` replaces `funder()`. `PERIOD` follows the vault's monthly release. `ExcessReturned.to` is always the vault. New errors `BadAllocationVault` and `MissingReason` (exclusions require a reason URI). minBounty is a Safe setting, default 0; the Safe will set USDC `100e6` after deploy. - Other decided items (2026-11-10): reassignment cap of 2, conflict check on every Safe-funded job, RL2 reviewer onboarding, OFAC review-clock restart on ordinary jobs, a held party cannot raise Kleros. - **Still open / provisional:** bonus slot reuse and the 100% payout rule; the $50 minimum in ETH and TSKR. Deployment still needs the Arbitrum One Safe address. - Indexer needs (events, tables, queries; GraphQL enums use underscores) are listed in the plan for Infra Compute Ops. - `src/sketch/Cr2Sketch.tsx` at `/sketch/cr2` is a **SKETCH**. It uses hardcoded mock data, has disabled buttons, isn't linked in the nav, and changes no data source, contract or indexer code. It shows the reviewer list, the Safe assignment panel (fee escrowed until resolution; ruling 0 pays a 50% recommendation), the review panel with the 5-day `OBJECTION_WINDOW` countdown and "auto-release: never", a lapsed panel with no Safe duty and the ERC-20 prepay rule, the reviewer submit form, and a one-line BuilderBonus note. Local preview (not hosted): `/workspace/tw/previews/web-cr2-sketch.png`. - This PR only plans CR2 and ships the sketch and credit labels; it does not implement the review flow against contracts. `npm run build` passes (tsc + vite). Local previews (not hosted) are on the bot box: `/workspace/tw/previews/web-withdraw-tax-notice.png`, `web-history-tax-notice.png`, `web-cr2-sketch.png`.
- src/components/TaxNotice.tsx: adopted notice text (docs decisions/0005, Nov 7, 2026), shown on /withdraw and /history (connected and disconnected states)
- docs/cr2-independent-review-ui.md: CR2 plan (0007 "Open: build-task completion review"), wireframes, contract and indexer assumptions to confirm with Taskuler Contracts
- src/sketch/Cr2Sketch.tsx at /sketch/cr2: SKETCH, hardcoded mock data, not in nav, no contract or indexer calls
- Not deployed.
- docs/cr2-independent-review-ui.md: screens and flows mapped to ReviewerRegistry (ReviewerSet/ConflictSet/MinReviewerFeeSet, reviewerFee, canReview) and Market assignReviewer/reassignReviewer/submitRecommendation/executeRecommendation; answered vs open questions; indexer needs for Infra Compute Ops
- /sketch/cr2: reviewer list, Safe assign + fee quote, review deadline and objection countdowns, reassignment 0/2, no-show path, reviewer submit form (mock only, disabled)
- Outcome type gains reviewed (WorkHistory Outcome.Reviewed = 5); Work history shows "reviewed (independent review)"
- Fee %, review window, reassignment cap pending George. Not deployed.
- All earlier contract questions answered (execute emits JobResolved/Credited/WorkHistory; all money via claimable; fee carried on reassignment; reviewEndsAt/reviewDeadline formulas; dispute vs execute race; per-job reviewPeriod; assign only while Open)
- Reviewer fee DECIDED 5% / $50 min; PROVISIONAL defaults copied from PR #2 and #3 bodies
- BuilderBonus (PR #3) summary and UI plan (not built)
- ABIs not synced (stacked, unmerged); sync list noted
- Sketch: 50 USDC fee, race warning, hidden acceptDelivery/settlement note, reviewEndsAt no-show path. Not deployed.
Credited now has uint8 reason (new topic hash); label each credit on
/withdraw and /history. Reviewer fee stays escrowed until resolution
(ReviewerFeeSettled). Review jobs never auto-release (reviewEndsAt =
uint256.max, releaseAfterReview reverts TooEarly); a lapsed review
(2 reassignments + missed deadline) goes to Kleros. Objection window
is the OBJECTION_WINDOW constant (5 days). BuilderBonus constructor
takes allocationVault; PERIOD follows the vault; ExcessReturned goes
only there.

ABIs are not synced; they will come from out/ after the contracts
merge. forge build at 9b2c41d succeeded.
Ruling 0 now pays a reviewer who recommended 50% (DECIDED; verified in
PayoutLib at 1f2e460). A lapsed review has no Safe escalation duty;
the builder or customer may requestArbitration at any time after
delivery until execution, and reviewLapsed is not required. On ERC-20
jobs the filer bears the Kleros prepay. ABI unchanged.
george approved these changes 2026-11-11 03:38:21 +00:00
Taskuler-bot merged commit 688d2e3eaa into feat/phase1-scaffold 2026-11-11 03:40:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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/web!3
No description provided.