Pith. sign in

REVIEW 3 major objections 6 minor 11 references

FSM Modeling For Off-Blockchain Computation

T0 review · 3 major / 6 minor · reviewed 2026-08-07 · deepseek-v4-flash

Pith's one-line read The author claims that the parts of a smart contract worth moving off-chain can be found automatically as simple subgraphs of its FSM graph—connected subgraphs with one entry and one exit—and that a gas-based cost model then decides…

desk verdict The core idea is sensible, but the central algorithm has a concrete bug and there is no implementation or data to back it up; this reads like a thesis draft rather than a rigorous research contribution. read the letter →

arxiv 2506.02086 v1 pith:OMCHJLYZ submitted 2025-06-02 cs.DC cs.SE

classification cs.DCcs.SE
keywords finitestatemachinesmartcontractoff-chaincomputationsimplesubgraphblockchaincostmodelseparationofconcernshierarchical
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

Blockchain smart contracts are cheap to trust but expensive to run, so the idea is to execute some parts off-chain. This thesis claims that the decision of which parts can be off-chained can be made automatically, at design time, from the graph of the contract's finite state machine. The algorithm looks for simple subgraphs—connected groups of states with exactly one entry and one exit—because their computation is self-contained until the exit transition, and therefore can be delegated and summarized at the boundary. The paper also supplies an interface protocol for on-chain/off-chain handoff and a gas-based cost model that tells a developer when the off-chain move actually saves money. If this is right, off-chaining stops being an ad hoc developer judgment and becomes a systematic, automatable step in smart-contract design.

What carries the argument

The load-bearing object is the simple subgraph: a connected subgraph of the FSM graph with exactly one entry node (no internal node except the entry has edges from outside the subgraph) and exactly one exit node (no internal node except the exit has edges to outside). This single-entry/single-exit property means execution inside the subgraph is informationally sealed until the exit transition, so its entire run can be summarized by inputs at the entry and outputs at the exit. Algorithm 4 uses brute-force subset enumeration plus an isSimpleSubgraph test; Theorem 1's overlap claims organize the results into a containment count so candidates containing other candidates are presented first. The interface protocol and gas model are secondary machinery built on that boundary property.

What would settle it

Build an FSM with states A, B, C, E, and D and transitions A->B->E->D and A->C->E->D. Two simple subgraphs are {A,B,E,D} and {A,C,E,D}; their intersection {A,E,D} is disconnected, so Theorem 1's claim that the shared nodes form a simple subgraph fails, and the count-based ordering of Algorithm 4 is unsupported on this graph.

Watch

Extended reading notes

Core claim

On the paper's own terms, the central discovery is that the vague notion of a pattern worth processing off-chain has a graph-theoretic characterization: a simple subgraph of the FSM state graph, i.e., a connected subgraph whose only connection to the outside world is one entry state and one exit state. Algorithm 4 enumerates all subsets of states, keeps those that pass the simple-subgraph test, and for each one counts how many other simple subgraphs it contains, yielding an order in which the developer should consider candidates. The paper further claims that once a simple subgraph is selected, its execution can be replaced by a hierarchical state-machine node, that an automatically generated interface can move the computation off-chain and back with attestation by affected parties, and that an analytical gas-cost model can determine whether the off-chain path is cheaper than the on-chain path. The escrow-deposit example is used to show the cost model can reject an off-chain candidate when on-chain data must be read repeatedly.

Load-bearing premise

The counting and ordering step in Algorithm 4 depends on a geometric fact about the FSM graph: any two candidate subgraphs that share more than one state must share a connected block of states that itself has one entry and one exit. That fact fails for a diamond-shaped graph where two parallel paths share only the start, the finish, and one middle state.

Editorial extensions

If this is right

  • If the algorithm is correct, the what-to-move-off-chain question reduces to scanning the FSM graph for simple subgraphs; no semantic analysis of method bodies is needed for candidate identification.
  • Because of the single-entry/single-exit property, any off-chain execution can be bracketed: blockchain data is read at the entry, cached off-chain, and written back with attestation at the exit.
  • The interface protocol implies each off-chain candidate needs only two generated hooks—an event that carries parameters plus blockchain data into the bridge, and a completion event that carries attested results back.
  • If a chosen simple subgraph contains smaller simple subgraphs, those are off-chained automatically, which reduces the developer's decision set to maximal candidates first.
  • The escrow-deposit gas calculation shows the method can reject a candidate: when off-chain processing must read on-chain balances, the SLOAD and SSTORE costs make off-chaining more expensive than staying on-chain.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The simple-subgraph criterion is graph-structural, not blockchain-specific; the same single-entry/single-exit test could identify delegable units in state-machine models of other replicated systems, provided the boundary can be summarized.
  • The paper's Theorem 1 overlap claim is the fragile point; a modified algorithm that checks connected overlap, or that simply omits the count-based ordering, would preserve the main idea while escaping the diamond counterexample.
  • The cost model is static and linear; an immediate extension—weighting each pattern method by invocation frequency and measuring real EVM gas with a compiler—would turn the illustrative arithmetic into a decision tool.
  • The paper's own caveat that attestation semantics are application-specific suggests a natural next step: classify off-chain candidates by whether their results are digitally signable evidence, since only those preserve trust when the exit transition writes back.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

3 major / 6 minor

Summary. The manuscript, a Master's thesis, proposes a three-part framework for moving parts of smart-contract computation off-chain: (i) an algorithm (Algorithm 4) that identifies "simple subgraphs" in the FSM graph of a smart contract, defined as connected subgraphs with a single entry node and a single exit node; (ii) an interface model for on-chain/off-chain interaction, including a bridge process and a data structure for off-chain storage; and (iii) a cost model, illustrated with Ethereum gas costs, to help decide when off-chaining a pattern is beneficial. The central algorithmic claim is that Algorithm 4, using the helper isSimpleSubgraph, successfully finds all simple subgraphs, and Theorem 1 is used to characterize the relationships among simple subgraphs in support of the ordering/counting logic.

Significance. If correct, the framework would offer a design-time, systematic method for identifying off-chain computation candidates, building on FSM-based smart-contract generation and separation of concerns. The interface and cost models address practically relevant aspects of blockchain scalability. However, the central algorithm contains a demonstrable correctness bug, and the supporting theorem is false as stated; these flaws directly undermine the paper's main contribution. The paper also claims empirical verification without providing an implementation or results, so the central claims are not currently substantiated.

major comments (3)
  1. [§4.2.1, Fig. 4.2 (helper isSimpleSubgraph)] The helper does not enforce the single-entry/single-exit property because it overwrites S_start and S_end instead of accumulating the set of nodes with external incoming/outgoing edges. Concretely, for S'={A,B,C} with transitions X->A, A->B, B->C, D->C, and A->Y (with X, D, Y outside S'), the function sets S_start=C (overwriting A), S_end=A, skips both A and C in the final loop, checks only B, and returns true even though both A and C are entry nodes. Algorithm 4 would therefore present this non-simple subgraph as an off-chain candidate, directly contradicting the claim that it finds all simple subgraphs. The helper also never checks connectivity of S', which is part of the definition of a simple subgraph.
  2. [Chapter 4, Theorem 1 (page 32)] The proof of Theorem 1 assumes that the intersection of two connected subgraphs is connected: "Clearly there must be an edge between some nodes s1 and s2 in S' as otherwise S' would not be connected and neither would be S1 and S2." This is false. In a diamond graph with nodes A, B, C, D and edges A->B, A->C, B->D, C->D, the simple subgraphs S1={A,B,D} and S2={A,C,D} share {A,D}, which contains no edge and is disconnected. Hence Theorem 1(b)(i) is false, and the claimed classification of overlap relationships between simple subgraphs is unsupported. Since the paper uses this theorem to justify the ordering/counting logic of Algorithm 4, the theoretical foundation for the 'what to off-chain' contribution is invalid.
  3. [§4.4] The statement that "we verified the results by running the algorithm on many use-cases and verified that Algorithm 4 found all simple-subgraphs successfully" is not accompanied by any implementation, pseudocode execution trace, dataset, or reproducible artifact. Given the concrete counterexample to isSimpleSubgraph described above, this verification claim is not credible as written and would need to be substantiated by a corrected algorithm and by execution results, likely including machine-checked enumeration on representative FSM graphs.
