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

no upper bound on royaltyPercent #35

Closed
code423n4 opened this issue Jul 8, 2022 · 1 comment
Closed

no upper bound on royaltyPercent #35

code423n4 opened this issue Jul 8, 2022 · 1 comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Warden finding duplicate Another warden found this issue

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-07-fractional/blob/e2c5a962a94106f9495eb96769d7f60f7d5b14c9/src/FERC1155.sol#L223

Vulnerability details

no upper bound on royaltyPercent

https://github.com/code-423n4/2022-07-fractional/blob/e2c5a962a94106f9495eb96769d7f60f7d5b14c9/src/FERC1155.sol#L223

description

the function setRoyalties() in FERC1155.sol does not have a sanity check for the value that can be set for royaltyPercent[_id]

royalties can potentially be set to over 100% which will make the user lose funds

recommendation

set a upper bound for _percentage in setRoyalties()`

@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Warden finding labels Jul 8, 2022
code423n4 added a commit that referenced this issue Jul 8, 2022
@0x0aa0 0x0aa0 added the duplicate Another warden found this issue label Jul 18, 2022
@0x0aa0
Copy link
Collaborator

0x0aa0 commented Jul 18, 2022

Duplicate of #166

@0x0aa0 0x0aa0 marked this as a duplicate of #166 Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Warden finding duplicate Another warden found this issue
Projects
None yet
Development

No branches or pull requests

3 participants