LibBasketStorage exitFeeBeneficiaryShare comment is misleading #104
Labels
1 (Low Risk)
Assets are not at risk. State handling, function incorrect as to spec, issues with comments
bug
Something isn't working
duplicate
This issue or pull request already exists
Handle
hyh
Vulnerability details
Impact
Comment doesn't match actual behavior
Proof of Concept
The comment says
amount of exit fee that goes to the pool itself
forexitFeeBeneficiaryShare
:https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/facets/Basket/LibBasketStorage.sol#L18
While actually behavior for
entryFeeBeneficiaryShare
andexitFeeBeneficiaryShare
is the same, they just mint the corresponding share to thefeeBeneficiary
:entryFeeBeneficiaryShare
https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L173
exitFeeBeneficiaryShare
https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/facets/Basket/BasketFacet.sol#L218
Recommended Mitigation Steps
Update either the comment or the behavior
The text was updated successfully, but these errors were encountered: