Since according to know issue SwanAssetFactory
and BuyerAgentFactory
both have a deploy
function that is callable by anyone, while the protocol assumes it to be called by Swan
contract. We believe this is not a problem as any outsider call wont change the state of Swan contract, nor it will be caught by any event listeners that listen to Swan.
But here event is emitted and event lister which listen to swan can be flooded with unnecessary events. Since Swan::createBuyer
function is callable by everyone and emits a event.
https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L326C5-L335C22
Make this restricted so that it can be callable by only trusted addresses.
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.