The yield treasury layer for Solana token launches

Add one function call to your launch flow. Every token you launch gets an autonomous treasury — enforced by Solana code, not promises.

View on GitHub →Read the SDK →

How It Works

1

Your launchpad calls createRTPToken() at mint creation. One function replaces your existing createMint().

2

Transfer fees route to a per-mint vault PDA. The program owns the vault — no wallet, no multisig, no key risk.

3

An agent swarm trades yield on Hyperliquid nightly. Yield returns to the treasury and is distributed 70/20/10 on-chain.

Install

npm install @resilient-protocol/sdk @solana/web3.js @solana/spl-token @coral-xyz/anchor

Quick Start

1. Create a token with an autonomous treasury

import { createRTPToken, RTP_PROGRAM_ID } from "@resilient-protocol/sdk";
import { Connection, Keypair } from "@solana/web3.js";

const connection = new Connection("https://api.devnet.solana.com");
const payer = Keypair.generate(); // your launchpad's keypair

const result = await createRTPToken(connection, payer, {
  name: "Community Token",
  symbol: "CMTY",
  supply: 1_000_000_000,
  feeBps: 200,             // 2% transfer fee → treasury vault
  holdersWallet: payer.publicKey,    // optional, defaults to payer
  projectDevWallet: payer.publicKey, // optional, defaults to payer
  ecosystemWallet: payer.publicKey,  // optional, defaults to payer
});

console.log("Mint:", result.mint);
console.log("Treasury PDA:", result.treasuryPDA);
console.log("Vault PDA:", result.vaultPDA);
console.log("Explorer:", result.explorerUrl);

2. Read treasury state (for your token dashboard)

import { fetchTreasuryState } from "@resilient-protocol/sdk";

const state = await fetchTreasuryState(connection, result.mint);

console.log("Phase:", state.phase);               // "Sustenance" | "Ecosystem" | "Humanity"
console.log("Vault balance:", state.vaultBalance);  // token units
console.log("Total distributed:", state.totalDistributedHolders);

3. Crank fee distribution (permissionless)

import { withdrawAndRedistribute } from "@resilient-protocol/sdk";

// Call this from a keeper bot or your platform's cron job.
// Permissionless — anyone can call it.
const { withdrawSig, redistributeSig } = await withdrawAndRedistribute(
  connection,
  payer,
  result.mint,
);

console.log("Fees withdrawn:", withdrawSig);
if (redistributeSig) console.log("Redistributed:", redistributeSig);

Integration Checklist

1
Replace createMint() with createRTPToken() in your launch flow

Same inputs you already collect — name, symbol, supply, fee — but your token now has an autonomous treasury.

2
Store the returned treasuryPDA alongside your token record

You'll need this to query treasury state and trigger redistribution.

3
(Optional) Add fetchTreasuryState() to your token detail page

Show your users the treasury health — phase, vault balance, total distributed.

What Your Tokens Get

Program-owned vault

No wallet controls the fees. The vault is a PDA derived from your mint — enforced by Solana code.

Nightly yield strategies

30,000 parameter configs, 9-fold walk-forward validation, executed on Hyperliquid perps.

Automatic redistribution

70% to holders, 20% to dev wallet, 10% to ecosystem fund. Split is enforced on-chain.

Phase evolution

Sustenance → Ecosystem → Humanity. Threshold-gated, irreversible transitions enforced by the program.

Constraint enforcement

Hard stops, drawdown limits, on-chain audit trail. No rug possible by design.

API Reference

createRTPToken(connection, payer, config) → RTPTokenResult

Config fields
namestringToken display name
symbolstringTicker symbol (max 8 chars)
supplynumberTotal supply in tokens
feeBpsnumberTransfer fee in basis points (e.g. 200 = 2%)
holdersWallet?PublicKeyOverride 70% recipient (default: payer)
projectDevWallet?PublicKeyOverride 20% recipient (default: payer)
ecosystemWallet?PublicKeyOverride 10% recipient (default: payer)
minRunwayBalance?numberSustenance floor (default: 10 tokens)
Returns: RTPTokenResult
mintstringBase58 mint address
treasuryPDAstringPer-mint treasury account
vaultPDAstringPer-mint vault token account
signaturestringTransaction signature
explorerUrlstringSolana Explorer link

fetchTreasuryState(connection, mintAddress) → TreasuryState

Read-only. No transactions, no signing required. Returns zeros if the treasury doesn't exist yet.

Returns: TreasuryState
phasestring"Sustenance" | "Ecosystem" | "Humanity"
vaultBalancenumberCurrent vault balance (tokens)
totalFeesWithdrawnnumberCumulative fees pulled from mint
totalDistributedHoldersnumberCumulative 70% distributions
totalDistributedDevnumberCumulative 20% distributions
totalDistributedEcosystemnumberCumulative 10% distributions
totalHydrationnumberCumulative self-hydration amount
minRunwayBalancenumberSustenance runway floor

withdrawAndRedistribute(connection, payer, mintAddress)

→ { withdrawSig, redistributeSig? }

Permissionless — anyone can call. Withdraws accrued fees from the mint into the treasury vault, then attempts redistribution (70/20/10 split) if the vault balance exceeds the runway threshold. If below threshold, only the withdraw succeeds and redistributeSig is undefined.

Constants

ExportValue
RTP_PROGRAM_ID8rt6yiBnRTyHy8F69jUd7exWwwShUs4Eokeq41auo2RB
RTP_DEVNET_RPChttps://api.devnet.solana.com
RTP_MAINNET_RPChttps://api.mainnet-beta.solana.com
No RTP Token

There is no RTP token. RTP is pure infrastructure. It serves the tokens that adopt it.