DSS

DSS 2026 / Day 1 / Pearl Hall

Formal Verification in the Age of AI

Benjamin Flores

13:29 · Recording

Watch on YouTube ↗Open recording viewerOriginal programme entry
Download plain textDownload timestamped JSON

Source: YouTube automatic caption track · Exported 2026-11-16. Timestamps link to the source video. Cue end times were not supplied.

Transcript

0:00Hey.

0:01Hello everyone. Thanks for being here.

0:04So I'm Ben from Veridion, and today

0:07we're going to talk about formal

0:08verification.

0:10What we do first at Veridion is that we

0:12formally verify critical code.

0:14We work with great clients like Ethereum

0:15Foundation or Lido that I see here.

0:19And

0:20I heard a lot of things on Twitter

0:22recently about formal verification, good

0:24and bad stuff. Some people saying it's

0:26the it's going to fix all of our

0:28problems. Some people saying it's pure

0:29slop. So today I just wanted to

0:33re-explain where AI can help us on

0:35formal verification, where AI

0:38doesn't help us so much, where it

0:40changes things, and where we headed

0:42because we had access to

0:45Gemini Carbon recently that is like the

0:48next the last model from from Google.

0:51And they they gave us free free tokens.

0:54So we spent a lot and

0:57we we did a lot of benchmarks and some

0:58stuff to understand where formal

1:00verification is headed with the next

1:02frontier models. So I'm going to share a

1:04bit of that work after.

1:06Okay. So let's start.

1:08So just to explain what was formal

1:10verification before AI, I will

1:15summarize it in three steps. So the

1:17first step was

1:18like any software development, you write

1:21what you want to do

1:23in English specs. If you're Spanish, it

1:25can be English. If you're Spanish, it

1:27can be Spanish. Sorry. But the idea is

1:29that in a natural language you're going

1:31to write what you want to do.

1:33And

1:34this will be your specification, your

1:37architecture

1:38in English.

1:40Then the second step would be you're

1:42going to take this specification and

1:44you're going to try to formalize it

1:46under

1:47under a specification that is

1:49mathematic.

1:50So you're going to take for example a

1:52specification that is the beginning of

1:54all specification in

1:56industry which is for example my user

1:58doesn't lose money.

2:00And going to you're going to try to

2:01understand okay what does it mean uh in

2:04terms of variables in terms of

2:06mathematics my user doesn't use money

2:09uh so you're going to take for example

2:11oh it means that in my vault uh I do not

2:14create shares so you're going to write

2:16oh uh the variable share do not go up

2:19okay that's a that's a very easy example

2:21and this was pretty hard to do because

2:24you had to understand uh your whole

2:26system uh software engineer

2:29as a whole your solidity system or

2:31whatever system you you were building

2:33but also you had to had some I would say

2:36mathematical level to understand how can

2:38I translate this into a mathematical

2:40specification

2:42so this was pretty hard to do

2:43um then you had the proving side so now

2:47if I resume you have step one you have

2:49your specific specification in English

2:51then you have it in mathematics then you

2:53have to prove that your mathematical

2:55specification is correct on all states

2:58of uh of your code of your

3:00implementation and that was pretty hard

3:02to do um for several reasons so the

3:06first reason

3:07is

3:08uh that we had one main tool to prove

3:11code that was SMT solver uh and an SMT

3:14solver what it is is is a deterministic

3:16tool that will try to take your problem

3:19and um divide it into constraints and

3:23try to

3:24find a counter example to your

3:26specification so it's going to try to

3:28say your specification is false here is

3:31a counter example of your specification

3:33and

3:34the idea is that

3:36if it find a counter example then it's

3:38false you come back to the formalization

3:40you you you try you try to reprove again

3:43and if it passes you're good but the

3:45problem is

3:46I said hard or impossible because on

3:49non-linear code on difficult code

3:52it was pretty much impossible to uh

3:55uh decompose your problem into

3:57constraints you couldn't test all

3:59possibilities and find a counter example

4:01so you weren't able to fully formally

4:03verify your

4:05your code if you have some code that was

4:07that was difficult. So what you do is

4:09that in general what what was done is

4:12that you would adapt your code or at

4:14least the model of your code to the tool

