# Why does Synthetixio's staking contract need reentrancy guard?

**URL:** <https://forum.openzeppelin.com/t/why-does-synthetixios-staking-contract-need-reentrancy-guard/29224>\
**Category:** Smart Contracts\
**Created:** [May 31, 2022, 1:58am UTC](https://forum.openzeppelin.com/t/why-does-synthetixios-staking-contract-need-reentrancy-guard/29224 "2022-05-31T01:58:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zesl](https://avatars.discourse-cdn.com/v4/letter/z/898d66/32.png) [@zesl](https://forum.openzeppelin.com/u/zesl)\
**Post date:** [May 31, 2022, 1:58am UTC](https://forum.openzeppelin.com/t/why-does-synthetixios-staking-contract-need-reentrancy-guard/29224/1 "2022-05-31T01:58:04Z")

</div>

> <https://github.com/Synthetixio/synthetix/blob/develop/contracts/StakingRewards.sol>

This is their staking contract, for example, `stake()` doesn't seem to need reentrancy guard? There's no ETH transaction involved in there. What kind of function could trigger it twice without the reentrancy guard?

---

<div class="post-metadata">

**Author:** ![asato](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@asato](https://forum.openzeppelin.com/u/asato)\
**Post date:** [May 31, 2022, 12:26pm UTC](https://forum.openzeppelin.com/t/why-does-synthetixios-staking-contract-need-reentrancy-guard/29224/2 "2022-05-31T12:26:43Z")

</div>

yes. you are right. 🙂

---

<div class="post-metadata">

**Author:** ![Team\_X](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/team_x/32/10471_2.png) [@Team\_X](https://forum.openzeppelin.com/u/Team_X)\
**Post date:** [May 31, 2022, 2:57pm UTC](https://forum.openzeppelin.com/t/why-does-synthetixios-staking-contract-need-reentrancy-guard/29224/3 "2022-05-31T14:57:22Z")

</div>

I guess it's just a extra layer of "security" but probably just a waste of extra gas
