code-423n4 / 2022-03-joyn-findings

4 stars 1 forks source link

Add a max boundary for the platform fee #138

Closed deluca-mike closed 2 years ago

deluca-mike commented 2 years ago

Fees should have a boundary of 100% (10000): https://github.com/code-423n4/2022-03-joyn/blob/main/royalty-vault/contracts/RoyaltyVault.sol#L68

Otherwise the contract will try to transfer more than possible which will result in reverts: https://github.com/code-423n4/2022-03-joyn/blob/main/royalty-vault/contracts/RoyaltyVault.sol#L40

It might also be helpful the have an fixed upper boundary that doesn't allow the platform to collect more than a set amount of fees, e.g. 10%.

deluca-mike commented 2 years ago

Duplicate of #9

JeeberC4 commented 2 years ago

Recreated with script as issue #149