Solve

Solve and CradleScript

Solieum's main framework. Write a program once in CradleScript, and CRADLE checks it for common vulnerabilities and compiles it for six chains — Solana among them, and Solieum runs the same virtual machine.

Solve is the main framework for building on Solieum, from the team behind the network. You write a program once in CradleScript, a small language for balances, ownership, transfers, guards and events. CRADLE compiles it to one intermediate program, runs its security analyzers and cost estimates there, and emits native code for six chains: Solidity for EVM networks, a Solana program, contracts for NEAR and Polkadot, and Move modules for Aptos and Sui.

Why a language of its own

Most program vulnerabilities are not exotic. They are an ownership check nobody wrote, arithmetic that wraps, value sent out before the books were updated. CradleScript makes those visible to the compiler, and every build runs CRADLE's analyzers before any chain code exists. By default a finding rated high or above stops the build — and because the analysis runs on the intermediate program, one check covers every chain the program is compiled for.

  • A write to protected state with no caller check is rated critical
  • Paying out from an action nobody guards is rated high
  • Changing state after value is sent out is rated high, as reentrancy
  • Unchecked arithmetic on amounts is rated high
bounty.cradle
// CradleScript — a bug-bounty escrow. Anyone funds the pool;
// the owner pays a claimant: checks, accounting, then the payout.
// Build it:  cradle build bounty.cradle  (one source -> EVM + Solana)

blueprint Bounty {
    store {
        owner: address protected = sender;
        pool: amount = 0;
    }

    signal Funded(amount: amount, pool: amount);
    signal Paid(to: address, amount: amount);

    setup {}

    // Payable: anyone adds native value to the pool.
    funded action fund() {
        pool = checked_add(pool, received);
        announce Funded(received, pool);
    }

    // Owner-only, and never more than the pool holds.
    action payout(to: address, amount: amount) {
        ensure(sender == owner, NotOwner);
        ensure(pool >= amount, Insufficient);
        pool = checked_sub(pool, amount);  // accounting first
        dispatch(to, amount);
        announce Paid(to, amount);
    }

    read action balance() -> amount { give pool; }
}

Anatomy

What a CradleScript program is made of

  • Blueprint

    The program itself. One blueprint compiles to a Solidity contract, a native Solana program, NEAR and Polkadot contracts, and Move modules for Aptos and Sui.

  • Store

    Typed state: integers, amounts, addresses, maps and records. A slot marked protected has to be guarded wherever it is written, and the analyzers check that it is.

  • Actions

    Entry points. A funded action accepts native value, a read action only returns data, ensure states the condition a call is refused without, and dispatch sends value out.

  • Setup and signals

    Setup runs once, at deployment, and can take parameters — so a price that differs per chain is supplied then instead of written into the source. Signals are events, declared once and announced by actions.

Cradle Studio, the web IDE at cradle.solvelang.com, lets you write and compile CradleScript in the browser. The Solana program CRADLE emits is the artifact Solieum executes, because Solieum runs the same virtual machine — shown on 2026-09-05, when CRADLE's Counter ran unchanged on a local Solieum chain through CRADLE's own seven-step conformance scenario: every block settled, and the two calls meant to fail were refused at admission for free. A node registers programs at start. Deploying to a chain anyone else reads waits on the public endpoint, and on a chain whose genesis commits its program set — built in the node, live on no chain yet. The first Solieum component written in CradleScript already exists, a batch-anchoring program compiled against the real Solana program crate, and the compatibility matrix names the surfaces where an L2 differs.

Comparison

What the compiler takes off your plate

The obligations are the same on every chain. The difference is whether a person remembers them in every contract, once per chain, or one compiler checks them for all six.

ObligationBy hand → in CradleScriptWhy it matters
Ownership checksremembered each time → protected, then checkedA write to protected state with no caller check is rated critical, and the build stops before any chain code is produced.
Arithmeticwrapping + and - → checked_add, checked_subUnchecked arithmetic on amounts is rated high. A checked sum that overflows fails the call instead of quietly wrapping.
Payout orderpay, then update → update, then dispatchChanging state after value has gone out is rated high: a re-entrant call could still see the old balance and withdraw it again.
Another chaina rewrite → the same sourceEach chain gets idiomatic output. What cannot carry over is refused at compile time with the reason: u256 is accepted for EVM and refused for Solana, not quietly narrowed.
Supply across chainssix ledgers, six caps → declared with supplyThe same token on six chains can mint six times its cap. Under supply home(evm), the mint action is left out of the other five chains' code entirely.
Error surfacesopaque codes → named errorsNotOwner is a custom error in Solidity, an enum variant in the Solana program and E_NOTOWNER in Move, so a failed call says why.

Testing story

CradleScript has no test syntax. The property a unit test would look for is written into the program instead: the transfer in token.cradle refuses to move more than the sender holds, and every sum is checked. The toolchain checks the rest. cradle verify runs USVE, CRADLE's security analyzers, and by default cradle build refuses to produce chain code while any finding is rated high or above. In CRADLE's own CI, each chain's compiler judges the code emitted for its example programs — and because compiling cannot show a guard refusing, the Counter example is played through a seven-step scenario on a local node of each of the six chains CRADLE targets, with a check that every step's outcome agrees across them. The analyzers are heuristic: they catch common classes of bug and do not replace an audit. This token verifies with no findings, and every one of the six chains gets its transfer guard.

token.cradle
// CradleScript — a token: owner-only mint, guarded transfer.
// Build it:  cradle build token.cradle   (one source -> EVM + Solana)

blueprint Token {
    supply local;
    store {
        balances: map<address, u64>;
        totalSupply: u64 = 0;
        owner: address protected = sender;
    }

    signal Transfer(from: address, to: address, amount: u64);
    signal Mint(to: address, amount: u64);

    setup {}

    mints action mint(to: address, amount: u64) {
        ensure(sender == owner, NotOwner);
        balances[to] = checked_add(balances[to], amount);
        totalSupply = checked_add(totalSupply, amount);
        announce Mint(to, amount);
    }

    // The overdraw a unit test checks is refused on every chain.
    action transfer(to: address, amount: u64) {
        ensure(balances[sender] >= amount, Insufficient);
        balances[sender] = checked_sub(balances[sender], amount);
        balances[to] = checked_add(balances[to], amount);
        announce Transfer(sender, to, amount);
    }

    read action balanceOf(who: address) -> u64 {
        give balances[who];
    }
}

Building something the base layer can't hold?

Tell us the workload. If Solieum is the wrong answer for it, we would rather say so early than have you find out at launch.