What would you like?
Goal: keep a paymaster's SOL runway stable without manual intervention.
A Kora node earns SPL tokens (payments) and spends SOL (transaction fees). Nothing converts them back today, so the operator's ability to keep paying fees drifts with the token price, and topping up SOL is a manual chore. The node should do this itself.
Shape we have in mind: a job that runs every X interval, checks the operator's token balances against configured criteria, and swaps back to SOL (Jupiter being the obvious route) when they're met.
Not already covered by what's in the repo:
crates/lib/src/oracle/jupiter.rs uses Jupiter for price quotes during fee estimation only, never swap execution.
crates/lib/src/plugin/plugin_gas_swap.rs is the inverse, user-driven flow: it validates a user's two-instruction "SPL in, SOL out" request. It never touches the operator's own balances.
Open questions
Proposals welcome on any of these:
- Where the job lives. Inside the node process, or a separate binary/container an operator schedules? What happens on restart, and how are overlapping runs prevented?
- Criteria. What should trigger a swap: absolute token balance, token value in SOL, SOL balance falling below a floor, or a target ratio? What cooldown between swaps?
- Which balances. Fee payer ATAs, the configured
payment_address ATAs, or both? With a signer pool, per-signer or aggregate?
- Safety limits. A paymaster swapping its own funds on a schedule needs hard bounds: max slippage, max notional per run, route/program allowlist, and a dry-run mode. What belongs in v1?
- Signing and observability. Which signer signs the swap, and how do these swaps surface in logs, metrics, and usage accounting so an operator can tell a rebalance from user traffic?
Worth flagging for whoever picks this up: this would be the first feature where Kora originates and sends its own transaction rather than co-signing a user's. The fee-payer policy and Lighthouse protections are built around the co-signing model and won't cover it, so the guardrails in question 4 aren't optional extras.
Proposed by @amilz.
Area
Other
What would you like?
Goal: keep a paymaster's SOL runway stable without manual intervention.
A Kora node earns SPL tokens (payments) and spends SOL (transaction fees). Nothing converts them back today, so the operator's ability to keep paying fees drifts with the token price, and topping up SOL is a manual chore. The node should do this itself.
Shape we have in mind: a job that runs every X interval, checks the operator's token balances against configured criteria, and swaps back to SOL (Jupiter being the obvious route) when they're met.
Not already covered by what's in the repo:
crates/lib/src/oracle/jupiter.rsuses Jupiter for price quotes during fee estimation only, never swap execution.crates/lib/src/plugin/plugin_gas_swap.rsis the inverse, user-driven flow: it validates a user's two-instruction "SPL in, SOL out" request. It never touches the operator's own balances.Open questions
Proposals welcome on any of these:
payment_addressATAs, or both? With a signer pool, per-signer or aggregate?Worth flagging for whoever picks this up: this would be the first feature where Kora originates and sends its own transaction rather than co-signing a user's. The fee-payer policy and Lighthouse protections are built around the co-signing model and won't cover it, so the guardrails in question 4 aren't optional extras.
Proposed by @amilz.
Area
Other