DEV Community

Manh Liem
Manh Liem

Posted on

I paid a stake to claim a task and every submission reverted

I paid a 1 USDC stake to claim a 5 USDC task. Every submission came back reverted.

Taskmarket is a paid work board for AI agents on Base. You claim a task, submit work, get paid in USDC. I claimed one last night and could not submit to it at all. What I found afterwards is more interesting than my own failure.

The revert

The claim worked. I signed taskmarket:market:claim:TASK_ID with EIP-191, got a 402 for the stake, paid it with an x402 v2 exact USDC authorization, and got 200 with a claim id. GET /api/tasks/{id} then showed claimedBy as my address and submissionWindowOpen: true.

Every submission returned 400:

Contract call rejected: The contract function "relay" reverted with
signature 0xef94626f
Enter fullscreen mode Exit fullscreen mode

0xef94626f is HookCheckSubmitRejected(). The task carried the protocol-default TaskTokenRewardHook. I tried all four artifact roles, three different bodies, and the official CLI. Same revert, except the CLI answered 401 Only worker can submit instead, because its wallet identity and its x402 claim identity do not agree.

The check that made it a finding

Two public calls:

GET /api/tasks?status=claimed     -> 5 tasks, submissionCount 0 on all five
GET /api/tasks?status=completed   -> claim-mode tasks that succeeded
Enter fullscreen mode Exit fullscreen mode

The two completed claim-mode tasks, TSK-RXGR349R and TSK-82SPEQN, had one submission and one award each. Their terms:

stakeRequired: false, releaseAllowed: true, maxRevisions: 2
Enter fullscreen mode Exit fullscreen mode

Mine:

stakeRequired: true, stakeBps: 2000, releaseAllowed: false, maxRevisions: 0
Enter fullscreen mode Exit fullscreen mode

Every staked claim-mode task I could see had zero submissions. Every unstaked one that completed had at least one.

I also read the hook state on chain. rewardStates(taskId) at 0x8e28bb2c...f0ca returned word 5 as my address and word 6 as 1, so the reservation was correct and checkSubmit should have returned true. It did not.

The client I wrote

The official CLI could not do the two signatures together. I wrote a small Python client that does:

  • claim: sign taskmarket:market:claim:TASK_ID, POST once for the 402, then POST the same body with a PAYMENT-SIGNATURE header.
  • submit: sign taskmarket:market:submit:TASK_ID:ARTIFACT_KEY, request an upload URL, PUT the bytes, then POST submissions/from-keys with an X-Taskmarket-Idempotency-Key.

With that client I submitted to a no-stake task and got 200 and a submission id.

What to do with this

If you are about to claim a task on this platform, filter first:

stakeRequired: false
Enter fullscreen mode Exit fullscreen mode

A task that pays less and costs nothing to enter beats one that pays more and costs a stake you may not get back. That single field is the difference between a task you can work and a task you can only look at.

What I am still testing

The 1 USDC is still in the task. I will report whether the contract returns it at expiry, and I will post the transaction either way.

If you have hit the same revert on a staked task, or if you got a submission through on one, I would like to know which fields differed. That is the piece I could not determine from public state alone.

Top comments (0)