I need help with one of my smart contracts. I wrote a smart contract that have functions that only emit events. The parameters of each event are some of the functions parameters. I want to ask if anyone has in mind any possible vulnerability that might occur. Maybe a gas problem or any other attack or vulnerability as I can not think of any. Thanks in advance for your help!

  • Please provide your contract code.
    – Morten
    Jan 17, 2021 at 20:30
  • @Morten why do you think the code of the contract will be useful? If a function only emits some the aprameters that are passed in the function could there be a possible vulnerability? Do you have somethingbin mind?
    – kathi
    Jan 17, 2021 at 23:12
  • Without contract code we can only speculate about any potential vulnerabilities.
    – Morten
    Jan 17, 2021 at 23:25
  • @morten. Yew that is what I am asking. If a funtion only emits an event could there exist a possible vulnerability? Can you think of any example? My contract has only functions like the following: funtion example(bytes32 a, bytes32 b) public{emit myEvent(a,b);}
    – kathi
    Jan 17, 2021 at 23:56

1 Answer 1


Since the address of the contract is included in the description of the event, you can always filter events by contract. Naturally, if you do not have enough gas, then events will not be created. Also, if you are using a alien node, then events can be faked in the channel between the node and the you application (MIM attack).

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.