repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | { |
| #2 | "skillId": "pump-solana-architecture", |
| #3 | "name": "pump-solana-architecture", |
| #4 | "description": "Design and derive Program Derived Addresses (PDAs) and account layouts across the Pump ecosystem's four Solana programs — global singletons, per-token accounts, per-user accumulators, and cross-program coordination patterns.", |
| #5 | "category": "solana-dev", |
| #6 | "path": "pump-solana-architecture/SKILL.md", |
| #7 | "url": "https://x402.wtf/api/skills/pump-solana-architecture", |
| #8 | "tags": [ |
| #9 | "pump", |
| #10 | "solana", |
| #11 | "architecture" |
| #12 | ], |
| #13 | "requiredEnv": [], |
| #14 | "homepage": "https://github.com/nirholas/pump-fun-sdk", |
| #15 | "attestation": { |
| #16 | "status": "pending", |
| #17 | "isFormallyVerified": false, |
| #18 | "attestationPda": null, |
| #19 | "verificationTimestamp": null |
| #20 | }, |
| #21 | "markdown": "---\nname: pump-solana-architecture\ndescription: \"Design and derive Program Derived Addresses (PDAs) and account layouts across the Pump ecosystem's four Solana programs — global singletons, per-token accounts, per-user accumulators, and cross-program coordination patterns.\"\nmetadata:\n openclaw:\n homepage: https://github.com/nirholas/pump-fun-sdk\n---\n\n# Solana Program Architecture — PDAs, Accounts & Multi-Program Coordination\n\nDesign, derive, and manage Program Derived Addresses (PDAs) and account layouts across the Pump ecosystem's four Solana programs with cross-program invocation patterns.\n\n## On-Chain Programs\n\n| Program | ID | Purpose |\n|---------|-----|---------|\n| Pump | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | Bonding curve operations |\n| PumpAMM | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | Graduated AMM pools |\n| PumpFees | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | Fee sharing |\n| Mayhem | `MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e` | Mayhem-mode tokens |\n\n## PDA Categories\n\n### Global Singletons\n- `GLOBAL_PDA` — `[\"global\"]` on Pump — protocol-wide config\n- `FEE_CONFIG_PDA` — `[\"fee-config\"]` on Pump — tiered fee settings\n- `GLOBAL_VOLUME_ACCUMULATOR_PDA` — `[\"global_volume_accumulator\"]` — protocol-wide volume\n\n### Per-Token PDAs\n- `bondingCurvePda(mint)` — `[\"bonding-curve\", mint]` — token bonding curve state\n- `bondingCurveTokenAccountPda(mint)` — `[\"bonding-curve-token-account\", mint]`\n- `feeSharingConfigPda(mint)` — `[\"sharing-config\", mint]` on PumpFees\n- `canonicalPumpPoolPda(mint)` — AMM pool for graduated token\n\n### Per-User PDAs\n- `creatorVaultPda(creator)` — `[\"creator-vault\", creator]` on Pump\n- `ammCreatorVaultPda(creator)` — `[\"creator_vault\", creator]` on PumpAMM\n- `userVolumeAccumulatorPda(user)` — `[\"user_volume_accumulator\", user]`\n\n### Mayhem PDAs\n- `mayhemMetadataPda(mint)` — `[\"mayhem_metadata\", mint]` on Mayhem\n- `mayhemWsolPda()` — `[\"mayhem_wsol\"]` on Mayhem\n\n## BothPrograms Pattern\n\nMany operations span both Pump and PumpAMM — the SDK provides aggregation:\n\n| Method | Description |\n|--------|-------------|\n| `getCreatorVaultBalanceBothPrograms` | Sum balance from both vaults |\n| `collectCoinCreatorFeeInstructions` | Collect from both programs |\n| `fetchUserVolumeAccumulatorTotalStats` | Aggregate volume across programs |\n| `claimTokenIncentivesBothPrograms` | Claim rewards from both |\n\n## Token Lifecycle Cross-Program Flow\n\n```\nPump Program PumpAMM Program\n┌─────────────┐ ┌──────────────────┐\n│ create │ │ │\n│ buy / sell │ ── migrate ──► │ AMM trading │\n│ graduate │ │ fee collection │\n└─────────────┘ └──────────────────┘\n │ │\n └──── PumpFees Program ──────────┘\n (fee sharing)\n```\n\n## Account Extension\n\nBonding curve accounts may need extension to `BONDING_CURVE_NEW_SIZE` (151 bytes) before certain operations:\n\n```typescript\nconst extendIx = await PUMP_SDK.extendAccountInstruction({\n bondingCurvePda: bondingCurvePda(mint),\n bondingCurveAccountInfo\n});\n```\n\n## Patterns to Follow\n\n- Use `findProgramAddressSync` for all PDA derivation — never manually compute bump seeds\n- Group related account fetches into a single `getMultipleAccountsInfo` call\n- Always check account existence before decoding — use nullable decoders\n- Extend accounts before migration or setCreator operations\n\n## Common Pitfalls\n\n- Creator vault PDA seeds differ: `\"creator-vault\"` (Pump, hyphen) vs `\"creator_vault\"` (AMM, underscore)\n- `canonicalPumpPoolPda` uses the external pump-swap-sdk, not the Pump program\n- Mayhem PDAs are on a separate program (`MAyhSm...`)\n- PDA derivation failures indicate an invalid bump — the address is off the Ed25519 curve\n\n" |
| #22 | } |
| #23 |