P2C Subscription CLI (rakurai-p2c)
The P2C Subscription CLI (rakurai-p2c) is used to manage P2C Subscription Accounts (PSAs) for services that consume and resell Rakurai post-pack confirmations.
Each PSA is associated with a service name and validator vote account. The account must maintain sufficient SOL to cover epoch-based subscription fees, which are calculated according to the number of transaction updates delivered.
Use this CLI to:
- Inspect PSA balance, outstanding fees, status, and deficit.
- Fund PSAs to cover accumulated or upcoming subscription fees.
- Monitor account status and prevent P2C delivery from being suspended.
The subscription fee is $50 per 1 million transaction updates (dollar equivalent amount in SOL).
This CLI manages PSA accounts only. Backrun-only partners using an MCA receive P2C access as part of the MEV revenue-sharing arrangement and do not need this CLI. Tips and MCA settlement are handled through rakurai-revshare.
Audience: Searchers, traders, and services that sell or resell Rakurai post-pack confirmations.
Program: Reward Distribution PSA (P2CSubscriptionAccount).
1. What This CLI Manages
Each service name and validator vote account has one PSA. The PSA must remain funded to cover the subscription fee for each epoch.
At the end of each epoch, the fee is calculated based on transaction-update volume at $50 per 1 million transaction updates (dollar equivalent amount in SOL). If the account does not have sufficient funds, it enters a grace period and may eventually become Suspended, at which point P2C delivery stops.
| Action | Commands |
|---|---|
| Read balance, owed amount, status, and deficit | get-account, get-all-accounts |
| Fund the PSA for subscription fees | fund, fund-all, or solana transfer to the PDA |
PSA accounts are created by Rakurai / ops before they are funded. This is not an MEV share account; backrun profit is settled through an MCA using rakurai-revshare.
2. What You Do Each Epoch
Keep the PSA funded before the epoch ends using
fund,fund-all, or a directsolana transferto the PDA.After the epoch, run
get-accountand check:- Balance after rent exemption
- Total owed for completed epochs
- Status (
Active/InGrace/Suspended) - Deficit, if any
- Underfunded alert when the balance is below the amount owed
If the balance is insufficient, use
fundorfund-allto clear the shortfall.
get-all-accounts lists every subscription associated with the same --name. Use --detail to include manager/auth information and per-epoch fee details.
2.1. Status Meanings
| Status | Meaning |
|---|---|
Active | Fees are current and P2C delivery is active |
InGrace | The account has been underfunded within the grace window (default 2 epochs) |
Suspended | The unpaid period exceeded the grace window; P2C delivery is stopped until the shortfall is cleared |
When an account becomes Suspended, the validator stops sending post-pack updates. Funding the shortfall clears the deficit and restores delivery, but updates missed during the suspension are not replayed. Monitor the deficit and fund the account before the grace period expires.
total owed and the fund-all shortfall cover completed epochs only. The current cluster epoch has not been priced yet, so an account that appears sufficiently funded may still have an outstanding balance when the epoch closes.
3. Commands
rakurai-p2c \ --url <RPC_URL> \ --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \ --keypair <KEYPAIR> \ <COMMAND>
Global flags: -k / --keypair, -u / --url, -p / --program-id.
| Command | Purpose |
|---|---|
get-account | Display one PSA's balance, total owed, status, and deficit |
get-all-accounts | Display all PSAs for a service --name |
fund | Fund a PSA for epoch subscription fees |
fund-all | Fund shortfalls for every underfunded PSA under --name |
3.1. get-account
Displays information for one validator subscription, including the account pubkey, service name, validator vote account, status, balance after rent exemption, total owed for completed epochs, and deficit, if any.
An underfunded alert is shown only when the balance is below the amount owed. Use --detail to display manager/auth information, commission, and per-epoch details (due / deducted / owed / claimed).
rakurai-p2c \ --url <RPC_URL> \ --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \ get-account \ --name <SERVICE_NAME> \ --vote-pubkey <VALIDATOR_VOTE_PUBKEY>
3.2. get-all-accounts
rakurai-p2c \ --url <RPC_URL> \ --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \ get-all-accounts \ --name <SERVICE_NAME>
3.3. fund
rakurai-p2c \ --url <RPC_URL> \ --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \ --keypair <FUNDER_KEYPAIR> \ fund \ --name <SERVICE_NAME> \ --vote-pubkey <VALIDATOR_VOTE_PUBKEY> \ --amount <LAMPORTS>
Anyone may also fund the PSA directly by transferring SOL to the escrow PDA using solana transfer.
3.4. fund-all
fund-all funds the shortfall (owed − balance) for every underfunded PSA associated with the specified --name. The owed amount excludes the current cluster epoch. Accounts that already cover all completed-epoch fees are skipped.
rakurai-p2c \ --url <RPC_URL> \ --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \ --keypair <FUNDER_KEYPAIR> \ fund-all \ --name <SERVICE_NAME>
--batch-size (default 10) controls the number of fund instructions included per transaction. Use --dry-run to preview the funding operation.
Appendix: Program IDs
| Cluster | Reward Distribution Program |
|---|---|
| Mainnet | RAkd1EJg45QQHeuXy7JEWBhdNvsd64Z5PbZJWQT96iB |
| Testnet | A37zgM34Q43gKAxBWQ9zSbQRRhjPqGK8jM49H7aWqNVB |