Fee sinks
Inspect the rotating fee-receiver pool and trigger sweeps, rotations and drains.
Fee sinks are rotating addresses that receive Proxima's fees on each chain before they are drained to the treasury. A sink moves from funding to active, then draining and retired.
These endpoints serve the admin Sinks page. Sweeps and rotations normally run on a schedule; the trigger endpoints start a run now.
The Sink object
A fee-receiver address with its live balances. No secrets are returned.
Attributes
-
idintegerSink id. -
chain_idstringChain id. -
assetenumAsset the sink collects.Possible valuesnativeusdcusd1 -
addressstringSink address. -
statusenumLifecycle status.Possible valuesfundingactivedrainingretired -
total_received_usdintegerTotal received, in micro-USD. -
husher_order_idstring | nullId of the drain order. -
drain_tokenstring | nullToken the drain delivers. -
drain_networkstring | nullNetwork the drain delivers on. -
opened_atinteger | nullCreation time, Unix seconds. -
activated_atinteger | nullActivation time, Unix seconds. -
retired_atinteger | nullRetirement time, Unix seconds. -
native_balancestringLive native balance, in lamports or wei, as an integer string. -
token_balancestringLive asset balance in base units, as an integer string.
List sinks
/admin/sinks Returns one chain's sinks with live on-chain balances, newest first.
- Token
- Upgraded session token of an account with admin rights.
- Read-only tokens
- Allowed.
- Retry
- Safe to retry
Query parameters
-
chainenum OptionalChain.Possible valuessolbscethbaserobinhood -
statusenum OptionalFilters on status. Useretiredto see closed sinks.Possible valuesfundingactivedrainingretired -
assetenum OptionalFilters on asset.Possible valuesnativeusdcusd1
Returns 200 OK · application/json
-
sinksarray<object>Sinks. See Sink.
Errors
Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role and 429 when rate limited.
Web client proxima.adminSinks.listSinks(query) src/lib/proxima/endpoints/adminSinks.ts
Run a fee sweep
/admin/sinks/run-sweep Starts a fee sweep on a chain now.
- Token
- Upgraded session token of an account with admin rights.
- Read-only tokens
- Refused with
403 read_only_token. - Retry
- Safe to retry A sweep already running makes the new one skip, and a later run only collects what is still pending.
A sweep collects fees into the sinks and pays referrers. It runs in the background: the response only confirms it started, and failures are not reported back.
Query parameters
-
chainenum OptionalChain.Possible valuessolbscethbaserobinhood
Returns 200 OK · application/json
-
okbooleantruewhen accepted. -
triggeredstringJob started:fee_sweeporsink_rotation. -
chainstringThechainquery value,solwhen omitted.
Errors
Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.
Web client proxima.adminSinks.runSweep(chain) src/lib/proxima/endpoints/adminSinks.ts
Run a sink rotation
/admin/sinks/run-rotation Starts a sink rotation on a chain now.
- Token
- Upgraded session token of an account with admin rights.
- Read-only tokens
- Refused with
403 read_only_token. - Retry
- Safe to retry A rotation already running makes the new one skip, and a later run only acts on sinks that still need it.
A rotation maintains the sink pool and drains sinks. It runs in the background: the response only confirms it started.
Query parameters
-
chainenum OptionalChain.Possible valuessolbscethbaserobinhood
Returns 200 OK · application/json
-
okbooleantruewhen accepted. -
triggeredstringJob started:fee_sweeporsink_rotation. -
chainstringThechainquery value,solwhen omitted.
Errors
Only the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.
Web client proxima.adminSinks.runRotation(chain) src/lib/proxima/endpoints/adminSinks.ts
Close a sink
/admin/sinks/{sink_id}/close Drains an active sink to the treasury and retires it.
- Token
- Upgraded session token of an account with admin rights.
- Read-only tokens
- Refused with
403 read_only_token. - Retry
- Check before retrying A lost call may have started the drain. Read the sink with List sinks:
drainingorretiredmeans it did.
The sink moves to draining at once and to retired once the drain settles. The sink's own chain is used.
Path parameters
-
sink_idinteger RequiredSink id.
Returns 200 OK · application/json
-
okbooleantruewhen accepted. -
messagestringOutcome, such asdrain initiated for usdc sink 42.
Errors
| Status | Code | When and what to do |
|---|---|---|
| 422 | unprocessable | No sink has this id. Use a sink id returned by List sinks. |
| 422 | unprocessable | A sink rotation is running and holds the sinks. Retry in a few seconds. |
| 422 | unprocessable | The sink is not active: it is still funding, already draining, or retired. Check the sink's status with List sinks; only an active sink can be closed. |
| 422 | unprocessable | The drain could not start, for example husher not configured. The message is the reason, and the sink stays active. Fix the cause in the message, then retry. |
Also the common errors: 401 for a missing or expired session, 403 forbidden without the admin role, 403 read_only_token and 429 when rate limited.
Web client proxima.adminSinks.closeSink(id) src/lib/proxima/endpoints/adminSinks.ts