no upper bound on royaltyPercent #35
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
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()
inFERC1155.sol
does not have a sanity check for the value that can be set forroyaltyPercent[_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()`The text was updated successfully, but these errors were encountered: