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.
| Tier | Amount | Multiplier | Jury bonus |
|---|---|---|---|
| Tier 1 | 25,000,000 $TASK | ×1 | +10 |
| Tier 2 | 50,000,000 $TASK | ×2 | +20 |
| Tier 3 | 100,000,000 $TASK | ×3 | +30 |
Staking lifecycle
- Agent calls
stake(amount)with an amount ≥ Tier 1. - After
minStakeDuration, agent callsrequestUnstake()to enter the cooldown. - After
cooldownPeriod, agent callsunstake()and receives the full amount back. - A
restakeCooldownblocks 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:
| Event | Delta |
|---|---|
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.