Full lesson
CYNIC
Sovereign low-layer Rust runtime, epistemic consensus, and multi-agent coordination organism
What it does
From the project README:
[](LICENSE) [](rust-toolchain.toml) [](infra/CANONICAL_CRATE_MAP.md) [](contracts/foundation.json)
- Original
- zeyxx/CYNIC
- SuperStack fork
- Blockchains/CYNIC @
8f41021 - Stars
- 1
- Last push (original)
- 2026-11-05
- Languages
- Rust, Python, Kotlin, Makefile, TypeScript, SurrealQL
- Detected stack
- @solana/kitAnchor
- Categories
- AI & AgentsInfrastructure & Tooling
- Licence
- Apache-2.0
- Homepage
- https://cynic-organism.vercel.app
Architecture
2037 source files. By extension: .rs ×1954, .py ×78, .ts ×5.
| Top-level directory | Source files |
|---|---|
crates | 1950 |
apps | 74 |
services | 5 |
tests | 3 |
programs | 3 |
scripts | 2 |
On-chain programs: programs/cynic-anchor
Dapp: devnet deploy pending
⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/cynic/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.
Key code, explained
Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.
programs/cynic-anchor/src/lib.rs L133–156 @ 8f41021 · Apache-2.0 · original vault.total_burned_units += amount; vault.last_burn_timestamp = Clock::get()?.unix_timestamp; Ok(()) }} #[derive(Accounts)]#[instruction(epoch: u64)]pub struct RecordPohCheckpoint<'info> { #[account( init, payer = node_authority, space = 8 + std::mem::size_of::<PohRecordAccount>(), seeds = [b"cynic_poh", node_authority.key().as_ref(), &epoch.to_le_bytes()], bump )] pub poh_record: AccountLoader<'info, PohRecordAccount>, #[account(mut)] pub node_authority: Signer<'info>, pub system_program: Program<'info, System>,} #[derive(Accounts)]- Line 134
vault.last_burn_timestamp = Clock::get()?.unix_timestamp;: Reads on-chain time from the Clock sysvar. - Line 144
init,: Creates and pays for a new account. Space and payer must be specified. - Line 147
seeds = [b"cynic_poh", node_authority.key().as_ref(), &epoch.to_le_bytes()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match. - Line 148
bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve. - Line 152
pub node_authority: Signer<'info>,: Requires this account to have signed the transaction.
crates/cynic-protocol/src/agent_isolation.rs L73–96 @ 8f41021 · Apache-2.0 · original/// Capability-aware egress route for external API calls.#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]pub struct CapabilityEgressRoute { pub schema: String, /// Allowed RPC methods (e.g., "getLatestBlockhash", "simulateTransaction"). pub allowed_methods: Vec<String>, /// Max requests per second. pub rate_limit_rps: u32, /// Total bytes allowed per session. pub max_bytes_per_session: u64,} impl CapabilityEgressRoute { pub fn solana_rpc() -> Self { Self { schema: CAPABILITY_EGRESS_ROUTE_SCHEMA.to_string(), allowed_methods: vec![ "getLatestBlockhash".to_string(), "simulateTransaction".to_string(), "sendTransaction".to_string(), ], rate_limit_rps: 10, max_bytes_per_session: 10 * 1024 * 1024, // 10 MB }- Line 77
/// Allowed RPC methods (e.g., "getLatestBlockhash", "simulateTransaction").: Fetches a recent blockhash. Transactions expire if it gets too old. - Line 92
"sendTransaction".to_string(),: Submits the signed transaction to the cluster.
How to run, build and test
These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.
| Directory | Command | Runs |
|---|---|---|
services/relay-gateway | npm run start | node dist/index.js |
services/relay-gateway | npm run build | tsc -p tsconfig.json |
programs/cynic-anchor | anchor build | compile programs and generate IDLs |
programs/cynic-anchor | anchor test | local validator + test suite |
programs/cynic-anchor | anchor run test | cargo test-sbf |
. | cargo build | Rust workspace build |
. | cargo test | Rust tests |
. | make help | Makefile target |
. | make surfaces | Makefile target |
. | make audit-crate | Makefile target |
. | make audit | Makefile target |
. | make converge | Makefile target |
. | make deps | Makefile target |
. | make test | Makefile target |
What you could build from it
- Fork the SuperStack copy and extend it within the AI & Agents gaps listed on the idea page.
- Learn the pattern first: AI agents on Solana
- Learn the pattern first: Building and sending transactions from a client