Skip to content
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

LibBasketStorage exitFeeBeneficiaryShare comment is misleading #104

Closed
code423n4 opened this issue Dec 17, 2021 · 2 comments
Closed

LibBasketStorage exitFeeBeneficiaryShare comment is misleading #104

code423n4 opened this issue Dec 17, 2021 · 2 comments
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

Comments

@code423n4
Copy link
Contributor

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 for exitFeeBeneficiaryShare:
https://github.com/code-423n4/2021-12-amun/blob/main/contracts/basket/contracts/facets/Basket/LibBasketStorage.sol#L18

While actually behavior for entryFeeBeneficiaryShare and exitFeeBeneficiaryShare is the same, they just mint the corresponding share to the feeBeneficiary:

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

@code423n4 code423n4 added 1 (Low Risk) Assets are not at risk. State handling, function incorrect as to spec, issues with comments bug Something isn't working labels Dec 17, 2021
code423n4 added a commit that referenced this issue Dec 17, 2021
@0xleastwood
Copy link
Collaborator

This looks like its intended.

@0xleastwood 0xleastwood added the invalid This doesn't seem right label Jan 23, 2022
@0xleastwood
Copy link
Collaborator

I misread this issue. Actually a duplicate of #79

@0xleastwood 0xleastwood added duplicate This issue or pull request already exists and removed invalid This doesn't seem right labels Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants