Skip to content
Socket

Catalog / module / Socket plug-ins

Swap quests

v1

Trade volume in your socket pool unlocks task-weight tasks, so trading raises your holders' NFT multipliers.

Runs on every swapWatches trades
  • Watches trades: Is told about each trade after it settles. It cannot change or block it.

What it does

Swap quests (swap-quests v1)

A socket hooklet that turns trading into progress for your NFT holders. It counts each trader's ETH volume in your socket pool per period. When a wallet's volume this period reaches a quest's threshold, the wallet can complete that quest's task-weight task for an NFT it controls, which raises that NFT's reward multiplier in your staking vault.

Setup

1. Deploy it pointing at your task-weight instance, with a period length (for example 7 days). 2. On task-weight, the owner creates the tasks (`setTask`) and makes this hooklet a curator (`setCurator(hooklet, true)`). 3. Here, the owner lists which tasks are swap quests and the volume each needs (`setQuest(taskId, minVolume, active)`). 4. Add the hooklet to your socket pool as an observer.

How it works

- Only trades through a Socket-trusted router count, because only those tell the socket who the trader is. - A trade's counted size is its ETH notional minus everything the pool's fee hooklets took on it. Trades smaller than `minSwapEth` (after fees) are ignored. With `buysOnly`, sells are ignored too. - Volume and claims reset at the start of each period. - `claimQuest(tokenId, taskId)`: you must control the NFT (its owner, or its staker while it sits in the vault), have enough volume this period, and have a claim left this period (`maxClaimsPerEpoch`, counted across all your NFTs). The hooklet then completes the task on task-weight. - Task-weight still applies its own rules: each NFT completes each task once, within the task's window and under its completion cap.

Roles

- **Owner:** lists and changes quests, pauses and resumes. Cannot complete tasks by hand and cannot touch funds (there are none). - **Anyone:** claims quests for NFTs they control. - **The socket:** the only address that can report trades. - **Task-weight owner:** decides whether this hooklet is a curator at all, and can revoke it at any time.

Risks in plain English

- **Wash trading.** A trader can buy and sell back to build volume. Every counted trade still pays the pons fee and your pool's fees, so the cost of washing to a threshold is roughly `threshold x (pons fee + your fees)`. Set thresholds so that costs more than the multiplier is worth, use a minimum trade size, and consider counting buys only. - **Many NFTs, one wallet.** A wallet with volume can complete the quest for several NFTs it controls, up to its claims per period. - As a curator, this hooklet could complete any task on that task-weight instance. It only ever completes the tasks listed as quests here. - It never takes, holds or moves funds.

Fee lanes

None. It has no income.

Gas

Recording a trade costs about 48k gas in the worst case (a wallet's first counted trade, cold), under the socket's 100k observer cap with more than a 10% margin.

What if

- **The period ends before I claim?** Your volume resets. Claim within the period. - **My NFT is staked?** You can still claim: the staker controls it for quests, and the vault adopts the new multiplier at once. - **I sell my NFT?** Completed tasks stay with the NFT. - **It breaks?** The socket skips it after three failures in an hour. Trading is never affected.

Risks in plain English

  • Volume can be washed by trading back and forth. Every counted trade still pays the pons fee and your pool's fees, so set thresholds where washing costs more than the multiplier is worth.
  • Only trades through a Socket-trusted router count, never trades made on pons directly.
  • As a task-weight curator this hooklet could complete any task there; it only completes the tasks listed as quests here, and task-weight still applies its own once-per-NFT rule, window and cap.

What if…

What if the period ends before I claim?
Volume resets with each period. Claim before it ends; the swap page shows when that is.
What if my NFT is staked?
You can still claim: the staker controls the NFT for quests. The vault picks up the new multiplier at once.
What if I sell my NFT?
Completed tasks belong to the NFT, so the new owner keeps the multiplier.
What if it breaks?
The socket skips it after three failures in an hour. Trading is never affected.

Fees

No protocol fee on this module.

Evidence

Form check
Built from the source files
Implementation
—
Code hash
—

Settings you choose at deploy

  • Task-weight instanceThe Socket task-weight plugin whose tasks the quests complete. Its owner must make this hooklet a curator.Locked forever
  • Volume resets everyQuests need this much volume within one period.Locked forever
  • Smallest trade that countsETH size after the pool's fees. Makes dust trades useless for quests.Locked forever
  • Quests a wallet can complete per periodAcross all its NFTs.Locked forever
  • Count buys onlySells do not count. Makes buy-and-sell-back washing half as effective.Locked forever