Vibe Coding in Crypto: Security Risks for Wallets, Exchanges and Smart Contracts

November 18, 2026
Reading Time 6 Min
ilink author image
Maria Vasetskaia
Vibe Coding Security Risks for Crypto Products | ilink blog image

Introduction

Vibe coding means building software by prompting an AI model and accepting the code it writes without reading it closely. For a demo or an internal tool, that trade-off can be acceptable. For a crypto wallet, an exchange or a smart contract, it is a security risk: the code holds or moves digital assets, runs in public, and its transactions cannot be reversed. In February 2026, a price oracle configuration in the DeFi lending protocol Moonwell, shipped in a pull request whose commits list an AI model as co-author, valued cbETH at about $1.12 instead of about $2,200 and left the protocol with $1,779,044.83 in bad debt.

This article is for founders, product owners and CTOs of crypto products who use AI coding tools or hire teams that do. It explains why crypto punishes vibe-coded bugs harder than other software, what the Moonwell case shows about review, where AI-written crypto code tends to break, which risks come from the AI tools themselves, and what an engineering team does differently.

What Vibe Coding Is, and What It Is Not

The term comes from Andrej Karpathy, a co-founder of OpenAI and former head of AI at Tesla. On February 2, 2025, he described "a new kind of coding I call 'vibe coding'" in a post on X. His own description of the method was blunt: "I 'Accept All' always, I don't read the diffs anymore." When an error appeared, he pasted the message back into the model and let it fix the problem. He presented it as a way to build throwaway weekend projects.

Since then, the term has spread to any development where the model's output goes to production because the app seems to work, not because someone understood the code. AI-assisted engineering uses the same models and the same editors, but the decisions stay with people:

  • In vibe coding, the prompt is the specification, the model writes the code, and a working demo is the test.

  • In AI-assisted engineering, the model drafts code, tests or documentation, and engineers decide what goes in. They read every change, review it, test it against the requirements and remain responsible for it after release.

For most crypto products, the second model is the only one that is safe to put real money behind.

Why Crypto Punishes Vibe-Coded Bugs Harder

A bug in a typical web app breaks a page or leaks data. A bug in crypto code moves money, and five properties of blockchain products make the damage faster and harder to undo:

  • Transactions are final. A wrong transfer, mint or liquidation on a public blockchain cannot be reversed by a support ticket or a database rollback.

  • Contract code is public and open to anyone. Once a smart contract is deployed, its functions can be called by any user or bot, and its logic can be read by anyone looking for a mistake.

  • Keys are money. Whoever controls a private key controls the assets behind it. A key leaked from a log file or a config is enough to empty a wallet.

  • Bots act on mistakes. In the Moonwell case, liquidation bots and opportunistic borrowers acted on the wrong price, Cointelegraph reported.

  • Fixes are slow. Contracts that are immutable or controlled by governance cannot be patched in minutes. After the Moonwell incident, the team cut the supply and borrow caps of the affected market to 0.01, while the oracle fix itself needed a governance vote and a timelock, according to The Block.

Case Study: The Moonwell Oracle Bug

Moonwell is a lending protocol on Base and Optimism. Its February 2026 incident is the most documented case so far of AI-assisted code in a smart contract system that ended in a loss. The sequence below is based on the public pull request and on reporting by Cointelegraph and The Block.

  1. February 10, 2026. Pull request #578, "Add MIP-X43: Activate OEV wrappers for all remaining markets," is merged into the moonwell-contracts-v2 repository. It contains 11 commits, and commit messages include the line "Co-Authored-By: Claude Opus 4.6."

  2. During review. A reviewer points at the cbETH oracle configuration and asks where the actual value of cbETH is calculated. The pull request page shows no reply to that question.

  3. February 15, 2026. Governance proposal MIP-X43 is executed. One oracle configuration derives the USD value of cbETH from the cbETH/ETH exchange rate alone instead of multiplying it by the ETH/USD price feed. The oracle reports cbETH at about $1.12 instead of about $2,200.

  4. Result. 1,096.317 cbETH is liquidated, and the protocol is left with $1,779,044.83 in bad debt across several assets, according to Moonwell's post-mortem as reported by The Block.

Security auditor Pashov, who flagged the incident on X, told Cointelegraph that the developer "was using Claude to write the code, and this has led to the vulnerability." He also called it an error "even a senior Solidity developer could have made" and said it "could have been caught with an integration test, a proper one." The team later said it had unit and integration tests in a separate pull request and had commissioned an audit from Halborn. Moonwell itself has not attributed the incident specifically to AI-generated code.

The lesson is about process more than about the model. The project had tests, an audit and a reviewer who asked exactly the right question. The question stayed unanswered, and no test compared the oracle's output with a real market price before the proposal went live. Vibe coding removes precisely these steps: someone who understands the price formula, and a check that the number makes sense.

Where AI-Written Crypto Code Breaks

AI models write code that compiles and passes simple tests. The failures in crypto products usually sit in places where correctness depends on financial logic, permissions or the behavior of a live network. These six areas deserve a human review on every change.

Price oracles and decimals

Prices are composed from several feeds, and each feed has its own units and decimals. Moonwell's bug was a missing multiplication between two feeds. Similar mistakes come from mixing tokens with 6 and 18 decimals, using a spot price from a single DEX pool that can be moved within one transaction, or accepting a stale price. A test that checks the oracle's output against an independent market price catches this whole class of errors.

Access control and admin keys

Every function that can mint, pause, upgrade or withdraw needs an explicit answer to the question of who may call it. Generated code can leave such a function open, check the wrong role or rely on outdated patterns such as tx.origin for authorization. Admin rights held by a single externally owned account are a single point of failure. Multi-signature wallets and timelocks on sensitive actions reduce that risk.

Private keys in wallets and backends

Wallets and custody backends live or die by key handling. Typical problems in generated code are secrets in logs or error messages, keys in plain-text config files, unencrypted seed phrases on the device and test mnemonics left in a release build. In crypto wallet development, key management is designed at the architecture stage, with options such as encrypted private keys, multi-signature support and MPC.

Deposit confirmations and sweeping

Exchanges and payment gateways credit user deposits and then move funds between hot and cold wallets. Bugs appear when a deposit is credited before enough confirmations, when a chain reorganization reverses a transaction that was already credited, or when a retry credits the same deposit twice. These cases depend on network behavior that a model does not observe, so they need explicit rules and tests on a testnet or a mainnet fork.

Upgradeable proxies

Upgradeable contracts separate storage from logic. A new implementation with a changed storage layout can overwrite existing data, and an implementation contract that was never initialized can be taken over. Upgrade rights are also admin rights, so they need the same multisig and timelock controls.

Tests written by the same model

When a model writes both the code and its tests, the tests often share the code's assumptions. If the model believes the price formula is correct, its test will confirm that formula. Independent checks work better here: tests written from the specification, invariant and fuzz tests that try thousands of inputs, and integration tests against real price feeds or a fork of the live network.

Is AI-written code heading to mainnet?

All ilink smart contracts undergo an audit to identify vulnerabilities, logical errors, and economic risks.

Request a call background

The Tooling Risk: When the AI Editor Is the Attack Surface

Risk in AI-assisted development does not come only from the generated code. The tools themselves run with access to source code, terminals and, on some machines, to wallets.

In July 2025, Kaspersky reported a case in which a blockchain developer lost about $500,000 in crypto assets after installing a fake "Solidity" language extension in Cursor, an AI code editor. The package came from the Open VSX repository, where the attacker had inflated its download count to 54,000 so that it ranked above the legitimate extension. The fake added no Solidity support. Instead, it installed remote access software, then a backdoor and a stealer that collected data from browsers and crypto wallets, including the developer's seed phrases. "Spotting compromised open-source packages with the naked eye is becoming increasingly difficult," said Georgy Kucherin, a security researcher at Kaspersky.

For a crypto team, the practical rules are simple: install editor extensions and packages only from verified publishers, keep deployment and treasury keys off development machines, and sign production transactions through hardware wallets or multi-signature setups.

AI-Linked Vulnerabilities Are Growing

Researchers at Georgia Tech's School of Cybersecurity and Privacy track published vulnerabilities that trace back to AI-generated code. Their Vibe Security Radar scans public security advisories and checks the history of the vulnerable code for signatures of AI tools, such as co-author tags and bot emails. As of April 13, 2026, the project had scanned more than 43,000 advisories and confirmed 74 cases, 14 of them critical and 25 high severity.

