Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request, add vanilla ERC20 without EIP-2612 (PERMIT) to token library #403

Open
eugenioclrc opened this issue Dec 12, 2023 · 0 comments

Comments

@eugenioclrc
Copy link
Contributor

I propose the addition of a "Vanilla" ERC20 contract to the Solmate token contract library, specifically one that excludes the EIP-2612 (PERMIT) implementation.

Rationale:

In a recent exploration of a protocol, i discovered that OZ implementation was better than Solmate. Mainly because the protocol needs to deploy multiple tokens and using the current Solmate ERC20 implementation incurs higher byte-size and consequent deployment costs compared to the OpenZeppelin implementation. This is primarily due to the inclusion of EIP-2612 (PERMIT) functionality in Solmate's ERC20 contract. While Solmate's ERC20 might offer more cost-effective interactions post-deployment, the initial deployment cost is a critical factor for protocols requiring the deployment of multiple tokens.

Proposed Solution:

Introduce a streamlined version of the ERC20 contract within the Solmate library. This version would exclude the EIP-2612 (PERMIT) feature, thereby reducing the contract's byte size and lowering deployment costs. This "Vanilla" ERC20 contract would cater to use cases where the PERMIT functionality is not required, offering a more cost-efficient solution for such scenarios.

Benefits:

  • Reduced Deployment Costs: A smaller contract size directly translates to lower gas costs during deployment, which is especially beneficial for projects deploying multiple tokens.
  • Flexibility: By offering both the full-featured ERC20 and a "Vanilla" version, Solmate can cater to a broader range of use cases and developer preferences.

I believe this addition would significantly enhance the utility and appeal of the Solmate library, especially for projects with specific deployment cost constraints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant