Thanks for pointing this out. While writing this ERC I was taking inspiration from ERC-7540, and was trying to maintain backwards compatibility with it. ERC-7540 itself maintain a backwards compatibility with ERC-4626 with the same method:
All ERC-7540 asynchronous tokenized Vaults MUST implement ERC-4626 with overrides for certain behavior described below.
Asynchronous deposit Vaults MUST override the ERC-4626 specification as follows:
- The
depositandmintmethods do not transferassetsto the Vault, because this already happened onrequestDeposit.previewDepositandpreviewMintMUST revert for all callers and inputs.Asynchronous redeem Vaults MUST override the ERC-4626 specification as follows:
- The
redeemandwithdrawmethods do not transfersharesto the Vault, because this already happened onrequestRedeem.- The
ownerfield ofredeemandwithdrawSHOULD be renamed tocontroller, and the controller MUST bemsg.senderunless thecontrollerhas approved themsg.senderas an operator.previewRedeemandpreviewWithdrawMUST revert for all callers and inputs.
Would you recommend I should follow the same pattern (I agree that overriding so many methods to maintain backwards compatibility doesn’t seem very helpful practically) or just remove the need for backwards compatibility with ERC-4626 and/or ERC-7540?
For more context, while ERC-4626 is very widely used, the concept of ERC-7540 is getting just as popular but I have seen zero implementations in production that exactly match that spec. Protocols implement async 4626 vaults in their own ways. Perhaps it could be because of the over specification of ERC-7540 and hence it’s better to not try to maintain backwards compatibility to a standard which not really used in production anywhere?
Relevant discussion: EIP-7540: Asynchronous ERC-4626 Tokenized Vaults - #25 by nikollamalic