minor comments (6)
  1. [Fig. 4.4 (Algorithm 4)] Line 7 iterates "For each Sx in L" but L is never defined; presumably this should be Y. Please correct the undefined variable.
  2. [§3.3 and Fig. 4.2] The definition of simple subgraph requires connectivity, but the prose in §3.3 lists only the entry/exit/internal properties and does not explicitly restate connectivity; the helper should check it directly.
  3. [§5.1] The phrase "off-chain execution cannot not access" should read "cannot access".
  4. [§5.3] There is a typo in the pseudocode: "if (state state==’sex’)" has a duplicated "state" and uses non-ASCII quotation marks; please clean up the formatting.
  5. [§6.2.4] The cost model multiplies gas constants (SLOAD=200, SSTORE=20000) by a factor M described as "the size of state variables," but the units of M are not specified; clarify whether M is the number of 32-byte words or an arbitrary scaling factor, since EVM gas costs are per word, not per arbitrary data size.
  6. [§3.2] The subsection numbering is duplicated: there are two subsections labelled 3.2.1, which should be renumbered sequentially.

Circularity Check

0 steps flagged · score 2.0 of 10

No circular derivation chain; the only same-author citation (Bodorik, Liu and Jutla 2021) supports the interface model but is not load-bearing.

full rationale

The paper's central derivation is self-contained rather than circular. The simple-subgraph detection algorithm (Algorithm 4, Fig. 4.4) is a brute-force enumeration of subsets of FSM states filtered by the three graph properties defined in Section 3.3: one entry node, one exit node, and internal-only connections for all other nodes. The output is therefore defined by those stated properties, not fitted to or derived from the output itself, so no prediction reduces to an input by construction. The cost model in Chapter 6 is built from externally documented EVM gas costs (Tables 6.1-6.3) and is applied honestly to the escrow deposit example, where it concludes that moving that particular pattern off-chain is not cost-effective; this indicates the model has independent content rather than being rigged to confirm the paper's preferences. The FSM-to-smart-contract transformation is attributed to Mavridou and Laszka (2018), an external source, and the HSM definition is attributed to Yannakakis (2000). The only same-author citation is Bodorik, Liu, and Jutla (2021), used in Chapter 5 for the on/off-chain interface; the thesis itself specifies the interface protocol in detail, so the self-citation is not the load-bearing argument. Section 7.1 honestly acknowledges that the cost model ignores method-invocation frequency, and Section 1.3 disclaims concrete trust-preservation solutions; these are limitations, not circularity. The Theorem 1 proof gap and the isSimpleSubgraph pseudocode bug identified by the skeptic are correctness concerns about whether the algorithm implements its specification, but they are not instances of a result being equivalent to its inputs by definition or by self-citation.

Assumptions & free parameters 0 free parameters · 6 assumptions · 4 invented entities

The paper's contributions rest on modeling choices (FSM representation, simple-subgraph criterion) and on external constants (Ethereum gas costs) rather than fitted parameters. No code or data is provided, so the axioms are unverified assumptions. The invented entities are conceptual components of the proposed interface and storage model; none are backed by independent evidence outside the paper.

assumptions (6)
  • domain assumption Smart contracts can be accurately modeled as FSMs with states and transitions.
    Stated in Chapter 3.1 and used throughout. Cites Mavridou and Laszka for the approach.
  • ad hoc to paper A simple subgraph with one entry, one exit, and all other nodes internal is a suitable unit for off-chain processing.
    Introduced in Section 3.3 as the key graph property. The paper argues for it but does not prove that this property is necessary or sufficient for beneficial off-chaining.
  • domain assumption The FSM graph is connected and has no unreachable states.
    Stated in Chapter 4 before Algorithm 4: 'We assume that S is a connected graph representing an FSM that does not have any unreachable states.'
  • domain assumption Off-chain computation results can be made trustworthy through attestation by affected actors.
    Assumed in Chapter 5 and 6; the paper acknowledges it does not provide a concrete solution and that it depends on application semantics.
  • domain assumption Ethereum gas costs for SLOAD (200) and SSTORE (20000) are correct and stable.
    Used in Section 6.2.4 as the basis for the cost model, cited from Palau (2018) and the Ethereum Yellow Paper.
  • ad hoc to paper Each state in a pattern reads and writes a state variable of the same size M.
    Made in Section 6.2.4 to simplify the gas calculation: 'assuming that each state has relatively the same size M of state variables to read or update.'
invented entities (4)
  • offChain state variable
    purpose: Stored on the blockchain to indicate whether subsequent smart contract method invocations should be executed on-chain or off-chain.
    Introduced in Section 5.2 as a new global variable; no implementation or empirical validation is provided.
  • Bridge process
    purpose: A process that waits for events, invokes the corresponding off-chain method, and marshals results back to the on-chain contract.
    Described in Section 5.2 and Figure 5.1(c); presented as a conceptual component, not implemented.
  • attestResults method
    purpose: Collects digital signatures from affected actors to verify off-chain computation results before they are recorded on-chain.
    Mentioned in Section 5.2 and used in the cost model; its behavior is not specified beyond a boolean check.
  • Off-chain data structure with TransactionID, addresses, signatures, and transition parameters
    purpose: Persists and verifies records of off-chain computation on both on-chain and off-chain storage.
    Defined in Section 5.5 and Figure 5.4; no reference to a deployed system or implementation.

how reviews work

0 comments
Cite this review

Pith. "Pith review of FSM Modeling For Off-Blockchain Computation." pith.science (2026). https://pith.science/paper/OMCHJLYZ

@misc{pith2026250602086,
  author       = {Pith},
  title        = {Pith review of: FSM Modeling For Off-Blockchain Computation},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/OMCHJLYZ}},
  note         = {Machine review of arXiv:2506.02086}
}
read the original abstract

Blockchain benefits are due to immutability, replication, and storage-and-execution of smart contracts on the blockchain. However, the benefits come at increased costs due to the blockchain size and execution. We address three fundamental issues that arise in transferring certain parts of a smart contract to be executed off-chain: (i) identifying which parts (patterns) of the smart contract should be considered for processing off-chain, (ii) under which conditions should a smart-contract pattern to be processed off-chain, and (iii) how to facilitate interaction between the computation off and on-chain. We use separation of concerns and FSM modeling to model a smart contract and generate its code. We then (i) use our algorithm to determine which parts (patterns) of the smart contract are to be processed off-chain; (ii) consider conditions under which to move the pattern off-chain; and (iii) provide model for automatically generating the interface between on and off-chain computation.

Figures

Figures reproduced from arXiv: 2506.02086 by the authors.

Figure 2
Figure 2. [PITH_FULL_IMAGE:figures/full_fig_p005_2.png] view at source ↗
Figure 4
Figure 4. [PITH_FULL_IMAGE:figures/full_fig_p005_4.png] view at source ↗
Figure 5
Figure 5. [PITH_FULL_IMAGE:figures/full_fig_p005_5.png] view at source ↗
Figures from the paper (10 more)
Figure 3
Figure 3. Figure 3: as [PITH_FULL_IMAGE:figures/full_fig_p023_3.png]
Figure 3
Figure 3. Figure 3: illustrates Algorithm 1, which has as input an FSM F, a description of the full [PITH_FULL_IMAGE:figures/full_fig_p024_3.png]
Figure 4
Figure 4. Figure 4: represents the state diagram and the simple [PITH_FULL_IMAGE:figures/full_fig_p044_4.png]
Figure 5
Figure 5. Figure 5: (b) outlines amendments we make to the smart contract methods to facilitate the [PITH_FULL_IMAGE:figures/full_fig_p051_5.png]
Figure 5
Figure 5. Figure 5: (c) shows the script outline for the bridge process. It waits for the [PITH_FULL_IMAGE:figures/full_fig_p053_5.png]
Figure 5
Figure 5. Figure 5 [PITH_FULL_IMAGE:figures/full_fig_p055_5.png]
Figure 5
Figure 5. Figure 5: depicts the straightforward architecture of data exchange betw [PITH_FULL_IMAGE:figures/full_fig_p056_5.png]
Figure 6
Figure 6. Figure 6: (a) for the reader’s convenience. The [PITH_FULL_IMAGE:figures/full_fig_p064_6.png]
Figure 4
Figure 4. Figure 4: identifies [PITH_FULL_IMAGE:figures/full_fig_p066_4.png]
Figure 6
Figure 6. Figure 6 [PITH_FULL_IMAGE:figures/full_fig_p072_6.png]

Discussion (0). Sign in to comment.

Reference graph

Works this paper leans on

