You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Q: Is the code/contractexpectedtocomplywithanyEIPs? AretherespecificassumptionsaroundadheringtothoseEIPsthatWatsonsshouldbeawareof?
src/vault/LMPVault.solshouldbe4626compatible
But current implementation of preview function in LMPVault.sol : previewDeposit(), previewRedeem(), previewMint() are not EIP4626 compliant according to docs: https://eips.ethereum.org/EIPS/eip-4626
1 comment(s) were left on this issue during the judging contest.
Trumpero commented:
invalid, no impact. Fee will be minted for the sink so won't affect the shares/assets in preview function
sherlock-admin
changed the title
Custom Punch Piranha - LMPVault.sol does not match EIP4626 because of preview functions.
Nadin - LMPVault.sol does not match EIP4626 because of preview functions.
Oct 3, 2023
sherlock-admin
added
Reward
A payout will be made for this issue
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
and removed
Non-Reward
This issue will not receive a payout
Excluded
Excluded by the judge without consulting the protocol or the senior
labels
Oct 30, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
Nadin
medium
LMPVault.sol
does not match EIP4626 because ofpreview
functions.Summary
preview
function inLMPVault.sol
:previewDeposit()
,previewRedeem()
,previewMint()
are notEIP4626
compliant according to docs: https://eips.ethereum.org/EIPS/eip-4626Vulnerability Detail
previewDeposit()
,previewRedeem()
,previewMint()
must include fee in returned value:preview
functions inLMPVault.sol
does not match EIP4626.Impact
previewDeposit()
,previewRedeem()
andpreviewMint()
are not exactly return the same value as expected. Since fees areinvolving with it.
Code Snippet
https://github.com/sherlock-audit/2023-06-tokemak/blob/main/v2-core-audit-2023-07-14/src/vault/LMPVault.sol#L328-L330
https://github.com/sherlock-audit/2023-06-tokemak/blob/main/v2-core-audit-2023-07-14/src/vault/LMPVault.sol#L362-L364
https://github.com/sherlock-audit/2023-06-tokemak/blob/main/v2-core-audit-2023-07-14/src/vault/LMPVault.sol#L372-L374
Tool used
Manual Review and https://eips.ethereum.org/EIPS/eip-4626.
Recommendation
Use standared ERC4626 contract to implement those functions.
Duplicate of #577
The text was updated successfully, but these errors were encountered: