Skip to main content
The Rewards API lets your app display USDB balances, reward estimates, payout history, and Flashpoints. It also supports signed endorsements that direct a share of a holder’s future rewards to other pubkeys.

Base URL

All endpoints use the /v1 prefix. Swagger documentation is available at /docs.

Rewards

Get Rewards Leaderboard

Returns users sorted by USDB balance, with each user’s reward tier and estimated payout.
Parameters:
  • limit - Maximum results (default 100, maximum 500)
  • offset - Pagination offset
Response:

Get User Summary

Returns a user’s current USDB balance, today’s volume, reward bracket, and estimated rewards for the day.
Response:
Excluded addresses (LP pools, burn addresses) return a 400 status with { "reason": "This address is excluded and does not earn rewards" }. Rewards Brackets:

Get Payout History

Returns a user’s payout history, including their own rewards and any delegated rewards received. Use limit and offset to page through the results.
Parameters:
  • limit - Maximum results (default 30)
  • offset - Pagination offset
Response:
payoutSats is the sum of rewardsPayoutSats and endorsementsPayoutSats.

Endorsements

An endorsement assigns part of a holder’s future daily reward payout to a recipient pubkey. The holder signs each change. See Rewards Delegation for an example of how payouts are split.

Canonical YAML Templates (for Signing)

Create and update both use action: upsert. The API creates a new record or updates the existing (endorser, to) pair. Create endorsement template:
Update endorsement template:
Delete endorsement template:
Sign the SHA-256 hash of the canonical YAML payload with the endorser’s private key, then send the signature as a hex string.

Get Endorsements

Response:

Create or Update Endorsement

Creates an endorsement for the to pubkey or updates its existing allocation.
Request body:
Signing payload (canonical YAML):
The API verifies the signature against the endorser pubkey using secp256k1 over the SHA-256 hash of this YAML payload. Response:

Delete Endorsement

Removes the endorsement for :toPubkey from the endorser’s future payouts.
Request body:
Signing payload (canonical YAML):
Response:

Endorsement Rules and Validation

  • pubkey, endorser, and to must be 66-character compressed pubkey hex strings.
  • The body endorser must match :pubkey in the route.
  • ratioBps must be between 1 and 10000.
  • The sum of an endorser’s active endorsement ratios cannot exceed 10000.
  • The endorser cannot endorse their own pubkey.
  • timestampNonce must be UUIDv7 and within a 5-minute window.
  • Each nonce can be used only once, preventing request replay.
Common 400 errors:
  • { "error": "Body endorser must match route pubkey" }
  • { "error": "Cannot endorse to the same pubkey. Use rewards payee reassignment instead." }
  • { "error": "Total endorsement ratio cannot exceed 10000 bps" }
  • { "error": "Nonce has already been used" }
  • { "error": "Signature verification failed" }

Flashpoints

Get Points Leaderboard

Returns users sorted by current Flashpoints, with their point balances and volume.
Parameters:
  • limit - Maximum results (default 100, maximum 500)
  • offset - Pagination offset
Response:

Get User Points

Returns a user’s current and lifetime Flashpoints, rank, and projected points for the day.
Response:

Get Points History

Returns a user’s point-earning events. Use limit and offset to page through the history.
Parameters:
  • limit - Maximum results (default 30)
  • offset - Pagination offset
Response:

Stats

Get Global Stats

Returns USDB holder totals, trading activity, payout totals, and the last days processed for rewards and points.
Response:

Health Check

Response:
The status is "degraded" if either payout or points processing is behind.

Error Handling

Validation errors usually include an error field:
For excluded pubkeys, GET /v1/rewards/:pubkey returns a reason field:
Server errors may include an error code and message:
Common status codes:
  • 400 - Bad request (validation errors, excluded addresses)
  • 404 - Not found
  • 500 - Internal server error