FERC1155 royalty should be limited to prevent potential underflows #239
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
old-submission-method
Lines of code
https://github.com/code-423n4/2022-07-fractional/blob/main/src/FERC1155.sol#L223
Vulnerability details
Impact
Generally, when accessing the contract's royalties, the caller will use the following schema:
If the royalty is larger than 100%, the last line will trigger an underflow.
Proof of Concept
https://github.com/code-423n4/2022-07-fractional/blob/main/src/FERC1155.sol#L223
Allows the controller to set whatever value they want.
Tools Used
none
Recommended Mitigation Steps
Use a reasonable limit, e.g. 10%
The text was updated successfully, but these errors were encountered: