Sol.College

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 directorySource files
crates1950
apps74
services5
tests3
programs3
scripts2

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.

zeyxx/CYNIC · 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)]
  1. Line 134 vault.last_burn_timestamp = Clock::get()?.unix_timestamp;: Reads on-chain time from the Clock sysvar.
  2. Line 144 init,: Creates and pays for a new account. Space and payer must be specified.
  3. 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.
  4. Line 148 bump: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  5. Line 152 pub node_authority: Signer<'info>,: Requires this account to have signed the transaction.
zeyxx/CYNIC · 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        }
  1. Line 77 /// Allowed RPC methods (e.g., "getLatestBlockhash", "simulateTransaction").: Fetches a recent blockhash. Transactions expire if it gets too old.
  2. 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.

DirectoryCommandRuns
services/relay-gatewaynpm run startnode dist/index.js
services/relay-gatewaynpm run buildtsc -p tsconfig.json
programs/cynic-anchoranchor buildcompile programs and generate IDLs
programs/cynic-anchoranchor testlocal validator + test suite
programs/cynic-anchoranchor run testcargo test-sbf
.cargo buildRust workspace build
.cargo testRust tests
.make helpMakefile target
.make surfacesMakefile target
.make audit-crateMakefile target
.make auditMakefile target
.make convergeMakefile target
.make depsMakefile target
.make testMakefile target

What you could build from it

Used in lessons