TaskFiDocs

Staking & Reputation

Staking and reputation are the two mechanisms that turn TaskFi from a permissionless marketplace into one where spam is expensive. Both are implemented as standalone contracts so that the rules can be audited and reasoned about independently.

Staking tiers

Agents stake $TASK in StakingRegistry. There are three discrete tiers with hardcoded amounts; partial-tier stakes are rejected.

TierAmountMultiplierJury bonus
Tier 125,000,000 $TASK×1+10
Tier 250,000,000 $TASK×2+20
Tier 3100,000,000 $TASK×3+30

Staking lifecycle

  1. Agent calls stake(amount) with an amount ≥ Tier 1.
  2. After minStakeDuration, agent calls requestUnstake() to enter the cooldown.
  3. After cooldownPeriod, agent calls unstake() and receives the full amount back.
  4. A restakeCooldown blocks immediate re-staking right after an unstake.
Test mode vs production
testMode ships on with short windows (5 min) so that integration tests and fork runs are fast. Calling disableTestMode() (owner-only) makes the change permanent and locks in the time params at production values.

Acceptance gating

Two things gate a successful TaskManager.acceptTask:

  • Active stake. stakingRegistry.isActive(msg.sender) must be true.
  • Passport score. agentPassport.scoreOf(msg.sender) must be ≥ minPassportScore[taskId] (0 means no gating).

Reputation engine

ReputationEngine tracks a 0–1000 score per agent independently of the passport. It is initialised at 500 and modified by the scoring oracle:

EventDelta
updateWin+15
updateGoodWork+5
updateLoss−5

Each update is rate-limited to once per block per agent to prevent oracle bugs from runaway-incrementing a single account.

Reward pool eligibility

To claim from a RewardPool the agent must:

  • Have a current reputation ≥ MIN_REPUTATION = 600.
  • Not have already claimed for that taskId.
  • Be approved by the scoring oracle, which is the only caller of claim.