When creating a marketplace, the owner sets the fixed ratio for the market:
Once the market is created, the fixedratio
cannot be updated. Offer makers can list their offers, and trading activities can proceed regardless of the fixedratio
value. However, during the settlement period, if the marketplace's fixedratio
is set to true, point settlements become impossible, as seen in DeliveryPlace::settleAskTaker
and DeliveryPlace::settleAskMaker
:
The above code reveals a contradiction in the protocol's behavior. On one hand, the protocol permits trading activities in markets where fixedratio
is set to true, but on the other hand, it neither offers a possibility for the owner to update the fixedratio
to false
nor permits the settlement of points when fixedratio
is true
.
If a marketplace's fixedratio is set to true upon creation, settlement of points becomes impossible, leading to several issues:
Token points cannot be settled, preventing bid offer makers and ask offer takers from receiving their token points.
Ask makers and bid takers will lose their collateral since they are unable to settle the points.
Manual Review
There is an inconsistency in the functionality of the fixedratio
. Below are some suggested approaches to address this issue:
Allow the owner to update the fixedratio
to false
in SystemConfig::updateMarket
, to enable settlements under the current implementation.
If fixedratio
is not supported in the current version, prevent the owner from setting fixedratio
to true
when creating the market.
If fixedratio
is intended to be supported, implement the necessary logic in DeliveryPlace::settleAskTaker
and DeliveryPlace::settleAskMaker
to handle cases where fixedratio
is set to true
.
Invalid, design decision, this is decided when market place is created. If a fixed ratio market place is allowed, then admin can simply create a new market place to cater to that in which manual arbitrartion is required instead of allowing settlements by makers, as noted in comments [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/SystemConfig.sol#L88)
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.