DocsSponsored TasksFor Sponsors
Everything an owner can do with a vault after setup. Your wallet signs every write command here and
Termix relays it and pays the gas (the fee on Tempo); set TERMIX_SELF_PAY_VAULT_GAS=1 to
send from your wallet and pay it yourself (ETH on Base, the TIP-20 fee token on Tempo). See
Setting up a vault.
The owner can do all of this in the web app too: open the vault athttps://termix.space/sponsored-tasks/<vaultId> and connect the owner wallet. The owner
controls there fund the vault, add, update or remove managers, withdraw available tokens and run
an emergency exit, each signed by the connected wallet. They are disabled for any other wallet.
The exit asks for an explicit confirmation that reserved and unclaimed rewards will be voided. See
Using the web app instead.
| Action | Contract function | Caller | Vault must be active | CLI |
|---|---|---|---|---|
| Fund | fund(amount) | Anyone | Yes | sponsored-task fund |
| Add, change or deactivate a manager | configureManager(manager, cap, active) | Owner | Yes | sponsored-task managers add / remove |
| Withdraw available tokens | withdrawAvailable(recipient, amount) | Owner | Yes | sponsored-task withdraw |
| Exit the vault | emergencyExitVault(recipient) | Owner | Yes | sponsored-task exit --yes |
| Reserve, release, install settlement | reserveTask, releaseTask, installSettlement | The hook (controller) only | Yes | none |
| Claim an entitlement | claim or claimTo | The worker, or a relayer with the worker's signature | Yes | sponsored-task claim |
| Claim the token fee | claimFee(allocationId, destination) | The snapshotted fee recipient | Yes | none |
termix sponsored-task fund --vault <vault address> --token <token> --chain-id <chain> --amount <base units>Funding is permissionless: any address can fund an active vault, not only the owner. The vault
accepts only exact transfers; a token that delivers less than amount reverts withTokenTransferAmountMismatch or TokenSenderAmountMismatch.
A manager account on a vault has four fields:
| Field | Meaning |
|---|---|
cap | Lifetime token allowance in base units. |
reserved | Tokens currently reserved for this manager's unsettled tasks. |
spent | Tokens distributed to winners of this manager's settled tasks. |
active | Whether the manager can reserve new tasks. |
The manager can reserve up to cap - reserved - spent more tokens. Released reservations come offreserved and free up capacity; distributed tokens stay in spent for good. To let a manager keep
going, raise the cap.
Add a manager, or change an existing manager's cap:
termix sponsored-task managers add --vault <vault address> --chain-id <chain> \
--manager <address> --cap <base units>The vault rejects a cap below the manager's current reserved + spent with InvalidManagerCap.
Deactivate a manager:
termix sponsored-task managers remove --vault <vault address> --chain-id <chain> --manager <address>remove reads the manager's current reserved + spent and sets the cap to exactly that withactive false. It does not reclaim tokens already reserved: the manager's open tasks still settle
or release normally. Running managers add again reactivates the manager.
List a vault's managers as Termix has indexed them:
termix sponsored-task managers list --vault-id <vaultId>Each entry has vaultId, managerAddress, spendCap, spent and active.
termix sponsored-task withdraw --vault <vault address> --chain-id <chain> --amount <base units> \
[--recipient <address>]The owner can withdraw up to the vault's available balance at any time, with no timelock. Tokens
reserved for live tasks and tokens owed to winners who have not claimed yet are not available.
Asking for more reverts with InsufficientAvailable. The recipient defaults to your own wallet.
termix sponsored-task exit --vault <vault address> --chain-id <chain> --yes [--recipient <address>]Exit is terminal and cannot be undone. In one transaction the vault:
After exit, every reservation, entitlement, claim signature and Merkle proof from the old epoch is
void. Workers who had earned but not claimed rewards receive nothing, and the rewards show asdefaulted on their tasks. Each task's USDC reward is not affected. An exited vault accepts no
funding, no new managers, no withdrawals and no claims, and a manager on it reads as inactive.
Without --yes the command stops with `This is irreversible. Re-run with --yes to confirm the
exit.` See Trust and safety for what this means for workers.
The vault uses two-step ownership: the current owner proposes a new owner, and the new owner must
accept. renounceOwnership always reverts with OwnershipRenunciationDisabled, because an
ownerless vault would have no one able to recover its tokens. The CLI has no ownership-transfer
command.