Add one function call to your launch flow. Every token you launch gets an autonomous treasury — enforced by Solana code, not promises.
Your launchpad calls createRTPToken() at mint creation. One function replaces your existing createMint().
Transfer fees route to a per-mint vault PDA. The program owns the vault — no wallet, no multisig, no key risk.
An agent swarm trades yield on Hyperliquid nightly. Yield returns to the treasury and is distributed 70/20/10 on-chain.
npm install @resilient-protocol/sdk @solana/web3.js @solana/spl-token @coral-xyz/anchorimport { 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);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);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);createMint() with createRTPToken() in your launch flowSame inputs you already collect — name, symbol, supply, fee — but your token now has an autonomous treasury.
treasuryPDA alongside your token recordYou'll need this to query treasury state and trigger redistribution.
fetchTreasuryState() to your token detail pageShow your users the treasury health — phase, vault balance, total distributed.
No wallet controls the fees. The vault is a PDA derived from your mint — enforced by Solana code.
30,000 parameter configs, 9-fold walk-forward validation, executed on Hyperliquid perps.
70% to holders, 20% to dev wallet, 10% to ecosystem fund. Split is enforced on-chain.
Sustenance → Ecosystem → Humanity. Threshold-gated, irreversible transitions enforced by the program.
Hard stops, drawdown limits, on-chain audit trail. No rug possible by design.
namestringToken display namesymbolstringTicker symbol (max 8 chars)supplynumberTotal supply in tokensfeeBpsnumberTransfer 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)mintstringBase58 mint addresstreasuryPDAstringPer-mint treasury accountvaultPDAstringPer-mint vault token accountsignaturestringTransaction signatureexplorerUrlstringSolana Explorer linkRead-only. No transactions, no signing required. Returns zeros if the treasury doesn't exist yet.
Returns: TreasuryStatephasestring"Sustenance" | "Ecosystem" | "Humanity"vaultBalancenumberCurrent vault balance (tokens)totalFeesWithdrawnnumberCumulative fees pulled from minttotalDistributedHoldersnumberCumulative 70% distributionstotalDistributedDevnumberCumulative 20% distributionstotalDistributedEcosystemnumberCumulative 10% distributionstotalHydrationnumberCumulative self-hydration amountminRunwayBalancenumberSustenance runway floorPermissionless — 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.
There is no RTP token. RTP is pure infrastructure. It serves the tokens that adopt it.