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

Represent GRG Staking Proxy balances as ERC4626 #37

Open
gabririgo opened this issue Mar 6, 2024 · 0 comments
Open

Represent GRG Staking Proxy balances as ERC4626 #37

gabririgo opened this issue Mar 6, 2024 · 0 comments

Comments

@gabririgo
Copy link
Contributor

gabririgo commented Mar 6, 2024

Summary

Represent GRG staking proxy user balances as ERC4626 to allow easier and better data display by service providers.

Motivation

External applications now cannot see a wallet's staked GRG balance (vault balance plus unclaimed rewards). This requires developing a custom extension to service providers like DefiLlama or Zapper.
ERC4626 provides a standard for vaults, which exposes methods that return the underlying token balance. By implementing this standard, external service providers could display staked GRG in a user's wallet and their $ value. This would be particularly useful for Etherscan display, where it is not possible to develop a custom smart contract position fetcher.

Specification

  • use OpenZeppelin ERC4626 standard;
  • import interface methods;
  • use their implementation;
  • do not implement transfer, transferFrom and approve methods as GRG staked positions are non-transferable.

Notice: assert ERC-4626 inflation attack cannot be executed.

Notes

OpenZeppelin reference code
ERC-4626 inflation attacks

@gabririgo gabririgo changed the title feat: Represent staking proxy balances as ERC4626 feat: Represent GRG Staking Proxy balances as ERC4626 Mar 6, 2024
@gabririgo gabririgo changed the title feat: Represent GRG Staking Proxy balances as ERC4626 feat(staking): Represent GRG Staking Proxy balances as ERC4626 Mar 6, 2024
@gabririgo gabririgo changed the title feat(staking): Represent GRG Staking Proxy balances as ERC4626 Represent GRG Staking Proxy balances as ERC4626 Mar 6, 2024
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