Skip to content

Informational - Tranche tokens not compliant with ERC4626 #48

@kitty-the-kat

Description

@kitty-the-kat

The tranche is described as providing a wrapper to the underlying ERC4626 tokens, but does not currently support ERC4626 itself. SeniorTranche and JuniorTranche do not implement certain ERC4626 functions.

Technical Details

To clarify, the tranche tokens do not currently implement ERC4626 but the documentation uses the word "ERC4626 wrapper" when describing the tranche, which could be misleading. GVault and tranche tokens import the same ERC4626 to implement basic ERC4626 support. GVault overrides many virtual functions from this import to implement them correctly according to ERC4626 specifications, but GTranche does not. The functions that should be implemented in GTranche to comply with ERC4626 include:

  • mint()
  • deposit()
  • withdraw()
  • redeem()
  • convertToShares()
  • convertToAssets()
  • maxRedeem()
  • previewRedeem()
  • maxWithdraw()
  • previewWithdraw()
  • maxMint()
  • previewMint()
  • maxDeposit()
  • previewDeposit()

Impact

Informational.

Recommendation

Consider updating the documentation to remove the word "wrapper" and to clarify that the tranche tokens are not exactly ERC4626 tokens themselves but rather ERC20 tokens.

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