REVIEW 3 major objections 2 minor 35 references
Constructing Trustworthy Smart Contracts
T0 review · 3 major / 2 minor · reviewed 2026-08-12 · deepseek-v4-flash
Pith's one-line read This paper introduces Asp, a smart-contract language whose safety proofs carry over to the compiled Solidity code, so that security can be verified before deployment.
desk verdict A well-written smart-contract language design whose central compilation-correctness guarantee is asserted, not proved, making the paper a promising proposal rather than a demonstrated system. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central mechanism is the combination of Asp's state-machine language over abstract data types, the cascade execution semantics, and the defensive compiler. The cascade semantics defines execution as a sequence of synchronized message exchanges starting from a quiescent configuration, using a pushdown stack of contract indices with at most R+1 occurrences of each index; R=1 blocks malicious reentrancy. The proof checker uses ghost variables and rank functions to discharge safety and reachability obligations, with lemmas checked by Viper/SMT.
What would settle it
A transaction of a compiled Asp contract that succeeds on the EVM but whose corresponding sequence of Asp transitions is not a valid cascade under the paper's semantics—for instance, a reentrant call into the same contract twice within one transaction that nevertheless commits—would refute Property 1. Concretely, one could instrument a compiled auction or EtherStore contract and attempt the classic reentrancy attack, checking whether the reentrancy counter ever allows a second reentry.
Extended reading notes
Core claim
The paper's central claim is Property 1: for Asp contracts C1...Cn and their compiled Solidity counterparts S1...Sn, every successful transaction of the compiled contracts corresponds to a successful cascade of the Asp contracts. As a corollary, every safety property of an Asp contract is a safety property of the compiled contract. The argument rests on a cascading, single-threaded execution semantics for Asp that is deliberately designed to mirror EVM transaction execution, with a pushdown stack and a reentrancy limit R=1 that blocks the classic reentrancy attack while still allowing one message-response exchange. The defensive compiler enforces this semantics by checking guards, reverting on undefined operations, and inserting a reentrancy counter.
Load-bearing premise
The cascade semantics, including the pushdown stack and the reentrancy limit, is assumed to match how the compiled Solidity actually executes on the Ethereum Virtual Machine, including reverts and the inserted reentrancy counter, but the paper gives no formal proof of that match.
Editorial extensions
If this is right
- A safety property proved on an Asp contract does not need to be re-proved for the compiled Solidity code, assuming the defensive compiler preserves the cascade semantics.
- The reentrancy limit of one allows a message-response interaction but blocks the unlimited reentrancy used in DAO-style attacks.
- Because arithmetic is mathematical in Asp, overflow and undefined operations are handled by runtime defensive checks that revert the transaction, so the programmer can ignore them.
- The same verified Asp contract can be ported to multiple blockchains (e.g., Ink!/Rust) by recompiling, without redoing proofs.
- Deductive proofs are independently checkable by any participant, which fits the trustless Web3 setting.
Reading between the lines
- A formal connection between the cascade semantics and a concrete EVM semantics (e.g., KEVM) would turn the paper's correctness claim into a machine-checked theorem; the paper leaves this as the key missing link.
- The safety-transfer result might be extended to adversarial liveness only under an assumption that overflow and gas exhaustion never cause reverts; under that assumption the paper claims a bisimulation.
- The reentrancy limit of one may rule out legitimate contracts that require deeper call chains, suggesting a parameterized R or a more refined access-control mechanism as a future direction.
- The design could be applied to other security properties by adding new abstract types, such as commitments or randomness, which the paper explicitly mentions as planned work.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents Asp, a smart-contract development system combining a high-level state-machine language with abstract data types (coins, tokens, timers, addresses), a defensive compiler that translates Asp to Solidity with runtime checks against overflow, undefined operations, coin-conservation and reentrancy, and a proof checker that verifies user-supplied safety, reachability, and adversarial-liveness properties by translation to Viper. The central claimed guarantee is Property 1 in Section 5: every successful transaction of the compiled contracts corresponds to a successful cascade of the Asp contracts, with the corollary that safety properties proved at the Asp level transfer to the deployed Solidity. The paper illustrates the language on an auction, a token bank, an Ether store, and a vending machine, and describes a prototype implementation.
Significance. If the central guarantee were established, Asp would be a significant contribution to the smart-contract verification literature: it offers a clean state-machine model, a library of high-level abstractions that eliminate entire classes of vulnerabilities by construction, a path to deductive verification using the existing Viper infrastructure, and a compiler that ports verified contracts to mainstream blockchains. The paper is generally clear and the examples are instructive. The prototype and the public example contracts are strengths, and the proof rules for safety and timer-based reachability are standard and plausible. However, the load-bearing compilation-correctness theorem is stated without proof, and the reentrancy-blocking claim is not correctly argued; these gaps prevent the paper from establishing its headline trust guarantee.
major comments (3)
- [Section 5, Property 1] Property 1 is the sole bridge between Asp-level proofs and guarantees about the compiled Solidity, but no proof is provided. The preceding paragraphs describe the compiler informally (messages to public methods, a private tau_closure method, low-level calls, and an inserted reentrancy counter) without defining a simulation relation between compiled Solidity states and Asp configurations, without showing that the reentrancy counter exactly enforces the recurrence limit R=1, and without relating Solidity call/return/revert behavior to the pushdown cascade semantics. The corollary that every Asp safety property is a safety property of the compiled contract therefore rests on an unproven assumption, as the paper itself acknowledges with 'assuming correct compilation.' This is a load-bearing gap for the paper's central claim.
- [Section 3.2 and Appendix A] The claim that 'Reentrancy attacks are blocked with R = 1 as it is impossible for an attacker contract to trigger an account withdrawal transition twice within a cascade' is not proven, and the illustrative trace in Appendix A misattributes the blocking of the attack. In the step-5 configuration the stack is [Attacker, Etherstore, Attacker]; at step 6, the attempted reentrant push is impossible because Etherstore is in ResetBalance, which has no matching input transition, not because the recurrence limit is exceeded. Indeed, with R=1 the semantics allows up to two occurrences of an index on the stack (as the trace itself shows with Attacker), so the statement that a withdrawal transition cannot be triggered twice is false as written. A precise security definition and a proof are needed, not an informal assertion.
- [Section 5, final paragraph] The paper first says compilation correctness is expressed as a language inclusion, then in the final paragraph claims the reverse direction ('every Asp contract cascade is matched by a successful transaction of the compiled code') and 'induces a bisimulation,' with no proof. This is a much stronger statement than Property 1 and is also needed for the claimed transfer of adversarial liveness and reachability properties. The qualifier 'under the assumption that arithmetic overflow or shortage of gas do not cause a transaction to revert' is not formalized; the Asp semantics does not model gas, so the condition cannot be checked or verified.
minor comments (2)
- [Throughout] The text contains several broken word-spacing artifacts (e.g., 'inAsp' on page 5, 'theAsp' on page 3) and inconsistent code-label spacing in figures (e.g., 'ma xB id de r' in Figure 3); these should be cleaned up.
- [Sections 4.3 and Appendix B] The proof rule and soundness argument for adversarial liveness appear in both Section 4.3 and Appendix B with only minor differences; this duplication should be consolidated to avoid confusion about which proof system is implemented.
Circularity Check
No significant circularity: the verification rules are presented with soundness arguments, and the main compilation-correctness assumption, while unproved, is not a circular reduction.
full rationale
The paper's derivation chain is largely self-contained. The safety proof method is the standard automaton/product construction, and the paper proves the equivalence between safety of a computation and non-reachability of a rejecting automaton state. The timer-based reachability proof rule is accompanied by a direct soundness proof using well-founded ranks. The adversarial liveness proof rule is likewise justified by a soundness argument and a µ-calculus completeness framing; the citation to the second author's prior work is for inspiration only and is not the load-bearing justification. The language-level guarantees against overflow, out-of-bounds access, and reentrancy hold by construction of the Asp semantics and the inserted defensive checks, so they are not fitted inputs or self-referential predictions. The most significant potential concern is Property 1, the compilation-correctness assertion that every successful compiled transaction corresponds to a successful Asp cascade. This property is stated without proof, and the paper explicitly relies on 'assuming correct compilation' when transferring safety properties. That is a genuine evidential gap in the compilation argument, but it is not circularity: the paper does not define the compiled semantics so as to make the property true by definition, nor does it fit a parameter and then rename the fit as a prediction. Under the hard rule that circularity must be exhibited as a specific reduction, no circular step can be identified. Accordingly, the circularity score is 0.
Assumptions & free parameters
free parameters (1)
- Reentrancy limit R =
1
assumptions (5)
- domain assumption Mathematical (unbounded) integer arithmetic in Asp must be enforced at run time in compiled Solidity; overflow must cause a revert, consistent with language inclusion.
- domain assumption The cascade semantics with pushdown stack and recurrence limit R faithfully models the EVM execution of compiled contracts.
- domain assumption The reentrancy counter inserted by the compiler correctly enforces the R=1 limit in the compiled code.
- domain assumption The Viper verifier is sound for the generated lemmas and Hoare triples.
- domain assumption Transactions that revert on the blockchain leave state unchanged.
invented entities (4)
-
Coin abstract type
-
Token abstract type
-
Timer abstract type
-
Ghost variables
Cite this review
Pith. "Pith review of Constructing Trustworthy Smart Contracts." pith.science (2026). https://pith.science/paper/ACKPZHSN
@misc{pith2026241114563,
author = {Pith},
title = {Pith review of: Constructing Trustworthy Smart Contracts},
year = {2026},
howpublished = {\url{https://pith.science/paper/ACKPZHSN}},
note = {Machine review of arXiv:2411.14563}
}
read the original abstract
Smart contracts form the core of Web3 applications. Contracts mediate the transfer of cryptocurrency, making them irresistible targets for hackers. We introduce ASP, a system aimed at easing the construction of provably secure contracts. The Asp system consists of three closely-linked components: a programming language, a defensive compiler, and a proof checker. The language semantics guarantee that Asp contracts are free of commonly exploited vulnerabilities such as arithmetic overflow and reentrancy. The defensive compiler enforces the semantics and translates Asp to Solidity, the most popular contract language. Deductive proofs establish functional correctness and freedom from critical vulnerabilities such as unauthorized access.
Figures
Figures from the paper (3 more)
Reference graph
Works this paper leans on
-
[1]
Crypto investors lost nearly $4 billion to hack- ers in 2022. At https://www.cnbc.com/2023/02/04/ crypto-investors-lost-nearly-4-billion-dollars-to-hackers-in-2022. html
work page 2022
-
[2]
Hack3d: The web3 security report 2023. At https://www.certik.com/resources/ blog/7BokMhPUgffqEvyvXgHNaq-hack3d-the-web3-security-report-2023
work page 2023
-
[3]
SMTChecker and Formal Verification for Solidity. At https://docs. soliditylang.org/en/v0.8.23/smtchecker.html
-
[4]
Alpern, B., Schneider, F.B.: Defining liveness. Inf. Process. Lett. 21(4), 181–185 (1985)
work page 1985
-
[5]
Bernardo, B., Cauderlier, R., Hu, Z., Pesin, B., Tesson, J.: Mi-Cho-Coq, a Frame- work for Certifying Tezos Smart Contracts. In: FM Workshops (1). Lecture Notes in Computer Science, vol. 12232, pp. 368–379. Springer (2019)
work page 2019
-
[6]
Blackshear, S., Cheng, E., Dill, D.L., Gao, V., Maurer, B., Nowacki, T., Pott, A., Qadeer, S., Rain, Russi, D., Sezer, S., Zakian, T., Zhou, R.: Move: A Language With Programmable Resources, https://developers.diem.com/papers/diem-move- a-language-with-programmable-resources/2019-06-18.pdf
work page 2019
-
[7]
Br¨ am, C., Eilers, M., M¨ uller, P., Sierra, R., Summers, A.J.: Rich specifications for Ethereum smart contract verification. Proc. ACM Program. Lang. 5(OOPSLA), 1–30 (2021)
work page 2021
- [8]
Show all 35 references
-
[9]
ACM Trans
Coblenz, M., Oei, R., Etzel, T., Koronkevich, P., Baker, M., Bloem, Y., My- ers, B.A., Sunshine, J., Aldrich, J.: Obsidian: Typestate and assets for safer blockchain programming. ACM Trans. Program. Lang. Syst. 42(3) (Nov 2020). https://doi.org/10.1145/3417516, https://doi.org...
2020 doi
-
[10]
In: TACAS (1)
Dill, D.L., Grieskamp, W., Park, J., Qadeer, S., Xu, M., Zhong, J.E.: Fast and Reliable Formal Verification of Smart Contracts with the Move Prover. In: TACAS (1). Lecture Notes in Computer Science, vol. 13243, pp. 183–200. Springer (2022)
2022
-
[11]
In: Chakraborty, S., Navas, J.A
Hajdu, ´A., Jovanovi´ c, D.: solc-verify: A modular verifier for Solidity smart con- tracts. In: Chakraborty, S., Navas, J.A. (eds.) Verified Software. Theories, Tools, and Experiments, Lecture Notes in Computer Science, vol. 12301, pp. 161–179. Springer (2020)
2020
-
[12]
Hildenbrandt, E., Saxena, M., Rodrigues, N., Zhu, X., Daian, P., Guth, D., Moore, B.M., Park, D., Zhang, Y., Stefanescu, A., Rosu, G.: KEVM: A complete formal semantics of the ethereum virtual machine. In: CSF. pp. 204–217. IEEE Computer Society (2018)
2018
-
[13]
In: Financial Cryptography
Mavridou, A., Laszka, A.: Designing Secure Ethereum Smart Contracts: A Fi- nite State Machine Based Approach. In: Financial Cryptography. Lecture Notes in Computer Science, vol. 10957, pp. 523–540. Springer (2018)
2018
-
[14]
In: Financial Cryptography
Mavridou, A., Laszka, A., Stachtiari, E., Dubey, A.: VeriSolid: Correct-by-Design Smart Contracts for Ethereum. In: Financial Cryptography. Lecture Notes in Com- puter Science, vol. 11598, pp. 446–465. Springer (2019)
2019
-
[15]
In: VMCAI
M¨ uller, P., Schwerhoff, M., Summers, A.J.: Viper: A verification infrastructure for permission-based reasoning. In: VMCAI. Lecture Notes in Computer Science, vol. 9583, pp. 41–62. Springer (2016) 21
2016
-
[16]
In: CA V
Namjoshi, K.S.: Certifying model checkers. In: CA V. Lecture Notes in Computer Science, vol. 2102, pp. 2–13. Springer (2001)
2001
-
[17]
In: POPL
Necula, G.C.: Proof-carrying code. In: POPL. pp. 106–119. ACM Press (1997)
1997
-
[18]
In: FSTTCS
Peled, D.A., Pnueli, A., Zuck, L.D.: From falsification to verification. In: FSTTCS. Lecture Notes in Computer Science, vol. 2245, pp. 292–304. Springer (2001)
2001
-
[19]
In: IEEE Symposium on Security and Pri- vacy (2020)
Permenev, A., Dimitrov, D., Tsankov, P., Drachsler-Cohen, D., Vechev, M.: Verx: Safety verification of smart contracts. In: IEEE Symposium on Security and Pri- vacy (2020)
2020
-
[20]
Sergey, I., Nagaraj, V., Johannsen, J., Kumar, A., Trunov, A., Hao, K.C.G.: Safer smart contract programming with Scilla. Proc. ACM Program. Lang.3(OOPSLA), 185:1–185:30 (2019)
2019
-
[21]
In: IEEE Symposium on Secu- rity and Privacy (2021)
Stephens, J., Ferles, K., Mariano, B., Lahiri, S., Dillig, I.: Smartpulse: Automated checking of temporal properties in smart contracts. In: IEEE Symposium on Secu- rity and Privacy (2021)
2021
-
[22]
In: PriSC (2024), at https://arxiv.org/pdf/2311
Sun, H., Singh, K., Ramos-D´ avila, J.P., Aldrich, J., DiVincenzo, J.: Gradual ver- ification for smart contracts. In: PriSC (2024), at https://arxiv.org/pdf/2311. 13351.pdf
2024
-
[23]
In: CA V (1)
Zhong, J.E., Cheang, K., Qadeer, S., Grieskamp, W., Blackshear, S., Park, J., Zohar, Y., Barrett, C.W., Dill, D.L.: The Move Prover. In: CA V (1). Lecture Notes in Computer Science, vol. 12224, pp. 137–150. Springer (2020) 22 A Cascade semantics and reentrancy The cascade sema...
2020
-
[24]
Attacker is pushed onto the stack, and Attacker’s state is updated to CollectDeposit
Environment Input, via Attacker . Attacker is pushed onto the stack, and Attacker’s state is updated to CollectDeposit
-
[25]
Etherstore is pushed onto the stack
Synchronized Push. Etherstore is pushed onto the stack. Attacker’s state is updated to Etherstore Deposit, and Etherstore’s state is updated to Accept- Deposit
-
[26]
Attacker is now at the top of the stack
Pop. Attacker is now at the top of the stack
-
[27]
Etherstore is pushed onto the stack
Synchronized Push . Etherstore is pushed onto the stack. Attacker’s state is updated to EtherstoreWithdraw, and Etherstore’s state is updated to WithdrawRequested
-
[28]
Attacker is pushed onto the stack (with Attacker at the bottom of the stack as well)
Synchronized Push. Attacker is pushed onto the stack (with Attacker at the bottom of the stack as well). Since R = 1, this is allowed. Attacker’s state is updated to AcceptReturn, and Etherstore’s state is updated to ResetBal- ance
-
[29]
Note that this is where Attacker attempts to maliciously reenter Ether- store
Pop. Note that this is where Attacker attempts to maliciously reenter Ether- store. This reentrancy is blocked, because the limit of R = 1 is exceeded. Attacker is popped off the stack
-
[30]
Etherstore’s state is up- dated to GaveWithdrawal, and then to AcceptDeposit
Local τ -Move, followed by another Local τ -Move. Etherstore’s state is up- dated to GaveWithdrawal, and then to AcceptDeposit
-
[31]
Etherstore is popped off the stack
Pop. Etherstore is popped off the stack
-
[32]
Attacker is prevented from requesting another withdrawal, since its balance has already been reset
Pop. Attacker is prevented from requesting another withdrawal, since its balance has already been reset. Attacker is therefore popped off the stack, and we return to a quiescent configuration. The reentrancy limit allows for an exchange of message and response, but prevents th...
-
[33]
θ is an invariant of the contract M ,
-
[34]
ρ is defined for all states in θ, and
-
[35]
The soundness of this proof rule is established as follows
For every state s in θ, one of the following holds: (a) s satisfies q, or (b) There is a transition for the Player to a state s′ that is in θ, and the rank decreases strictly after that transition, or (c) Some Opponent transition is enabled and all Opponent transitions lead to...
Reviewed August 12, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.