4:17that you're using that is the prover and

4:19you're going to say okay this times out

4:21because it's too difficult let's make it

4:23a bit less difficult.

4:24So what you do actually what you we did

4:27in the past was it's too difficult let's

4:30make my code less difficult let's adapt

4:31the code to the test which is of course

4:34not the good way to do things. You want

4:36your test to test your code and not

4:39adapt your code to the test right?

4:41But I'm not I'm not criticizing it was

4:44very difficult again it was something

4:46very very difficult

4:48and sometimes even impossible.

4:51So that was before AI. Now what does AI

4:54change in the whole process? This is

4:57tool agnostic by the way this is like

4:59I'm describing the whole process without

5:01any names of tools just for it to be

5:04to be clear.

5:06So as said

5:07like

5:08at the end the formalization and the

5:10creation of the spec is the most

5:12important thing because

5:13you can prove something that we don't

5:15care about

5:17and it doesn't say that you do not have

5:19bugs you can prove some things you we

5:21don't care about you can forget to prove

5:23things. So the most the most difficult

5:26part was still the specification process

5:28but everything was hard in the process

5:30overall.

5:32And then

5:33well I explained already but the proof

5:36was hard for several reason and

5:38sometimes it was impossible.

5:40So now with AI so I'm going to come back

5:43here.

5:44This I said easy because

5:47it's like it's still the same thing and

5:50it was easy before but

5:52depends on your system of course you

5:53going to continue to write your

5:55specification in English and now we call

5:57this a prompt basically

5:59you describe your system in English what

6:01you want to do what it the guarantees

6:03you must hold etc.

6:05Now,

6:06the formalization of your spec it's not

6:09easy, very very easy, but it's easier

6:11because you do not need a lot of skills

6:15in mathematics to actually

6:17ask an AI and go back and forth and take

6:20an English specification and make it

6:22mathematics.

6:23This doesn't mean it's like very easy to

6:26fully cover your protocol with all of

6:28the specs you need. It means that the

6:30process of taking English to mathematics

6:32is easier with AI

6:34than than it was before. That's for

6:36sure.

6:37Now, this is where everyone is talking

6:39about formal verification on on X and on

6:42Twitter. It's basically because it

6:44changed a big thing here on the proving

6:46side.

6:47It unlocks a new way

6:49to do proving. So before, if I go back,

6:52I said hard or impossible because we use

6:55SMT solvers that are deterministic tools

6:58that cannot formally verify

7:01I would say non-linear code or difficult

7:03code.

7:06Here,

7:07we can still use SMT solvers and they

7:09work very well in some easy cases, but

7:11we can use another tool that is writing

7:14manually a proof as a mathematician

7:16would do

7:17for a theorem.

7:19And you I'm sure you heard about OpenAI

7:23and they're doing a lot of this

7:24actually. When they prove all of these

7:26theorems, they're basically sending a

7:28bunch of LLMs and they're saying to

7:30these LLMs, please prove this theorem

7:32using this and this hint. Please try to

7:34prove that it's correct. And the LLM is

7:36going to use classical mathematical

7:38techniques and write, oh, if this, then

7:41we could infer that, etc. etc. etc.

7:43because the LLM has been trained on all

7:45of the mathematics of the world and is

7:47better than 10 PhDs at mathematics. So

7:50now basically what was impossible before

7:53because we didn't have infinite money to

7:55pay mathematical PhDs

7:57is possible now to prove using a

8:00classical mathematical proof way because

8:03we have infinite infinite money to pay

8:06PhDs in mathematics because they are

8:07very very cheap and they run in data

8:09center in Texas.

8:11So

8:12we can now use this new technique. So

8:14it's unlocks

8:16a new way to prove and this is why

8:18everyone is talking about formal

8:19verification on X. It's not because like

8:23formalization is now easier,

8:25it's because we can unlock a new way to

8:28prove things which means we can prove

8:30every code that is correct.

8:34And that's that's why everyone is

8:35talking about it. On the formalization

8:37part, on the spec part, it helps but as

8:39it helps on every software engineering

8:41task.

8:43And now what's left for us, the human?

8:47This is still, as said before, this is

8:49still the most complicated thing to do

8:51is to ensure that the specs

