(by using the function createBuyer)
, Then they list an asset to their buyer account(by using the function list,they list this asset from there second account)
and set the asset price very low(1 wei), the protocol fee(dria fee) = 0 due to rounding, then the buyer can buy this asset at this low price(main cost will be the gas cost and the oracle fees for the BuyerAgent.sol functions) , the user can keep repeating this again and again,hence upgrading their buyer agent with assets of there choice as many times as they want and never pay the protocol(dria) fee(by using the function createBuyer)
lets say for example named - goku, description is that he is a saiyan, _feeroyalty = 5%
(for example),then they list themselves an asset(from there other account)(by using the function list
example asset name(Ultra Instinct Power up) for 1 wei, the dria fees will be = 0 as when the user uses the function list
and hits the line transferRoyalties(listings[asset]);
(note - buyer is in the sell phase already ) https://github.com/Cyfrin/2024-10-swan-dria/blob/main/contracts/swan/Swan.sol#L258
In the above function transferRoyalties now, Poc of how dria fee will be = 0
asset.price = 1 wei
asset.royaltyFee = 5
(representing 5%)platformFee = 1
(representing 1%) (just an example of platform fees it will be the same outcome for any value set by the protocol)buyerFee
:5 / 100
is less than 1 wei
, it gets truncated down to 0 wei
.driaFee
:buyerFee
is 0
, driaFee
also results in 0 wei
.With asset.price
set to 1 wei
, both buyerFee
and driaFee
evaluate to 0 wei
. Therefore, no meaningful platform fee is transferred, allowing the buyer to bypass the intended fee mechanism. Also the user can keep reapting this again and again getting as many assets as they want without paying the protocol fee.
function List
the user will always give 0 (dria)fee
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.