Skip to content

Represent GRG Staking Proxy balances as ERC4626 #37

@gabririgo

Description

@gabririgo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions