How can I instrument the EVM bytecode for runtime monitoring? Is there any technique or implementation for that?

  • we aren't using these words like "instrumentation" here, please translate what you mean by that
    – Nulik
    Feb 10, 2021 at 16:08
  • also define: monitoring
    – Nulik
    Feb 10, 2021 at 16:09
  • I want to do concolic testing for EVM bytecode. According to what I understand about a concolic testing, we have to instrument the code before analyzing it. So, I use the word instrumentation. And for monitoring I meant concolic testing based on the instrumented code and monitor for existing vulnerabilities. I would be glad to correct me If I am wrong about this concept .@Nulik
    – MARiiii
    Feb 10, 2021 at 16:41
  • I have been working with assembly language for years, and this is the first time I hear about conocolic testing or instrumentation. I can say for sure that nobody does this. So you better write a specific request on what do you want to do.
    – Nulik
    Feb 10, 2021 at 16:56
  • tell your teacher that theory is different from practice
    – Nulik
    Feb 10, 2021 at 17:01

1 Answer 1


I think what you're looking for is something that will create an intermediate representation (IR) between Solidity and EVM bytecode, and which will act as a high-level assembly equivalent which you can instrument, rather than instrumenting the EVM bytecode itself. (There are a few common tools for doing this in the wider world, such as LLVM which is used in C instrumentation.)

I'm not sure what is commonly used in the Ethereum ecosystem, but there are several papers detailing techniques. See, for example: SIF: A Framework for Solidity Contract Instrumentation and Analysis


Actually it looks like a tool called Zeus will now create LLVM bitcode from Solidity, so that might be a place to start.

  • That is really helpful and similar to the work done in C. But, what if I want to instrument the bytecode itself, something like binary or bytecode instrumentation in C? Is there any tool for that? @Richard Horrocks
    – MARiiii
    Feb 11, 2021 at 4:33
  • @richard Horrocks, please explain what you mean by "you can instrument, rather than instrumenting the EVM bytecode itself". I don't know what is instrument and what is instrumentation. Please define these words without using them in the defnition. This paper "ContractFuzzer: Fuzzing Smart Contracts for Vulnerability Detection" uses the "instrument" and "instrumentation" terms witout defining them.
    – zak100
    Jul 28, 2023 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.