# \`ERC20Votes\` in \`wizard.openzeppelin.com\`: bug or feature?

**URL:** <https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971>\
**Category:** Contracts\
**Tags:** erc20\
**Created:** [September 22, 2021, 7:00pm UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971 "2021-09-22T19:00:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandichef](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pandichef](https://forum.openzeppelin.com/u/pandichef)\
**Post date:** [September 22, 2021, 7:00pm UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971/1 "2021-09-22T19:00:30Z")

</div>

I'm setting up a new governance token using the Open Zeppelin wizard. When I click _Votes_, the contract adds `ERC20Votes` in the inheritance tree as expected. However, it also adds `ERC20Permit` automatically (even if _Permit_ remains unchecked).

Is this a feature or a bug? If it's a feature, why is `ERC20Permit` coupled with `ERC20Votes`? Is using `ERC20Permit` considered best practice in 2021?

---

<div class="post-metadata">

**Author:** ![STYJ](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@STYJ](https://forum.openzeppelin.com/u/STYJ)\
**Post date:** [September 23, 2021, 5:24am UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971/2 "2021-09-23T05:24:14Z")

</div>

I can't answer your qn re. why permit is added w/ votes but I can answer your question on if permit is best practice.

I won't consider it to be best practice but it is definitely a nice to have feature. It allows you to do `transferFrom` without first having to call a separate `approve` txn i.e. it helps to improve UX by combing 2 steps into 1.

---

<div class="post-metadata">

**Author:** ![Amxx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amxx/32/668_2.png) [@Amxx](https://forum.openzeppelin.com/u/Amxx)\
**Post date:** [September 23, 2021, 9:43am UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971/3 "2021-09-23T09:43:23Z")

</div>

Hello @pandichef

ERC20votes require support for ERC712 signatures (for the signed delegation mechanism). This means we have to include the EIP712 base contract and include a nonce system. ERC20Votes does both of these so its simpler to just include it.

We could have included EIP712 and a nonce system without inheriting ERC20Permit, but that would have been an issue is someone decided to get both ERC20Votes and ERC20Permit in the same instance as the two nonces systems would have clashed 😕

---

<div class="post-metadata">

**Author:** ![pandichef](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pandichef](https://forum.openzeppelin.com/u/pandichef)\
**Post date:** [September 24, 2021, 2:59am UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971/4 "2021-09-24T02:59:00Z")

</div>

I see. Aside from gas and contract size, is there any downside to creating an ERC-20 token that inherits from `ERC20Permit`?

---

<div class="post-metadata">

**Author:** ![Amxx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amxx/32/668_2.png) [@Amxx](https://forum.openzeppelin.com/u/Amxx)\
**Post date:** [September 27, 2021, 8:39am UTC](https://forum.openzeppelin.com/t/erc20votes-in-wizard-openzeppelin-com-bug-or-feature/15971/5 "2021-09-27T08:39:11Z")

</div>

There is a cost penalty when deploying the contract, not when using it. I honestly don't see any downside to having the feature.
