{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"codeGuideFiles":[],"seo":{"title":"PSA — P2C Subscription Account","description":"Learn how to work with Staking API for managing deposits, withdrawals, and stake pool information."},"dynamicMarkdocComponents":[],"metadata":{"type":"markdown"},"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"psa--p2c-subscription-account"},"children":["PSA — P2C Subscription Account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The P2C Subscription Account (PSA) is what you prepay to keep a validator's post-pack stream enabled."]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The fee is derived from that validator's ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["staked SOL"]},", which is public, so you can work out what each validator costs before you subscribe. You fund it up front, the epoch's fee is deducted when that epoch closes, and if you stop consuming you close the account and recover the unused balance. Underfunding gives you a grace window rather than an instant cut-off."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A PSA is not a tip and not a share of backrun profit. It is an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["access fee"]},", paid in advance, for one service against one validator. How it compares with the MCA and with tips: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/readme#2.-the-three-payments-side-by-side"},"children":["the three payments, side by side"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience:"]}," Searchers, traders, and TIN partners who consume post-pack confirmations."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"1.-why-the-psa-exists-and-how-it-is-priced"},"children":["1. Why the PSA exists and how it is priced"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Post-pack is a live gRPC stream of transactions at the point of no return. Delivering it costs the validator, so it is priced rather than free."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["One PSA per service, per validator."]}," You pay for each validator whose updates you receive. Running against ten validators means ten PSAs under the same service name."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The fee is derived from that validator's staked SOL."]}," At the end of each epoch the program writes a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["stake snapshot"]}," into the epoch entry and prices the fee from it. Stake is public, so you can estimate the cost per validator before you subscribe."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The fee splits two ways:"]}," a commission to Rakurai (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["commission_bps"]},"), and the remainder to the validator."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["block_reward_conversion_enabled"]}," is on (the default), that validator remainder is later converted into a high-priority block reward. If you index Rakurai revenue, do not count it twice — see the ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/readme#6.-do-not-double-count-tips-and-converted-block-rewards"},"children":["indexing note"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2.-account-status-and-the-grace-window"},"children":["2. Account status and the grace window"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every PSA carries a status that determines whether the stream keeps flowing."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Status"},"children":["Status"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Stream"},"children":["Stream"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Active"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fees are current"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delivered"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InGrace"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One or more recent epochs were underfunded, still inside the grace window"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delivered"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Suspended"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The unpaid streak exceeded ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grace_epochs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Stopped"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The program counts consecutive underfunded epochs in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unpaid_streak"]}," and compares it against ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["grace_epochs"]},", which defaults to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2"]},". Any shortfall is also accumulated in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deficit"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"danger","name":"Suspension stops delivery until the deficit is cleared"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the status reaches ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Suspended"]},", the validator stops sending post-pack updates to your endpoint. Funding the shortfall clears the deficit and restores delivery, but the updates you missed while suspended are gone — there is no replay."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"A healthy-looking balance can still be short"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total owed"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]}," shortfall both cover ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["past epochs only"]},". The in-progress epoch has not been priced yet, so keep a buffer above the displayed figure rather than funding to exactly zero."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3.-lifecycle"},"children":["3. Lifecycle"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Onboard."]}," Contact the Rakurai team on Slack or ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://t.me/rakurai_official"},"children":["Telegram"]}," and share your gRPC endpoint — see ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/setup_guide#1.-contact-rakurai-and-share-your-wallet-pubkey"},"children":["Setup guide"]}," and ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/using_p2c#1.-setup-required-grpc-services"},"children":["Using P2C"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Rakurai opens the account."]}," A PSA is created for your service name against each validator, and your endpoint is registered. Defaults (manager, commission, grace) are copied from the on-chain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["P2CConfigAccount"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["You fund it."]}," Top up with ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/cli/p2c_subscription#3.3.-fund"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rakurai-p2c fund"]}]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fund-all"]}," across every validator at once, or a plain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["solana transfer"]}," to the PDA — anyone may fund it."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["The epoch closes."]}," The stake snapshot is written and the fee is deducted from the prepaid balance: Rakurai's commission first, remainder to the validator."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["You keep it topped up."]}," Check status and deficit each epoch and fund before the streak reaches the grace limit."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["You leave."]}," Once every billed epoch is paid, the account can be closed and the leftover prepaid balance is returned."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4.-checking-your-account"},"children":["4. Checking your account"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sh","header":{"controls":{"copy":{}}},"source":"rakurai-p2c \\\n  --url <RPC_URL> \\\n  --program-id <REWARD_DISTRIBUTION_PROGRAM_ID> \\\n  get-account \\\n  --name <SERVICE_NAME> \\\n  --vote-pubkey <VALIDATOR_VOTE_PUBKEY>\n","lang":"sh"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This prints the derived PDA, balance after rent exemption, total owed for past epochs, status, and the deficit when it is above zero. Add ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--detail"]}," for per-epoch rows (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["due"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["deducted"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["owed"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimed"]},") and the commission settings."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get-all-accounts --name <SERVICE_NAME>"]}," to see every validator you subscribe to in one table."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Full command reference: ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/cli/p2c_subscription"},"children":["P2C Subscription CLI (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rakurai-p2c"]},")"]}]},". On-chain struct: ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/rakurai_programs/programs/reward_distribution/readme#7.2.-psa--p2csubscriptionaccount"},"children":["Reward Distribution — PSA"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5.-related"},"children":["5. Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/mca"},"children":["MCA"]}," — share backrun profit after you have stream access"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/using_p2c"},"children":["Using P2C"]}," — Relayer gRPC stream and reply bundles"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/tips"},"children":["Tips"]}," — landing tips are a separate path from the PSA"]}]}]},"headings":[{"value":"PSA — P2C Subscription Account","id":"psa--p2c-subscription-account","depth":1},{"value":"1. Why the PSA exists and how it is priced","id":"1.-why-the-psa-exists-and-how-it-is-priced","depth":2},{"value":"2. Account status and the grace window","id":"2.-account-status-and-the-grace-window","depth":2},{"value":"3. Lifecycle","id":"3.-lifecycle","depth":2},{"value":"4. Checking your account","id":"4.-checking-your-account","depth":2},{"value":"5. Related","id":"5.-related","depth":2}],"frontmatter":{"seo":{"title":"PSA — P2C Subscription Account"}},"lastModified":"2026-09-08T11:35:39.000Z"},"slug":"/docs/services/rakurai_jito_private/rakurai_docs/transaction_inclusion/post_pack/psa","userData":{"isAuthenticated":false,"teams":["anonymous"]}}