The current system design in the SwanManager
and BuyerAgent
contracts inadvertently allows for a Denial of Service (DoS)-like effect on the administrative ability to safely update market parameters such as platformFee
and maxAssetCount
. While changing the interval parameters (withdrawInterval
, sellInterval
, buyInterval
) is known to disruptively increase the round count across all BuyerAgent
instances and is intended by design, the issue arises when changes are made to the platformFee
or maxAssetCount
without altering any intervals. This situation causes all BuyerAgent
instances to synchronize their phases uniformly, unbeknownst to users, leading to skipped Buy and Withdraw phases, thereby resulting in potential financial and operational losses.
Location: The issue is concentrated within the setMarketParameters
function of the SwanManager
contract getRoundPhase of BuyerAgent.sol.
While altering any interval parameters is supposed to increase the round count, the vulnerability exploits the synchronization effect of updating non-interval properties (platformFee
, maxAssetCount
).
When the setMarketParameters
function updates the platformFee
or maxAssetCount
, it uses the current block.timestamp
, inadvertently affecting all buyer agents' phase calculations due to parameter timestamp updates.
As all agents use this timestamp to calculate their current phase, any modification leads to an unexpected reset and synchronizes all agents across the market to synchronize start a new phase together, bypassing critical user-interaction phases such as Buy and Withdraw.
This poses a significant challenge to the platform administrators who must update these parameters without unintentionally affecting the ongoing operations, leading to a form of operational gridlock.
Platform users and asset sellers may be detrimentally impacted as their listings can miss being processed in expected Buy phases, leading to potential unrecovered fee expenditures and lost sales opportunities.
Foundry
Consider implementing logic that differentiates timestamps affecting cycle calculations, allowing minor parameter changes (platformFee
, maxAssetCount
) to update without resetting the cycles or phases for existing agents.
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.