Closed JayWelsh closed 2 years ago
We will need to apply all fee deductions to the total sale/auction value (i.e. we can't apply %s to the amounts after each % has been deducted as that means that parties involved may receive amounts that do not match up to their allocated % share of the total).
Attempted resolution: https://github.com/seen-haus/seen-contracts/pull/57
ADMIN
role and would generally be much lower than 50%, usually this value would likely be a single-digit percentage value, but the upper limit is now 50%).disburseFunds
process now runs a check in the deductFee
& deductEscrowAgentFee
steps to ensure that neither fee payout would exceed the remaining amount of funds left to distribute as part of the disburseFunds
process.require
statements in SaleRunnerFacet.sol
needed to be batched to prevent the contract size exceeding max size.Addressed by https://github.com/seen-haus/seen-contracts/pull/57
MHB-03M: Non-Standard Application of Escrow Fee
Description:
The
deductEscrowAgentFee
function does not validate that the total applied fee does not exceed the total available amount, causing "correct" configuration of the contract to lead to a failure.Example:
Recommendation:
We advise the escrow fee to instead be applied on the after-royalty amount to ensure that the statements will always execute properly. Alternatively, we advise the code to gracefully handle the royalty and escrow agent fee exceeding the total amount by introducing a new maximum escrow agent fee to the system.