Skip to content

Building blocks for secure software.

OKcontract Labs is a cybersecurity research company. Our goal is to make critical software verifiable, from the permissions people approve to the bytecode machines run.

Four layers of the software stack in an exploded view.Apps, CLIs and agentsOnchain integrated enforcement systemCompilerFormal models

Research map

Follow the code from an app, a command-line tool or an AI agent to the contracts that enforce its permissions and the compiler that builds them.

6 projects shown

Onchain integrated enforcement system

Chainwall

An asset firewall for onchain accounts. Contracts check the operator, recipient, amount and deadline against the approved call before assets move.

Compiler

oksolc

A Solidity compiler written in Zig. Eight jobs built Uniswap v4 in 3.37 seconds, down from 36.1 seconds with solc. We also check build certificates for selected contracts.

Formal models

Zean

Translate supported Zig functions into executable Lean models. A proof can then say exactly which memory a function may change and which values it must preserve.

Formal models

Solidity Spec

An executable model of Solidity in Lean. It defines how a supported subset behaves when references share memory, expressions change state or a call reverts.

Apps, CLIs and agents

Cells

Build live interfaces with a 10 kB dataflow runtime. Cells tracks which values depend on each other and discards late results so stale data cannot overwrite a newer value.

Apps, CLIs and agents

LambdaScript

Turn a user’s formula into a typed, live calculation. Formulas run on Cells and can use only the values and functions the application supplies.

How much time do defenders have?

CrowdStrike recorded 89% more attacks by AI-enabled adversaries in 2025 than in 2024. A security team may have only minutes to contain an intrusion, even as patching its fleet takes weeks. CrowdStrike’s 2026 findings

Time to reach a second system

Average breakout time in cybercrime intrusions observed by CrowdStrike, measured from the first compromised host.

The fastest breakout CrowdStrike recorded in 2025 took 27 seconds.

CrowdStrike Global Threat Reports202420252026

Time to finish remediation

Median time from a scanner detecting a known-exploited vulnerability to the organization fixing every affected instance in Verizon’s dataset.

A patch can be available for weeks while some systems still run the vulnerable version.

When a security update gives attackers a head start

91% within 48 hours

Among flaws with public demonstrations that CrowdStrike saw exploited, 91% came under attack within two days of the demonstration going public. The shortest interval it observed was 35 minutes.

CrowdStrike field research

Under 4 hours

GreyNoise reconstructed an attack on PaperCut in which the attacker used AI to examine a published fix. Less than four hours passed from starting work to compromising the first organization.

GreyNoise investigation

4 days before release

Amazon’s sensors recorded attempts against two PHP flaws on October 17. The production fixes shipped on October 21. Teams could already be targeted while they were waiting for a version they could install.

Amazon Threat Intelligence

What should a critical system let you do?

If a signing key is stolen at midnight, a treasury should still reject a transfer to an unapproved recipient. We want teams to state rules like that in code and prove that the software enforces them, even before anyone sees the alert.

Put approvals where they count

Chainwall puts the rules for moving assets onchain. We see a wider use for those contracts. A cloud service could require onchain approval before it replaces a production signing key, provided every path to rotation enforces that check.

Carry the proof to the bytecode

Our goal is to show that the EVM bytecode a team deploys preserves the rules it wrote in Solidity. Work on oksolc led to two public tools for that effort. Solidity Spec defines the source behavior. Zean helps check the Zig implementation. In one worked example, the compiler’s checker accepts the original bytecode and rejects an altered output.

Build tools whose behavior we can check

Every dependency adds code a team must trust. We build small parts like Cells from scratch so we can inspect how values change. LambdaScript compiles user formulas into Cells and limits them to the values and functions the app supplies. Our long-term aim is to assemble formally verified apps, command-line tools and agents from parts with very few dependencies.

Learn from what broke.

Follow the approvals behind five onchain incidents. Where did the instruction change, who could approve it, and what did the account actually execute?

Open the incident map

Adapted from the Onchain Risk Map by OKcontract and contributors. CC BY-SA 4.0

Safe treasury

A trading role allowed a swap without restricting where the operator could send the funds. A single role key could move the treasury’s assets.

  1. Trading key submitted a swap
  2. Role permitted the recipient
  3. Treasury assets moved
$6.45Mreported loss
Vitalik Buterin speaking about OKcontract at Ethereum Community Conference
“A more specialized and more focused way to secure onchain interactions.”

Vitalik Buterin

Frequently asked questions

What can an AI agent do with a treasury account?

With Chainwall, a team can allow an agent to submit a payment while restricting the recipient, amount and deadline. The account checks those rules before moving funds. Every route the agent can use to spend from the account needs to enforce the same limits.

See how Chainwall checks a payment
What does a passing proof tell me about my contract?

A proof establishes a specific claim under stated assumptions. In our compiler example, the contract should return the integer it receives. The checker accepts the original bytecode and rejects a version that reverts instead. A different contract needs its own evidence.

Compare the two builds
Which Solidity compiler should I use for deployment?

We use oksolc during development to shorten the wait after an edit. For deployment, we recommend upstream solc. Our benchmarks show which project builds we timed and which bytecode we checked against solc.

See the compiler benchmarks
Can I use Cells and LambdaScript without a blockchain?

Yes. Cells tracks which values depend on each other. LambdaScript compiles formulas into those cells. A command-line budget tool, for example, could recalculate a forecast when a price changes. The host decides which inputs and functions a formula can use.

Try a formula with live inputs
How can I use the incident map to review my own system?

Start with a component your team relies on, such as a signing interface. Open a documented incident and trace what the signer saw, what they authorized and what the contract executed. Then check where your own system compares those instructions before funds move.

Open the incident map
Supported by
EEFanalog venturessmape capitalNVIDIA InceptionSparkle VenturesProtocol LabsLongHash VenturesThree Red Lines VenturesSunDAOarbitrumOptimismStarknetCompound