Have you ever wondered how much it actually costs to prove that a piece of software will always behave the way its creators claim? Most of us just hope the tests passed and the auditors did their job. But what if an AI system could generate rigorous mathematical proofs for hundreds of complex problems at a total model cost of roughly one hundred twelve dollars? That is exactly the result Near Protocol recently shared, and the team is already talking about taking the same approach into the heart of its own network and core smart contracts.
Why Formal Verification Matters More Than Ever
In the blockchain world we talk a lot about security. We run audits, we write unit tests, we hire specialists who pore over every line of code. Still, bugs slip through. Sometimes those bugs cost millions. Formal verification sits at a different level. Instead of checking a handful of scenarios, it aims to prove that certain properties hold for every possible execution path that the mathematical model allows.
I’ve always found the idea both powerful and slightly intimidating. On one hand you get stronger guarantees. On the other hand the process has traditionally required highly specialized knowledge and a lot of expensive compute time. Near’s latest work suggests that artificial intelligence can lower both barriers.
The announcement itself is careful. The team is not claiming that every smart contract will suddenly become unbreakable. They are saying that the cost of generating useful mathematical proofs has dropped far enough that it becomes realistic to apply the technique more widely. That distinction feels important.
The Three Stages Of Production Verification
Moving from a math competition benchmark into live software is not a single leap. Near outlines three clear stages that any serious effort must pass through.
- Represent the program itself in precise mathematical language.
- Define the exact properties the code is supposed to satisfy.
- Construct and check proofs that those properties actually hold.
The recent benchmark success mainly advances the third stage. An AI agent can now propose proofs, receive feedback from a proof assistant, revise its attempt, and eventually produce something the logical kernel accepts. That is impressive. Yet the first two stages remain very much human-driven. You still need an accurate model of how the software behaves, and you still need to decide which properties are worth proving in the first place.
In practice this means a developer might prove that token balances are conserved during every successful transfer. That is valuable. It does not automatically prove that only authorized accounts can start those transfers. Separate properties require separate work. The guarantees are only as strong as the specifications you choose to encode.
What The $112 Result Actually Measured
Let’s look at the numbers more closely. Near AI reported solving 672 problems drawn from PutnamBench, a collection based on the famous undergraduate Putnam mathematics competition. The mean model cost came in around seventeen cents per problem at the prices used for the submission, totaling roughly one hundred twelve dollars.
A few caveats are worth noting. The public repository clarifies that the count includes 670 upstream problems plus corrected versions of two statements that had defective formalizations. The reported spending covers only the model usage for that particular run. It does not include the full cost of building the agent itself, nor does it estimate what it would cost to verify a production smart contract.
Later price lists for the same model family suggest the identical usage could cost around three hundred thirty-one dollars under different rate conditions. The methodology also counted unsuccessful attempts, which feels honest. Some proof searches ran for more than three days. Parallel experiments with another model family were deliberately excluded from the cost accounting.
Alongside the PutnamBench result, the team also reached first place by total solves on the Lean Eval v1 formalization leaderboard. That ranking measures cumulative success rather than first solves or unique contributions, but it still signals real capability.
How An AI Agent Works With Lean
Near relies on Lean, an open-source programming language and interactive proof assistant. The workflow is iterative and surprisingly human-like in structure.
An agent proposes a candidate proof. Lean attempts to check it. When the check fails, the agent reads the feedback, adjusts the strategy, and tries again. The critical safety property is that Lean’s trusted kernel ultimately decides whether the proof is valid according to its logical rules. The AI can suggest, but it cannot force acceptance of an invalid argument.
This separation matters. An unsuccessful search does not automatically mean the software is broken. The stated requirement might be incorrect, the implementation might violate a correct requirement, or the agent might simply have failed to find a valid proof that exists. Distinguishing among those cases still requires human judgment.
The future of AI, and AI-generated code, is exciting – but only once we achieve verifiable and mathematical guarantees of its behavior.
That statement from one of Near’s co-founders captures the motivation cleanly. As more code is written or suggested by large language models, the ability to verify critical properties becomes even more valuable. Formal methods offer one path toward those guarantees.
Complementing Rather Than Replacing Traditional Practices
Near is careful not to oversell the technology. Formal verification is presented as a complement to testing, code review, and operational security practices, not a replacement for them. That stance feels realistic.
A conventional test might check that transferring five tokens from Alice to Bob updates the balances correctly. A formal proof can establish that every successful transfer covered by the model preserves the combined balance of the two accounts. Both approaches are useful. Neither is complete on its own.
The same principle applies at the protocol level. Proving one accounting invariant does not magically secure an entire application. Developers still need to decide which properties matter most, encode them accurately, and keep the mathematical model aligned with the actual deployed code.
Existing Formal Work Inside The Ecosystem
Formal methods are not entirely new to projects built on Near. One lending protocol already received a detailed assessment that combined manual review of Rust contracts with formal specification and verification of its core market contract. The assessment identified both proven properties and issues that required attention. That kind of hybrid approach is likely to remain common even as AI assistance improves.
Other networks have also explored AI-assisted verification. Some teams focus on generating specifications that a specialized prover can then check. Others emphasize end-to-end reasoning from high-level requirements down to low-level implementation details. The common thread is a desire to raise the baseline of what “secure” means in practice.
Broader Security Research And Future Directions
Near’s interest in stronger guarantees extends beyond classical formal verification. Separate research has examined quantum-resistant signature schemes. One proposal selected a standardized lattice-based algorithm and outlined the coordinated changes that wallets, hardware devices, endpoints, and APIs would need to support. A testnet target was set for the middle of 2026, showing that the team is thinking about long-term cryptographic agility as well.
Taken together, the formal verification work and the quantum-resistant efforts paint a picture of a project that treats security as an ongoing research problem rather than a checkbox. That attitude is healthy in an industry where threats evolve quickly.
Practical Implications For Developers
What does all of this mean for someone writing smart contracts today? In the near term, the tools are still specialized. Most developers will continue to rely on audits, extensive testing, and careful design. Yet the cost curve is bending. If AI agents can reliably generate proofs for well-specified properties, more teams may begin incorporating formal methods into their development pipelines.
I’ve found that the biggest mental shift is learning to think in terms of properties rather than individual test cases. Instead of asking “does this particular transfer work?” you ask “does every possible transfer preserve the total supply?” That change in perspective alone can surface design issues earlier.
Of course the specifications themselves can contain mistakes. A proof only guarantees that the code matches the stated requirements. If the requirements are incomplete or incorrect, the proof simply confirms a flawed design. Human oversight remains essential.
The Limits Of Mathematical Guarantees
It is easy to fall in love with the idea of complete certainty. Formal methods deliver certainty only relative to a model and a set of assumptions. Real systems interact with external oracles, user interfaces, governance processes, and economic incentives that are harder to capture mathematically.
Perhaps the most interesting aspect is how these techniques interact with AI-generated code. Large language models can produce plausible-looking implementations very quickly. Without corresponding verification, the risk of subtle bugs rises. Combining generative models with proof assistants may eventually create a more balanced workflow: the AI proposes both the code and the proofs, while the trusted kernel keeps both honest.
That future is still emerging. The recent benchmark results are encouraging, but production-scale verification of an entire blockchain protocol remains a multi-year effort. Accurate models, carefully chosen properties, and continuous alignment with the live implementation will all be required.
How The Cost Structure Could Evolve
One hundred twelve dollars for hundreds of competition-level problems is a striking data point. Yet the full cost of a production effort includes far more than model inference. Specialist time spent writing specifications, reviewing models, and interpreting results still dominates. AI can reduce the search time for proofs, but it does not eliminate the need for domain expertise.
Over time we may see the balance shift. If agents become better at proposing useful specifications as well as proofs, the human role could move toward high-level guidance and final validation. That would make formal methods accessible to a wider group of developers. Whether that transition happens quickly or slowly is still an open question.
Comparing Approaches Across Ecosystems
Different blockchain communities emphasize different verification styles. Some focus on language-level features that make certain classes of bugs impossible by construction. Others invest heavily in external provers and specification languages. Near’s current research sits in the latter camp while remaining pragmatic about complementary practices.
There is no single correct answer. A language that prevents reentrancy by design is valuable. A proof that a complex financial invariant always holds is also valuable. The most robust systems will likely combine several layers of defense.
In my experience the projects that fare best treat security as a continuous process rather than a one-time event. Formal verification, when it becomes more affordable, fits naturally into that mindset. It becomes one more tool that teams can apply where the risk justifies the effort.
Looking Ahead At Protocol-Level Ambitions
Near has stated its intention to apply AI-assisted formal verification to the protocol itself and to core smart contracts, while also exploring tools that ecosystem developers can use. That dual focus is sensible. Strengthening the base layer benefits everyone. Providing practical tooling helps the broader community raise its own standards.
Success will depend on more than technical breakthroughs. Clear documentation, realistic expectations, and integration into existing development workflows will all matter. Developers are busy. Any new technique that adds friction without delivering clear value will struggle to gain adoption.
The early results suggest the cost side of the equation is improving faster than many expected. If the quality of generated proofs continues to rise, formal verification may gradually move from a specialized research activity into a more routine part of high-stakes smart contract development.
A Balanced View Of Progress
It is tempting to declare a new era every time an impressive benchmark appears. The more measured reaction is to recognize genuine progress while keeping the remaining challenges in sight. Generating proofs for competition mathematics is different from verifying a live financial protocol that handles real value under adversarial conditions.
Still, the direction is encouraging. Lower costs and stronger automation make it realistic to ask harder questions of the software we deploy. In an industry that has seen its share of expensive lessons, that capability is worth celebrating carefully.
The next months and years will show how effectively the research translates into production practice. For now the signal is clear: the tools for mathematical certainty are becoming more accessible, and at least one major protocol is preparing to put them to work on its own critical systems.
Whether you are building on Near or simply watching the broader security landscape, the development is worth following. Stronger proofs will not eliminate every risk, but they can raise the floor for what we consider acceptable assurance. In a space where trust is both essential and fragile, that improvement matters.
Formal verification has always promised more than testing alone can deliver. The recent results suggest that promise is moving closer to everyday reach. The real test will be how thoughtfully the community applies the new capabilities once they become practical at scale.
Until then, the combination of careful specification, AI-assisted proof search, and traditional engineering discipline remains the most reliable path forward. Near’s experiment is one data point among many, yet it is a particularly interesting one because it ties ambitious research directly to the security of a live network and its core contracts.
That connection between abstract mathematics and deployed code is where the lasting value will be found. The $112 figure captures attention. The deeper story is the gradual democratization of techniques that once belonged only to a small group of specialists. If that trend continues, the entire ecosystem stands to benefit.