Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Sponsored Tasks: Fees and the Fee Bank

A sponsored task carries two separate charges: a flat creation fee in USDC when the task is created, and a token fee taken from the project-token reward when it settles. Neither touches the task's ordinary USDC reward.

Contents

The two fees at a glance

Creation feeToken fee
Paid inUSDCThe vault's project token
Paid byThe manager, from fee bank creditDeducted from each winner's gross share
WhenInside the task-creation transactionAt settlement
Amount on Base MainnetUS$1 per task750 bps (7.5%) of each winner's gross share
Set byThe fee bank, through its guardThe fee policy contract
Upper boundFixed ceiling in the guard: US$100 on Base Mainnet, US$10 on Base SepoliaMAX_BPS of 10000 in the fee policy

To read the live values on any chain, call feeAmount() on the fee bank and feeTerms() on the fee policy.

The creation fee

The Sponsored Task hook calls the fee bank's charge(manager, key) while the task is being created. The charge:

  • Debits the fee bank's current feeAmount from the manager's credit and transfers it to the current fee recipient.
  • Reverts with InsufficientCredit if the manager's credit is below the fee, which blocks the task creation. taskmarket task create checks this first and reports INSUFFICIENT_FEE_CREDIT.
  • Is rolled back if anything later in the task-creation transaction reverts.
  • Is charged once per task. A retry with the same key returns the original receipt instead of charging again.

The creation fee is not refunded when a task is cancelled, expires or is rejected; only the reserved project tokens return to the vault.

The fee bank

The fee bank holds USDC credit per manager address. Credit is plain prepaid balance:

FunctionWhoEffect
deposit(amount)AnyoneAdds credit for the caller. The bank requires the exact amount to arrive.
depositFor(manager, amount)AnyoneAdds credit for manager, paid by the caller. The CLI does not expose this.
withdrawCredit(amount, recipient)The credit holderWithdraws uncharged credit. Reverts with InsufficientCredit if the amount exceeds it.
creditOf(manager)ViewCurrent credit in USDC base units.
feeAmount(), feeRecipient()ViewCurrent creation fee and where it goes.
authorizedChargers(address)ViewWhether an address may charge credit. The hook must be authorized, or task create reports HOOK_NOT_AUTHORIZED_CHARGER.

Credit belongs to the manager's address, not to a vault. One manager's credit covers sponsored tasks from every vault on that chain.

Fee bank commands

All three need TASKMARKET_RPC_URL for the fee bank's chain. deposit and withdraw send transactions and need gas; balance is a read.

taskmarket sponsored-task fee-bank deposit --fee-bank <address> --usdc <address> --chain-id <id> --amount <base units>
taskmarket sponsored-task fee-bank balance --fee-bank <address> --chain-id <id>
taskmarket sponsored-task fee-bank withdraw --fee-bank <address> --chain-id <id> --amount <base units> [--recipient <address>]

deposit approves the fee bank for --amount and waits until the RPC endpoint reports the allowance before depositing. balance returns feeBank, manager (your address) and creditBaseUnits. withdraw sends to your own wallet unless --recipient is given.

The token fee

When a vault reserves a task, it reads the fee policy's current feeTerms() (a rate in basis points and a recipient) and snapshots both onto the reservation. A later change to the fee policy affects only future reservations. The funding request built at task creation carries the rate and recipient it expects; if the policy changed in between, the reservation reverts with FeeTermsMismatch, and recreating the task picks up the new terms.

At settlement each winner's fee is winnerGross * feeBps / 10000 and the winner receives the rest. A task's sponsoredTaskRewards entry shows the snapshotted feeBps with feeAmount and netAmount.

Who receives the fees

  • The creation fee goes straight from the fee bank to the fee bank's feeRecipient at charge time.
  • The token fee stays in the vault as claimable until the reservation's snapshotted fee recipient pulls it with the vault's claimFee(allocationId, destination). Only that recipient can call it, and only while the vault is active. If the owner exits first, the unclaimed token fee is swept to the owner with everything else.

The fee policy's NatSpec describes its terms as Daydreams-controlled.

Who can change the fees

FeeChanged throughLimits
Creation fee amount and recipientSponsoredTaskFeeBankGuard.setFutureFeeConfig, callable only by the guard's adminNever above the guard's immutable feeCeiling. Affects future charges only.
Token fee rate and recipientSponsoredTaskFeePolicy.setFeeTerms, callable only by the fee policy ownerAt most 10000 bps. A non-zero rate needs a recipient. Affects future reservations only.

The guard owns the fee bank. It has no path to authorize a new charger, only revokeCharger, and its admin must be a contract such as a Safe or timelock. On Base Mainnet the guard admin is a Safe. See Contracts and deployments.