The growth is steep: about 18 cases over seven months in the second half of 2025, 56 in the first three months of 2026, and 35 in March 2026 alone. The method misses code where AI markers were removed. "When an agent builds something without authentication, that's not a typo," said Hanqing Zhao, a graduate research assistant on the project. "It's a design flaw baked in from the start."

Vibe Coding vs. an Engineering Team: What Changes in Practice

AI tools do not have to leave a crypto project. What changes is the set of controls around them. A team that ships wallets, exchanges and smart contracts with AI assistance keeps these steps:

  • An owner for every change. An engineer who can explain the code is responsible for it, whoever typed it.

  • Review that ends with answers. Every pull request is reviewed, and a reviewer's question about a formula or a permission is resolved before merge. Moonwell's unanswered question shows why this matters.

  • Tests from the specification. Business logic, permissions, edge cases and failure scenarios are tested against what the product must do, not against what the model wrote.

  • Integration tests with real data. Prices, decimals and confirmations are checked against live feeds or a mainnet fork before release.

  • An audit before funds go live. Contracts that hold user assets get an internal or third-party security audit.

  • Controlled deployment. Admin and upgrade rights sit behind multisig and timelocks, and deployment keys stay off developer laptops.

At ilink, AI tools handle routine work, and every decision is made by engineers and developers. Team leads review the code, and QA engineers and testers check everything before release. AI makes the team faster, but it never decides on its own what goes into production. In smart contract projects, testing covers business logic, permissions, edge cases, transaction behavior and failure scenarios, and the code is prepared for internal or third-party security audits when needed. ilink also runs a smart contract audit service with manual and automated checks. If you already have a prototype built with an AI tool or by another contractor, the team can take it over, review the code and bring it to a production-ready product.

Have a vibe-coded prototype?

ilink engineers can review the code of your crypto product, test it and bring it to production with engineering controls in place.

Request a call background

FAQ

Is vibe coding safe for crypto apps?

Not on its own. Vibe coding accepts AI-generated code without close review, while crypto apps hold assets, run in public and cannot reverse transactions. AI tools can be used safely in crypto development when engineers review every change, test it against the specification and audit contracts before they handle funds.

Can AI write a smart contract?

Yes, AI models can generate Solidity and other smart contract code that compiles and passes basic tests. The weak points are financial logic, such as price formulas and decimals, access control and upgrade rights. A contract written with AI help needs the same review, testing and audit as any other contract.

Does AI-generated smart contract code need an audit?

Yes, if the contract will hold or move user funds. An audit checks for vulnerabilities, logical flaws and economic risks. It works best together with integration and invariant tests: in the Moonwell case, an audit had been commissioned and the bug was still not caught before launch.

Who is responsible when AI-written code fails?

The team that ships the code. A model has no accountability for a deployed contract or a released app. That is why every AI-assisted change needs a named engineer who understands it and a reviewer who approves it.

Can a vibe-coded prototype become a production product?

Yes, but usually not as it is. The code needs a review of its architecture, key handling and permissions, tests for business logic and failure scenarios, and an audit for any smart contracts. ilink can take over a prototype built with an AI tool or by another contractor, review the code and bring it to production.

What should a review of AI-generated crypto code check?

Start with the places where errors cost money: price oracles and decimals, permissions on mint, pause, upgrade and withdraw functions, private key storage, deposit crediting and confirmations, and upgrade logic. Then check the tests themselves, because tests written by the same model often repeat its assumptions.

Comments (0)

By Clicking on the Button, I Agree to the Processing of Personal Data and the Terms of Use of the Platform.

Latest Posts

Read More
Escrow Automation in Fintech: How Smart Contracts Reduce Disputes and Speed Up Settlement

Learn how escrow automation in fintech uses smart contracts to reduce disputes, speed up settlement, and improve payment efficiency across marketplaces and B2B transactions.

How Fintech Startups Can Use Smart Contracts Without Rebuilding Their Core System

Learn how fintech startups can integrate smart contracts without rebuilding core systems. Discover practical use cases, architecture patterns, and scalable blockchain integration strategies.

Read More

Need a reliable team of developers?

The ilink team consists of experienced senior engineers, testers, and blockchain developers.

By Clicking on the Button, I Agree to the Processing of Personal Data and the Terms of Use of the Platform.

Contact background image