HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
pirapira
ethereum-formal-verification-overview
Finance & Commerce2017–2018
pirapira / ethereum-formal-verification-overview

ethereum-formal-verification-overview

The start page about my efforts around smart contract verification

3Distinct people
3Mentions
0Explicit recommenders
295GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The start page about my efforts around smart contract verification

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week3 dated mentions

Observed mentions: 2017-07-24 16:39:25 UTC to 2018-02-20 07:35:08 UTC. Weeks start Monday, UTC.

0122017-07-24 00:00:00 UTC to 2017-07-31 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsJul 242017-07-31 00:00:00 UTC to 2017-08-07 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-08-07 00:00:00 UTC to 2017-08-14 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-08-14 00:00:00 UTC to 2017-08-21 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-08-21 00:00:00 UTC to 2017-08-28 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-08-28 00:00:00 UTC to 2017-09-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-09-04 00:00:00 UTC to 2017-09-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-09-11 00:00:00 UTC to 2017-09-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-09-18 00:00:00 UTC to 2017-09-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-09-25 00:00:00 UTC to 2017-10-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-02 00:00:00 UTC to 2017-10-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-09 00:00:00 UTC to 2017-10-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-16 00:00:00 UTC to 2017-10-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-23 00:00:00 UTC to 2017-10-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-10-30 00:00:00 UTC to 2017-11-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-11-06 00:00:00 UTC to 2017-11-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsNov 62017-11-13 00:00:00 UTC to 2017-11-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-11-20 00:00:00 UTC to 2017-11-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-11-27 00:00:00 UTC to 2017-12-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-04 00:00:00 UTC to 2017-12-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-11 00:00:00 UTC to 2017-12-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-18 00:00:00 UTC to 2017-12-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-12-25 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2018-01-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-08 00:00:00 UTC to 2018-01-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-15 00:00:00 UTC to 2018-01-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-22 00:00:00 UTC to 2018-01-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-29 00:00:00 UTC to 2018-02-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-02-05 00:00:00 UTC to 2018-02-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-02-12 00:00:00 UTC to 2018-02-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-02-19 00:00:00 UTC to 2018-02-26 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 19

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jul 242017-07-24 00:00:00 UTC2017-07-31 00:00:00 UTC202
Jul 312017-07-31 00:00:00 UTC2017-08-07 00:00:00 UTC000
Aug 72017-08-07 00:00:00 UTC2017-08-14 00:00:00 UTC000
Aug 142017-08-14 00:00:00 UTC2017-08-21 00:00:00 UTC000
Aug 212017-08-21 00:00:00 UTC2017-08-28 00:00:00 UTC000
Aug 282017-08-28 00:00:00 UTC2017-09-04 00:00:00 UTC000
Sep 42017-09-04 00:00:00 UTC2017-09-11 00:00:00 UTC000
Sep 112017-09-11 00:00:00 UTC2017-09-18 00:00:00 UTC000
Sep 182017-09-18 00:00:00 UTC2017-09-25 00:00:00 UTC000
Sep 252017-09-25 00:00:00 UTC2017-10-02 00:00:00 UTC000
Oct 22017-10-02 00:00:00 UTC2017-10-09 00:00:00 UTC000
Oct 92017-10-09 00:00:00 UTC2017-10-16 00:00:00 UTC000
Oct 162017-10-16 00:00:00 UTC2017-10-23 00:00:00 UTC000
Oct 232017-10-23 00:00:00 UTC2017-10-30 00:00:00 UTC000
Oct 302017-10-30 00:00:00 UTC2017-11-06 00:00:00 UTC000
Nov 62017-11-06 00:00:00 UTC2017-11-13 00:00:00 UTC000
Nov 132017-11-13 00:00:00 UTC2017-11-20 00:00:00 UTC000
Nov 202017-11-20 00:00:00 UTC2017-11-27 00:00:00 UTC000
Nov 272017-11-27 00:00:00 UTC2017-12-04 00:00:00 UTC000
Dec 42017-12-04 00:00:00 UTC2017-12-11 00:00:00 UTC000
Dec 112017-12-11 00:00:00 UTC2017-12-18 00:00:00 UTC000
Dec 182017-12-18 00:00:00 UTC2017-12-25 00:00:00 UTC000
Dec 252017-12-25 00:00:00 UTC2018-01-01 00:00:00 UTC000
Jan 12018-01-01 00:00:00 UTC2018-01-08 00:00:00 UTC000
Jan 82018-01-08 00:00:00 UTC2018-01-15 00:00:00 UTC000
Jan 152018-01-15 00:00:00 UTC2018-01-22 00:00:00 UTC000
Jan 222018-01-22 00:00:00 UTC2018-01-29 00:00:00 UTC000
Jan 292018-01-29 00:00:00 UTC2018-02-05 00:00:00 UTC000
Feb 52018-02-05 00:00:00 UTC2018-02-12 00:00:00 UTC000
Feb 122018-02-12 00:00:00 UTC2018-02-19 00:00:00 UTC000
Feb 192018-02-19 00:00:00 UTC2018-02-26 00:00:00 UTC101

What Hacker News says

3 sources
So this was Figure 6: bytes20 prev; function tap(bytes20 nickname) { prev = nickname; if (prev != nickname) { msg.sender.send(this.balance); } } It sounds like with our buggy-compiler-optimisation hat on, nickname might be a value with more than 20 bytes, and the line `prev = nickname` is really doing something closer to `prev := truncate_to_20_bytes(nickname)`. And maybe under the hood a bytes20 is encoded as a fixed-length value of 32 bytes with 12 trailing zeros. Then `prev != nickname` is comparing their representations as full fixed-length arrays of 32 bytes. http://solidity.readthedocs.io/en/develop/types.html#fixed-s... From http://solidity.readthedocs.io/en/develop/bugs.html it reads as if this was bug "CleanBytesHigherOrderBits" fixed in "0.3.3". So I guess this is just a compiler bug, but on the other hand p
Read the rest
erhaps it's a bit of a "language smell" that we're writing code in a language that is obsessed with counting how many bytes are in each variable - it isn't super surprising that there are going to be defects related to lower-level memory things that aren't superficially obvious from the code. edit: the Solidity page on security considerations mentions formal verification http://solidity.readthedocs.io/en/develop/security-considera... > Using formal verification, it is possible to perform an automated mathematical proof that your source code fulfills a certain formal specification. The specification is still formal (just as the source code), but usually much simpler. That kind of thing doesn't sound like it would have helped here, as the defect doesn't appear to be in the program itself, but in the translation of the problem from solidity into the EVM. it looks like there's at least one person looking into if it is possible to do formal verification that would include the translation from solidity to EVM : https://github.com/pirapira/ethereum-formal-verification-ove...
In Finding the Greedy, Prodigal, and Suicidal Contracts at Scale
The specification of EVM in HOL exists already [1] and can be used to prove correctness of EVM code already. EVM is pretty low-level, though; the same can't be done for Solidity code. Yoichi has a page that outlines his thinking about what Ethereum's formal verification needs are [2]. What I would like to see is a verified high-level smart contract language layered on top of the Ethereum stack, allowing non-logicians to put together contracts that mean what they think they mean. See [3]. [1]: https://github.com/pirapira/eth-isabelle [2]: https://github.com/pirapira/ethereum-formal-verification-ove... [3]: http://lambda-the-ultimate.org/node/5003#comment-94645
In A hacker stole $31M of Ether – how it happened, and what it means for Ethereum
Some pointers you might appreciate: Jack Petterson and Robert Edström did a master's thesis about retargeting the Idris compiler to emit EVM code, with a custom effect type to express smart contract effects. They ended up modestly skeptical of functional programming as a paradigm for EVM, instead looking toward process calculi. https://publications.lib.chalmers.se/records/fulltext/234939... Yoichi Hirai's summary of his research into Ethereum formal verification as a full-time formal methods researcher at the Foundation: https://github.com/pirapira/ethereum-formal-verification-ove... See especially his formalization of the EVM as Hoare triples in Lem, which is usable from Isabelle: https://github.com/pirapira/eth-isabelle -- very cool stuff, although I have to say that the ostensible complexity and difficulty of his proof verifying an utt
Read the rest
erly simple wallet contract makes me a bit skeptical of this approach to smart contract correctness: https://github.com/pirapira/eth-isabelle/blob/master/example...
In Learn Ethereum smart contract programming

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.