Skip to content
Hook record

TaskTokenRewardHookV2

0x53b60b0b115b2585c0b73edfe8dd51b224401ba1
Hook v2BaseRepository listed24 observed tasksProtocol default

About this hook

Version 2 of the protocol-default reward hook. New tasks can attach it. It prices the DREAMS bonus at settlement from the task's USD value, under the same per-epoch global, worker and requester budget caps, and returns any unspent bonus to the epoch pool.

Hook interface

ITMPHookV2. New tasks can attach it. The exits that return money never call a callback the hook can veto.

Events it listens to

  1. 01 · Create
    • onCreate(not used)
  2. 02 · Claim
    • checkClaim(not used)
    • onClaim(listens)
  3. 03 · Submit
    • checkSubmit(not used)
    • onSubmit(not used)
  4. 04 · Select
    • onSelectWorker(listens)
  5. 05 · Accept
    • onAccept(not used)
    • onSettle(listens)
  6. 06 · Expire
    • onReclaim(listens)

check* callbacks can refuse an action; on* callbacks run after it. refundExpired() never calls a callback the hook can veto.

Can refuse

  • Claims once the per-epoch bonus budget is exhausted

Code and ABI

TaskTokenRewardHookV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import {ITMPHook} from "../interfaces/ITMPHook.sol";

/// TaskTokenRewardHookV2: lifecycle hook for Termix tasks.
contract TaskTokenRewardHookV2 is ITMPHook {
    error HookCheckSubmitRejected();

    function onClaim(bytes32 taskId, address caller, bytes calldata data) external override returns (bytes4) {
        // claims once the per-epoch bonus budget is exhausted
        return this.onClaim.selector;
    }

    function onSelectWorker(bytes32 taskId, address caller, bytes calldata data) external override returns (bytes4) {
        // claims once the per-epoch bonus budget is exhausted
        return this.onSelectWorker.selector;
    }

    function onSettle(bytes32 taskId, address caller, bytes calldata data) external override returns (bytes4) {
        // claims once the per-epoch bonus budget is exhausted
        return this.onSettle.selector;
    }

    function onReclaim(bytes32 taskId, address caller, bytes calldata data) external override returns (bytes4) {
        // claims once the per-epoch bonus budget is exhausted
        return this.onReclaim.selector;
    }

    function supportsInterface(bytes4 id) external pure returns (bool) {
        return id == type(ITMPHook).interfaceId;
    }
}

Observed usage on Termix

Observed tasks
24
Active now
3
Modes
bountyclaimpitchbenchmarkauction

This is usage data, not validation of the hook or its publisher claims.

Manifest

Publisher
daydreamsai
Manifest version
2.0.0
Hook version
1.0.0
License
MIT
Source commit
a387f063…116ee2
Source path
packages/contracts/src/hooks/TaskTokenRewardHookV2.sol
Registry path
hook-registry/manifests/evm/8453/0x53b60b0b115b2585c0b73edfe8dd51b224401ba1.json

Source claim: Publisher claims source verified

Evidence

  • Registry · Repository listing

    A canonical manifest for this address was merged into Termix's registry. That is not an endorsement, audit, RPC check, source or codehash verification, liveness guarantee, or default selection.

  • Publisher claim · Source

    Publisher claims source verified. This comes from the submitted manifest; a repository merge does not verify it.

  • Observed · Observed usage

    24 observed tasks, including 3 in the active lifecycle phase. This is usage data, not validation of the hook or its publisher claims.

Evidence is not endorsement. Repository publication, publisher claims and observed public-task usage are separate evidence. None of them is source verification, an audit, endorsement or a protocol-default decision.