-
Notifications
You must be signed in to change notification settings - Fork 6
new withdrawal flow #140
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
base: master
Are you sure you want to change the base?
new withdrawal flow #140
Conversation
| address[] calldata legacyWithdrawalAddresses, | ||
| uint256[] calldata legacyWithdrawalAmounts, | ||
| uint256 legacyClaimedAmount | ||
| ) internal initializer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's internal, why the 'initializer'?
|
|
||
| if (targetCapacity == 0) revert InceptionOnPause(); | ||
| if (receiver == address(0)) revert InvalidAddress(); | ||
| if (targetCapacity == 0) revert NullParams(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error name for (targetCapacity == 0) should be different than (iShares == 0)
| whenNotPaused | ||
| nonReentrant | ||
| { | ||
| function withdraw( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
withdraw implies that a certain amount of assets are to be withdrawn. However, the parameter here is in shares. I believe the name of this method should be changed to something like requestRedeem (Like in ERC7540 Async vault) to avoid confusing it with ERC4626 withdraw assets and synchronous 4626 redeem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like we requestRedeem and then redeem after being fulfilled.
projects/vaults/contracts/vaults/Symbiotic/InceptionVault_S.sol
Outdated
Show resolved
Hide resolved
|
|
||
| /** @dev See {IERC4626-previewDeposit}. */ | ||
| function previewDeposit(uint256 assets) public view returns (uint256) { | ||
| if (assets < depositMinAmount) revert LowerMinAmount(depositMinAmount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed since it is vault specific limit.
| function previewMint(uint256 shares) public view returns (uint256) { | ||
|
|
||
| uint256 assets = Convert.multiplyAndDivideCeil(shares, 1e18, ratio()); | ||
| if (assets < depositMinAmount) revert LowerMinAmount(depositMinAmount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be removed since this is vault specific limit
| * @param claimer Address to check claimable amount for | ||
| * @return Amount of claimable tokens for the specified address | ||
| */ | ||
| function claimableAmount(address claimer) public view virtual returns (uint256) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't fully understand purpose of this function. It is simply returning wstETH (or any asset) balance of a caller ?
| * @notice Returns the total amount available for withdrawal | ||
| * @return total Amount that can be claimed | ||
| */ | ||
| function claimableWithdrawalAmount() public view returns (uint256 total) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was single vault variant claimableWithdrawalAmount(address) removed ?
Tests/refactoring 3
Tests/refactoring: run config - phase 1
…dAmount functions are unused Remove legacy InVault_S_E2
withdrawal flow fixes after audit
No description provided.