Open code423n4 opened 2 years ago
Yes, these are valid points and something we will consider revisiting in the future.
RE recommendations: 1) This can only impact < 0.01% of the payment so not a concern ATM. It may be more appropriate to better honor exact amounts, but it's a non-trivial change to an important code path so we will leave it as-is for now. With payments that small, it's probably more appropriate to be using a contract to manage the payouts - e.g. https://www.0xsplits.xyz/ could handle this well. 2) I agree. ATM we always enforce exactly 10% so that there is a consistent experience with our market and on our website. We will revisit this in the future, and the idea of capping it to 10% but accepting lower is a great one.
Lines of code
https://github.com/code-423n4/2022-02-foundation/blob/4d8c8931baffae31c7506872bf1100e1598f2754/contracts/mixins/NFTMarketCreators.sol#L65-L82
Vulnerability details
https://github.com/code-423n4/2022-02-foundation/blob/4d8c8931baffae31c7506872bf1100e1598f2754/contracts/mixins/NFTMarketCreators.sol#L65-L82
The current implementation of EIP-2981 support will always pass a constant
BASIS_POINTS
as the_salePrice
.As a result, the recipients that are supposed to receive less than 1 BPS of the salePrice may end up not receiving any royalties.
Furthermore, for the NFTs with the total royalties rate set less than 10% for some reason, the current implementation will scale it up to 10%.
Recommendation
_salePrice
, we suggest using the actual_salePrice
, so there the royalties can be paid for recipients with less than 1 BPS of the royalties.