The Swan protocol's relist function allows complete mutation of critical asset parameters after listing, breaking core protocol invariants and enabling market manipulation.
In the relist()
function, an asset's listing details can be modified after creation: https://github.com/Cyfrin/2024-10-swan-dria/blob/c3f6f027ed51dd31f60b224506de2bc847243eb7/contracts/swan/Swan.sol#L197-L255
The issue is that relist()
allows complete mutation of an asset's critical parameters:
Price can be changed
Buyer can be changed
Royalty fee can be changed
Round number can be changed
Let's assume
Price Manipulation Risk
Sellers can arbitrarily change prices after listing
Enables market manipulation through rapid price changes
No bounds checking on new prices
Asset Parameter Mutation
Core asset parameters can be changed after creation
Breaks immutability expectations for buyers
Could enable bait-and-switch schemes
Round System Exploitation
Round numbers can be manipulated
Timing attacks possible through round changes
Breaks round-based market phase assumptions
Fee Structure Manipulation
Royalty fees can be modified after listing
Impacts revenue distribution
Could be used to bypass fee requirements
Vs
Implement a strict parameter mutation policy where only specific fields can be modified under well-defined conditions. Add price change limits, preserve core parameters, and implement a time-lock for significant changes.
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.