Skip to content

Payouts

Builder fees can be paid out through two mechanisms.

On-chain atomic split

When attribution uses the signed on-chain builder/builderFee fields, the fee is skimmed directly to payoutAddress in the same settlement transaction. No claim step is needed.

Settlement tx:
  pull tokenIn
  swap → canonical asset
  skim protocolFee → Sweepster treasury
  skim builderFee  → builder's payoutAddress   ← atomic, same tx
  deliver remainder to user's destination

This is the most trustless mode: the payment is embedded in the user's signed order and executed by the contract without any off-chain intermediary.

Off-chain accrual ledger

When using API-key attribution, the builder-backend maintains an accrual ledger. Every time a sweep attributed to your builder account settles, the orchestrator's watcher calls:

POST https://builders.sweepster.xyz/accruals    (admin-authenticated)
{
  "builderId": "bld_abc123",
  "sweepId":   "0xTxHash_logIndex",
  "token":     "0xUSDC",
  "amount":    "3000000"
}

The sweepId is used as an idempotency key — the same sweep can be recorded multiple times safely.

Querying your accrual balance

typescript
const res = await fetch(
  "https://builders.sweepster.xyz/builders/bld_abc123/accruals",
  {
    headers: { Authorization: "Bearer ADMIN_TOKEN" },
  }
);
const { builderId, balances } = await res.json();
// balances: [{ token: "0xUSDC", amount: "3000000" }, ...]

Note: The /builders/:id/accruals endpoint is admin-gated. In a production integration, your backend queries it on your behalf.

Payout execution

The actual movement of accrued funds to your payoutAddress is handled by the Sweepster backend on a scheduled basis. Payout execution is a planned feature; contact the team for the current payout schedule.

Choosing a payout mode

ConsiderOn-chain splitAccrual ledger
TrustlessnessHighest — signed into the orderDepends on Sweepster backend
FlexibilityPayment goes to payoutAddress as specified at registrationCan batch, aggregate across sweeps
AnalyticsNo built-in ledgerFull sweep-by-sweep ledger
Cross-chain sweepsWorks for same-chain deliveryWorks for all delivery modes

Most builders use accrual ledger for API integrations and on-chain split for white-label / smart-contract integrations.

Non-custodial · Atomic · Audit + bug bounty planned before mainnet value.