-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Open
Milestone
Description
🧐 Motivation
ERC4626 directly interacts with the ERC20 tokens in the _deposit
and _withdraw
functions. This requires one to override and not call super if they are changing how underlying assets are managed.
📝 Details
SafeERC20.safeTransfer(IERC20(asset()), receiver, assets); |
SafeERC20.safeTransferFrom(IERC20(asset()), caller, address(this), assets); |
Would prefer if these lines instead called another internal function, which is dedicated to doing transfer in and outs. The specific usecase I'm working with the vault is staking the tokens in another contract. I assume this is a relatively common usecase. We should strive for super to always be called for _deposit
and _withdraw
.
gonzaotc
Metadata
Metadata
Assignees
Labels
No labels