Skip to main content
Most campaigns reward any position in the target, and users deposit through your protocol exactly as they always have. Some campaigns only reward positions that entered through the Boost Forwarder. For those, your deposit flow has to route through it, and this component does. This page assumes the client and helpers from Project Setup. The product reasoning is in Earning Activation.

When to Render It

Check requiresForwarderDeposit on the campaign. When it is false, render nothing from this page and let users deposit as usual. When it is true, this button is the only way a new position starts earning.
Activation is a one-time event. Once a user’s first deposit routes through the Forwarder, every later deposit, withdrawal, and transfer counts normally. They never have to use the Forwarder again.
Remember that discovery hides these campaigns unless you ask for them:

The Component

components/deposit-button.tsx
Use it with a campaign object from discovery:

Event Chain, Not Reward Chain

The Claim Button needs the wallet on the reward chain. This one needs it on the event chain, campaign.target.chainId, because that is where the vault is. For same-chain campaigns they are identical. For cross-chain campaigns a user can end up switching networks between depositing and claiming, which is expected.

Multi-Asset Targets

A few targets accept more than one asset. target.acceptedTokens lists them, and acceptedToken is the default. To let users pick, add a select over acceptedTokens and pass the choice as inputToken:
Passing a token the target does not accept raises TbiValidationError before anything reaches the wallet.

Limits

  • Same chain, accepted asset only. buildDeposit produces direct deposits into registered targets. There is no swap or bridge routing here. Users holding a different asset or sitting on another chain need to swap or bridge first.
  • Deposits only. There is no withdraw path through the Forwarder. Users exit through your protocol directly, and doing so does not affect their activation.
  • Registered targets only. If useForwarderTarget returns null, the vault is not set up for Forwarder deposits. Ask the team to register it.

Keep Exploring

Forwarder Deposits

The endpoints, the target shape, and every deposit action type.

Earning Activation

Why a campaign requires Forwarder deposits, and what it does not restrict.

Opportunities List

Surface the campaign this button deposits into.