Closed sherlock-admin4 closed 4 months ago
1 comment(s) were left on this issue during the judging contest.
infect3d commented:
make no sense__ there cannot be rounding error if 'func(a) equal a'
Invalid per described in the documentation. shares represent how many assets an account has deposited, so they are 1:1 on deposit
. Since there are no calculations here, rounding is not required
AuditorPraise
medium
prizeVault.previewDeposit()
andprizeVault.previewMint()
don't comply to ERC4626 standardSummary
prizeVault.previewDeposit()
andprizeVault.previewMint()
don't comply to ERC4626 standardVulnerability Detail
According to the contest readme, the PrizeVaults is expected to strictly comply with the ERC4626 standard BUT
prizeVault.previewDeposit()
andprizeVault.previewMint()
don't.prizeVault.previewDeposit()
is supposed to round down andprizeVault.previewMint()
is supposed to round up.source: https://eips.ethereum.org/EIPS/eip-4626
prizeVault.previewDeposit()
andprizeVault.previewMint()
are doing 1:1 on deposits and on mintImpact
prizeVault.previewDeposit()
andprizeVault.previewMint()
don't comply to ERC4626 standardCode Snippet
https://github.com/sherlock-audit/2024-05-pooltogether/blob/main/pt-v5-vault/src/PrizeVault.sol#L453
https://github.com/sherlock-audit/2024-05-pooltogether/blob/main/pt-v5-vault/src/PrizeVault.sol#L459
Tool used
Manual Review
Recommendation
in
prizeVault.previewDeposit()
round down.in
prizeVault.previewMint()
round up