8:55that you've written in English and in

8:56mathematics

8:58have a full coverage of your code, that

9:00you completely understand your code and

9:02your system and you're able to describe

9:05it

9:06fully so you do not miss anything.

9:09And that's still the most complicated

9:11part. Now if if

9:14these models are capable of proving

9:16things that no mathematicians

9:18ever found,

9:19maybe they're also capable of doing

9:21that.

9:22And that's why we try to understand by

9:26partnering with with Gemini. Thanks to

9:29them for giving $400,000

9:31worth of tokens.

9:33And

9:36now where where we headed? So as said,

9:38we got the future access on the on on

9:41every Gemini models in the last few

9:42months and we tested with a lot of

9:45tokens if these models are good at

9:48proving we already know. OpenAI has

9:50found that, we has found that. It's

9:52really really easy to prove but are they

9:54good at completely

9:56understanding the whole

9:58the the the whole

10:00the whole architecture you have and

10:02speaking everything that you're doing.

10:05It's actually like close to very very

10:07good and close to like human experts to

10:10be honest, especially if you

10:13contextualize it in a way that makes

10:15sense. Um, so I I do not have data here

10:18unfortunately because

10:19well they gave us the tokens but they do

10:21not gave us the the right to spend to to

10:24share the information yet, but I I can

10:26share orally. Um,

10:28so it's very good at finding gaps in

10:31existing specification. So if you give a

10:34context and say to the model with a

10:35freight model you're going to give oh

10:37look at that, look at all of this

10:39specification for this exact freight, do

10:41you think it's it's like full and

10:43correct? It's going to find gaps.

10:46In general these gaps are are are very

10:49good and it's also very good writing

10:52specs from scratch by just reading the

10:54code. Ideally you want to to write all

10:56the specs before doing any code and

10:59ideally you you have like your whole

11:01spec

11:03ready before doing any code and you

11:04launch that to the AI

11:06but

11:07it's still good at like going on the

11:10other way around which is reading your

11:11code, understanding what you're trying

11:13to do, writing the specs out of that

11:16and this is like very good at

11:18understanding

11:19misalignment in the architecture.

11:22So the the conclusion of that for us is

11:25that

11:26to us at least the the future of vibe

11:29coding or the future of coding with AI

11:31includes formal verification in some way

11:34because

11:35these models are really really good at

11:38implementing but the bottleneck is the

11:41review, is the fact that when these

11:44models are creating a bunch of slope you

11:46do not know exactly if this slope is

11:47correct. You can do some end-to-end

11:49tests but you will never

11:51you will never get the full length of it

11:54but with formal verification you can

11:55just shrink enormously the review by

11:58just reviewing the spec

12:00which permits you

12:02to then have a proof that the

12:03implementation follow the spec so you

12:05can have trust in your code and trust on

12:07the output of the AI. So we think at the

12:10end we're going to

12:12rewrite our

12:14at least um use

12:17formal formal verification native

12:19languages or make our current languages

12:21native for formal verification in some

12:24way so we can vibe code like this which

12:25is are giving all the specs to the AI.

12:27The AI doesn't even like give me the

12:30code but just give me a proof that it

12:33matches the specification I give I gave

12:35the AI.

12:37Um and we are doing a tooling that is

12:41like following this vision that's called

12:42Verity as the name of the company and

12:45it's a small lean eDSL so basically lean

12:48is the programming language for

12:49mathematics.

12:50Um and the idea is that it's following

12:53all of the vision that I had described

12:54you before. Uh you can either import

12:56your Solidity deterministically and try

12:59to formally verify it with this new

13:01method of proving not with SMT solvers

13:03uh or you can directly vibe code using

13:06Verity and it's going to compile to

13:08bytecode and it's going to

13:10Verity which is lean at the end of the

13:11day. It's going to compile to bytecode

13:13and you can deploy your smart contracts

13:15directly in a fully uh

13:17lean native way or formal verification

13:19native way.

13:21Um and yeah that's uh that's it. Thank

13:24you for listening and uh have a good

13:25day. Be safe out there.

Source and accuracy details

Source export SHA256: be430943ac68cec879aac41c29c6e434d51b5363cd95ccf3a4882690b74a3cd7