11 extracted references · 9 canonical work pages

  1. [1]

    Lelantos: A Blockchain-Based Anonymous Physical Delivery System,

    Asgaonkar A. & Krishnamachar B. (2019). Solving the Buyer and Seller's Dilemma: A Dual -Deposit Escrow Smart Contract. IEEE Int. Conf. on Blockchain and Cryptocurrency (ICBC). 262-267. AlTawy R., ElSheikh M., Youssef A. M. and Gong G. (2017). "Lelantos: A Blockchain-Based Anonymous Physical Delivery System," 2017 15th Annual Conference on Privacy, Securit...

  2. [6]

    How to time-stamp a digital document

    2021 Hammad, M. Cost Estimation Models in Software Engineering. geeksforgeeks.org. Retrieved from https://www.geeksforgeeks.org/cost-estimation-models-in-software-engineering/ on Jan. 15, 2021 Haber, S.; Stornetta, W. Scott (January 1991). "How to time-stamp a digital document". Journal of Cryptology. 3 (2): 99–111. CiteSeerX 10.1.1.46.8740. doi:10.1007/b...

  3. [7]

    Markus N. (2020). Towards Cross-Blockchain Smart Contracts. arxiv.org. Retrieved from https://arxiv.org/pdf/2010.07352.pdf on Jan. 15, 2021 Mavridou, A., & Laszka, A. (2018(a)). Designing Secure Ethereum Smart Contracts: A Finite State Machine Based Approach. Financial Cryptography. DOI: 10.1007/978-3-662-58387-6_28 Mavridou A., Laszka A. (2018(b)) Tool D...

  4. [9]

    47 pages. Roan, A. (2020). Proposing Future Ethereum Access Control. Medium.com. Retrieved from https://medium.com/coinmonks/proposing-future-ethereum-access-control-72e56e14e68e on Jan 05, 2020 74 Rajashekar G.S. and Dakshayini M. (2020) Blockchain Implementation of Letter of Credit based Trading system in Supply Chain Domain. 2020 International Conferen...

  5. [10]

    Business Process Models of Blockchain and South African Real Estate Transactions,

    Tilbury J. L., De la Rey E. and Van der Schyff K. (2019). "Business Process Models of Blockchain and South African Real Estate Transactions," 2019 International Conference on Advances in Big Data, Computing and Data Communication Systems (icABCD), Winterton, South Africa, 2019, pp. 1 -7, doi: 10.1109/ICABCD.2019.8851014. Wöhrer M. and Zdun U. (2018). "Des...

  6. [11]

    Hyperledger-fabric

    Write First App of Hyperledger. Hyperledger-fabric. Retrieved from https://hyperledger- fabric.readthedocs.io/en/release-2.2/write_first_app.html on Jan. 14, 2021 xDai Chain Network (2020). xDai Introduction. Retrived from https://www.xdaichain.com/ on Jan. 06, 2021 xDai vs Eth cost. medium.com. Retrieved from https://jaredstauffer.medium.com/what-is-xdai...

  7. [1987]

    Ethereum Chaincode

    Hyperledger Fabric (2018). Ethereum Chaincode. Retrived from https://openblockchain.readthedocs.io/en/latest/ on Jan. 06, 2021 Hyperledger Fabric (2018). How to deploy smart contracts on Hyperledger. ibm.com. Retrived from https://cloud.ibm.com/docs/blockchain-sw-213?topic=blockchain-sw-213-ibp-console-smart-contracts on Jan

  8. [2017]

    Eberhardt J., Jonathan H

    Lecture Notes in CS, 3-15, vol 10465, Springer. Eberhardt J., Jonathan H. (2018) Off-chaining Models and Approaches to Off-chain Computations. In Proceedings of the 2nd Workshop on Scalable and Resilient Infrastructures for Distributed Ledgers (SERIAL'18). 7–12. Frankenfield, J., Gas Definition. Investopedia.com. Retrieved from https://www.investopedia.co...

Show all 11 references
  1. [2018]

    Digitizing Invoice and Managing VAT Payment Using Blockchain Smart Contract,

    Lecture Notes in Computer Science, vol. 10804. Springer. 270-277. Minsu B. Elrond Interoperability with Ethereum & Compatible Chains via xDAI Token Bridge. elrond.com. Retrieved from https://elrond.com/blog/elrond-interoperability-with-ethereum-compatible- chains-via-xdai-toke...

  2. [2019]

    In Proceedings of the 2019 International Conference on Management of Data(SIGMOD '19)

    Towards Scaling Blockchain Systems via Sharding. In Proceedings of the 2019 International Conference on Management of Data(SIGMOD '19). Association for Computing Machinery, New York, NY, USA, 123–140. DOI:https://doi.org/10.1145/3299869.3319889 73 Harel D. (1987). Statecharts:...

  3. [2020]

    Ledger Insights. (2018). Letter of Credit blockchain launches with eight banks. Retrieved from https://www.ledgerinsights.com/blockchain-letter-of-credit-trade-finance-voltron/ on Nov 8,

Pith tools

Reviewed August 7, 2026 · model on record in the stance chip above.