# What is the gas overhead of ReentrancyGuard?

**URL:** <https://forum.openzeppelin.com/t/what-is-the-gas-overhead-of-reentrancyguard/29742>\
**Category:** Contracts\
**Created:** [June 17, 2022, 8:13pm UTC](https://forum.openzeppelin.com/t/what-is-the-gas-overhead-of-reentrancyguard/29742 "2022-06-17T20:13:05Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [July 14, 2022, 10:09pm UTC](https://forum.openzeppelin.com/t/what-is-the-gas-overhead-of-reentrancyguard/29742/6 "2022-07-14T22:09:09Z")

</div>

status = 1 is only an SLOAD. But the value is read before for the require statement.

The cost breakdown will be:

1. Warm up storage slot: 2000
2. SLOAD: 100
3. SSTORE: 2900
4. SSTORE: 100, refunds 2800

So roughly it will be 2300 = 2000 + 100 + 2900 + 100 - 2800. However, the refund is capped at 20% of the total cost of a transaction, so -2800 may not fully realize and the net cost may be higher.

---

_[View the full topic](https://forum.openzeppelin.com/t/what-is-the-gas-overhead-of-reentrancyguard/29742)._
