> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velumx.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Sponsorship models

# Sponsorship Models

VelumX supports two sponsorship policies. Choose based on your business model.

## DEVELOPER\_SPONSORS

The developer's relayer pays STX gas. Users pay nothing at all.

### How it works

1. Developer builds any Stacks contract call with `sponsored: true`
2. User signs the transaction (no STX needed)
3. `velumx.sponsor(signedTxHex)` — relayer co-signs and broadcasts
4. On-chain: the contract call executes, relayer pays STX gas

### No paymaster contract needed

The developer calls any protocol contract directly — Bitflow, ALEX, Velar, StackingDAO, custom contracts. VelumX doesn't need to know what contract is being called.

```typescript theme={null}
// Call any Stacks contract, gaslessly
const tx = await buildSponsoredContractCall({
  contractAddress: 'SPQC38PW542EQJ5M11CR25P7BS1CA6QT4TBXGB3M',
  contractName: 'stableswap-stx-ststx-v-1-2',
  functionName: 'swap-x-for-y',
  functionArgs: [...],
  publicKey: userPublicKey,
});
const { txid } = await velumx.sponsor(await wallet.sign(tx));
```

### Best for

* Zero-friction onboarding (day-0 users with empty wallets)
* Subsidized DeFi experiences
* Any protocol action — unlimited coverage

***

## USER\_PAYS

The user pays a SIP-010 token fee. The developer deploys a paymaster contract that atomically collects the fee and executes the action.

### How it works

1. Developer deploys their own paymaster contract (copy `velumx-defi-paymaster-v1` as template)
2. User signs a transaction calling the paymaster
3. `velumx.sponsor(signedTxHex)` — relayer co-signs and broadcasts
4. On-chain: paymaster collects fee → executes action (atomic rollback if action fails)

### Developer owns the paymaster

VelumX does not deploy a shared paymaster. Each developer deploys their own, customized for their protocol. This means:

* Full control over what actions are supported
* No dependency on VelumX contract upgrades
* Immutable once deployed — no admin key risk

```typescript theme={null}
// Call your own paymaster contract
const tx = await buildSponsoredContractCall({
  contractAddress: 'SP...my-paymaster',
  contractName: 'my-protocol-paymaster-v1',
  functionName: 'swap-with-fee',
  functionArgs: [
    /* swap params */,
    uintCV(BigInt(estimate.maxFee)),
    principalCV(estimate.relayerAddress),
    /* fee-token trait */,
  ],
  publicKey: userPublicKey,
});
const { txid } = await velumx.sponsor(await wallet.sign(tx), {
  feeToken: 'SP...aeusdc',
  feeAmount: estimate.maxFee,
});
```

### Best for

* Sustainable fee models where users pay in the token they hold
* Protocols where users already have stablecoins (aeUSDC, USDCx)
* Revenue generation — developer earns markup on every transaction

***

## Comparison

| Factor                    | DEVELOPER\_SPONSORS | USER\_PAYS                       |
| :------------------------ | :------------------ | :------------------------------- |
| User pays token fee       | ❌ No                | ✅ Yes                            |
| Paymaster contract needed | ❌ No                | ✅ Yes (developer deploys)        |
| Protocol coverage         | Unlimited           | Whatever your paymaster supports |
| Developer revenue         | ❌ None              | ✅ Fee markup                     |
| Integration complexity    | Low                 | Medium                           |
| Best for                  | Onboarding          | Sustainable DeFi                 |

***

## High-Impact Use Cases

| Vertical                | Recommended Policy  | Notes                         |
| :---------------------- | :------------------ | :---------------------------- |
| **New user onboarding** | DEVELOPER\_SPONSORS | User has no tokens yet        |
| **Stablecoin swaps**    | USER\_PAYS          | User pays fee in aeUSDC       |
| **sBTC bridge**         | USER\_PAYS          | User pays fee in sBTC         |
| **NFT minting**         | DEVELOPER\_SPONSORS | Subsidize the mint experience |
| **Governance voting**   | DEVELOPER\_SPONSORS | Remove all friction           |
| **DeFi protocol**       | USER\_PAYS          | Sustainable, user-funded gas  |
