Closed sherlock-admin closed 1 year ago
Considering as a valid informational. Non compliance with EIP is only med/high if shown explicitly how it will affect external integrations which strongly require the compliance.
This is an incorrect/outdated comment. It has been removed in https://github.com/equilibria-xyz/perennial-mono/pull/194
Brenzee
medium
BalancedVault.sol
does not comply with ERC4626 standardSummary
BalancedVault.sol
NetSpec comments show, that BalancedVault isERC4626 vault that manages a 50-50 position between long-short markets of the same payoff on Perennial.
, butBalancedVault
does not comply with ERC4626 standard.Vulnerability Detail
All of the missing details, what is required for an ERC4626 vault
previewDeposit
deposit
has to return shares asuint256
maxMint
,previewMint
,mint
functionsmaxWithdraw
,previewWithdraw
,withdraw
functionspreviewRedeem
,redeem
functionsImpact
Users who expect
BalancedVault.sol
to comply with ERC4626 standard will have limited functionality because some functions do not return correct values and some are missing.Code Snippet
https://github.com/sherlock-audit/2023-05-perennial/blob/0f73469508a4cd3d90b382eac2112f012a5a9852/perennial-mono/packages/perennial-vaults/contracts/balanced/BalancedVault.sol#L1
Tool used
Manual Review
Recommendation
Make sure that
BalancedVault.sol
complies with ERC4626 by fixing the listed issues.