Web3 security firm | 60+ audits, $4B secured | SpecSiege contests | EVM, Solana, Starknet, Sui

Opava, Czechia
Pinned Tweet
Options protocols rarely fail in one function. They fail when claims, collateral, expiry, vault accounting, hedging, and liquidation stop describing the same obligation. Our new article covers 8 vulnerability classes and the invariants that catch them.
Article

8 Common Vulnerabilities in On-Chain Options Protocols

An options protocol can execute every function correctly and still create claims it cannot settle. Here is how those failures happen and what security reviewers should test. Options are financial

1
3
7
886
What is your oracle agent doing off-chain, and what threatens it? LLMs can't reliably separate data from instructions, so they are easy to manipulate. Decentralisation helps with some threats: independent data sources, checks for hallucinations and freezes, and liveness across APIs. Against prompt injection, though, decentralisation alone doesn't do much. The attack can come through input data or memory poisoning. Injection in input data is often handled with a better prompt. That's not enough. Repeated, adaptive attempts can find a bypass. The stronger defence is in the architecture: the part that reads external content holds no keys or action tools. It only returns a proposed value. A deterministic service decides whether to sign without reading untrusted text. It checks range, deviation, data age, and independent reference data where available. The agent returns strict JSON: a proposed number or an alert. If something goes wrong, you must be able to trace why. Pin the model and prompt versions, set a low temperature, and log inputs, outputs, decisions, and memory changes. Commit log hashes on-chain if you need public tamper evidence. A quorum won't protect against shared model or infrastructure failures. Protect the control panel with MFA, separated permissions, and an audit log. Memory poisoning is sneakier. A poisoned record looks like the agent's own knowledge and can affect later steps, making the damage hard to trace. A study using ElizaOS found memory attacks significantly more effective than regular prompt injection in its tested setting. The prompt injection defences it tested offered limited protection. The simplest way to remove this attack surface is to give the agent no persistent memory. If you need memory, keep configuration (sources, thresholds, parameters) outside the agent's write access and separate it from observations, such as the last price. Writes go through a non-AI service, just like signing. It checks the schema, source, range against the previous value, and the write limit per round. If a check fails, the write is dropped and an alert fires. These checks limit damage; they don't prove an accepted value is correct.
1
2
270
Bitget reports $351.6M in unauthorised transfers from its hot and warm wallets. As with last year's largest hack, the apparent failure lies outside smart contracts. It is encouraging that layered custody appears to have limited the impact to those wallet tiers. The loss is still significant, and Bitget says its protection fund will cover it. Bitget's CEO says private keys were not leaked and points to a compromised wallet backend. How did the attacker gain access and trigger the transfer authorisation process? We await the full postmortem.
1
87
AI agent as an oracle: autonomous and capable. But risks lurk both on-chain and off-chain. Today: on-chain. Risks and solutions. 🧾Evidence and shared mistakes The agent can read a poisoned page or misunderstand a source. Several agents can reach the same wrong answer if they use the same model, prompt, or data. Attach a retrievable evidence record and its hash to the report. Use independent sources and reviewers. A hash shows what was submitted, not whether it is true. ✒️Writes and signatures One agent with one key just needs that key to be stolen. Hence a quorum of independent agents. But the contract must make sure nobody gets counted twice: verify authorised signers, sort recovered addresses, and require each address to exceed the previous one. Bind signatures to the report, chain, contract, and a consumed nonce or one-time request ID to prevent replay. 🔻Data freshness The model goes down, the quorum does not form, or a response is delayed. “It just runs” is not a strategy. Bind observedAt to the signed report. Reject future timestamps and data older than MAX_AGE, including when a stored answer is read. The timestamp is still the agent’s claim, so the evidence must be reviewable. 📤Output domain Free text gives the agent room to return something the contract does not expect. For a decision oracle, use a defined set of outcomes. Put UNRESOLVED at 0. In Solidity, an enum defaults to its first value, so an empty result must not look like a decision. Give INVALID its own path. The agent needs a way to say that the evidence is insufficient. 🪟Dispute window If an AI decision is used right after it is written, nobody has time to challenge a wrong interpretation. Keep it pending, then let consumers read only the final outcome. Set a challenge period and bond around the value at risk and the cost of review. This suits decisions such as prediction market resolution, where an answer may require judgment. ⭕Agent outage The agent goes silent, but the protocol must not freeze or keep acting on an old answer. Define a plan B: restrict actions that depend on the answer while preserving protective actions, use another validated source, or allow governed manual resolution. The contract must define when an agent’s answer is valid, when it can be challenged, and what happens when no answer arrives.
1
1
84
We are glad to pass the bar to become a verified cybersec organisation for the @AnthropicAI
Glad to see this. Me and @CODESPECT got into the cyber-verification program of @AnthropicAI
4
158
1/3 AI agents and oracles An agent can play two roles toward an oracle: it consumes oracle data, or it acts as an oracle itself. Today, the first one. Agents that trade using oracle data inherit its risks. Prompt injection is a separate risk when they also read untrusted text from APIs or other sources. A poorly built agent can lose a lot of money. ⏬
1
1
2
129
2/3 What can go wrong: - Stale price: the oracle hasn't updated in a long time. - Deviation threshold: the oracle may wait for a set percentage move or its heartbeat before updating. Meanwhile, the market moves and the agent decides using an older price. - Off-chain API vs. on-chain settlement: the agent decides on one price but trades at another. Flash loan manipulation: an attacker briefly moves a price source the agent trusts. Spot instead of TWAP: a short-lived pool price can be manipulated more easily than a time-weighted one. Spoofed or failed oracle: a fake address, zero price or a frozen value.
1
46
3/3 How to defend? The model proposes, deterministic code decides. Checks that protect money don't belong in the prompt, they belong in code. - Data: oracle allowlist, maximum price age, price above zero and within a sane range, correct decimals. On supported L2s, check sequencer uptime and allow a grace period. Compare independent sources and halt on material disagreement. - Decision: strictly structured, validated output. - Execution: hard limits (worst acceptable price, max slippage, transaction size, daily volume), a smart wallet with a restricted session key while the main key stays with a human, an allowlist of functions and protocols, simulation before sending, and enforced multisig approval for anything over the limit. - Monitoring: automatic circuit breaker, emergency kill switch, backup data sources. Agents need boundaries
25
Pontes from @ecb is live. Its initial pilot links DLT platforms to European settlement infrastructure, letting wholesale trades settle in central bank money. That means security cannot stop at the smart contract. It has to cover the whole settlement flow.
1
1
82
CODESPECT is more than a smart contract audit firm. We are an offensive cybersecurity company operating across Web3 and Web2. We combine smart contract expertise with application security and adversarial testing to review the full attack surface: contracts, websites, APIs, bots, backend systems, and off-chain logic. Our work is neither AI-only nor manual-only. It is a rigorous combination of advanced tooling, AI-assisted analysis, and experienced human security researchers. We are not positioned as the cheapest provider, nor are we priced for appearances. Our pricing reflects the depth of work, responsibility, and skilled team required to protect serious protocols. We have maintained this standard even in a difficult market because security cannot be reduced to a checkbox. It is a shared responsibility between protocol teams and auditors. Our team holds certifications including CRTP, OSCP, CEH, and eCPPTv2, with experience across private institutional engagements and competitive reviews such as SpecSiege. In DeFi, our expertise spans vaults, options, RWAs, leverage, order books, lending and borrowing, and more. Clients come to CODESPECT for a review. They return for a long-term security partnership. Code. Inspect. Protect.
1
5
11
753
Smart contracts are not the entire protocol. A protocol can have well-reviewed contracts and still be exposed through its APIs, backend services, bots, administrative flows, key management, or other off-chain components. CODESPECT reviews security as an attack surface, not as a single codebase. Off-chain logic deserves the same scrutiny as on-chain code. Below is an example from one of our previous assessments: ⏬⏬
1
1
2
153
1/6 It’s Friday evening. The team is offline. An options series expires, and the settlement oracle reports a price outside the expected range. - Can holders claim? - Can the vault release collateral? - Who decides? These questions belong in the security review before launch.⏬
1
1
1
114
5/6 Then review the people behind the emergency controls. “The multisig will handle it” leaves assumptions untested: signer availability, response time, permissions, and what users can do while waiting. Those assumptions are part of the protocol’s security model.
1
5
6/6 Options security extends beyond the payout formula. It includes how claims remain backed, how settlement recovers, and which decisions require someone to be online. The protocol does not get a weekend. Its assumptions should not either.
4
The SEC’s Innovation Exemption for tokenised U.S. stocks is an important signal for the RWA market. It creates a controlled route for on-chain trading, while requiring tokenised shares to preserve the rights of the underlying stock and smart contracts to be public and auditable. That makes security foundational. Not only smart-contract audits, but the full RWA security chain: issuance, custody, oracle and corporate-action integrity, access controls, trading infrastructure. This is where CODESPECT can support market participants: strengthening security across the tokenised-market lifecycle, from smart contracts to the broader RWA infrastructure.
1
70