Non Reentrant
Overview
Protected Attack Vector
How It Works
Properties
Name
Type
Description
Security Lifecycle
Source Code
Last updated
This policy prevents a consumer from re-entering the same method of a your smart contracts in a single transaction - which is a well-known attack vector called Reentrancy.
This policy protects agains reentrancy attacks.
When a transaction reaches the policy, it keeps track of the fact that the consumer has visited the method currently being executed.
If the method is called again by the consumer before exiting, the policy will block the transaction.
If not, once the currently-executing method has finished, we clear the visitation count for the consumer.
hasEnteredConsumer
mapping
(address => bool)
a mapping of consumers that have visited the currently-executing method
This policy runs during both the Firewall's Pre Execution and the Post Execution hooks.
On our GitHub repository: NonReentrantPolicy.sol
Last updated