In the current implementation, the SwanManager::setMarketParameters changes the parameters of the protocol. From now on only the latest added market parameters are used. But this comes with some problems, because for all buyers in the protocol all of the purchase requests that are not fulfilled yet, will be lost forever. Because adding new market parameters, moves all buyer into the next round.
Scenario:
We have two buyers in Buy Phase. Buyer A is in round 6 and Buyer B is in round 10. And both of them are waiting the oracle responders and validators to complete their purchase request. Both of them already paid fees to the oracle.
The owner calls setMarketParameters and both of the buyers are moved to the next round, respectively 7 and 11.
Both of the purchase requests can't be completed, because they are a part of an older round. All of the fees are lost forever.
The BuyerAgent-s who already paid fees for purchase requests, will lose the fees forever without the opportunity to buy assets.
Manual Review
To mitigate this, consider implementing a time-based mechanism, providing a buffer period between the request for adding market parameters and parameter changes. This would allow for any pending purchase requests to be completed before advancing all buyers to the next round, preserving buyer fees and ensuring fulfilment of outstanding requests.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.