The transferRoyalties(...)function calculates how much royalties each party receives based on the charged royaltyFeeand platformFeeas seen below:
```
As seen, the contract transfers from the seller to the contract the entire buyerFee. From the sent buyerFeethe driaFeeis as well calculated. Then the contract reduces the driaFeefrom the sent buyerFeeand sends the remainder to the buyer as thier portion and the rest to the Swan ownerin form of driaFee.
Let's think of the following layman scenario:
The price of an asset SW is 100 and its royaltyFee is set at 5 hence the buyerFeein this case would be (100 * 5)/100which would be 5.
Let the platfrom fee be 3 hence the driaFeewould be (5 * 3/100) which would be 15/100and this would round down to 0 in solidity.
At this point, the contract would send the buyer 5 -0amount which would be 5 and send the Swan Owner nothing 0, due to rounding down.
Due to precision loss, the Swan Owner in some instances might not be able to get anything.
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.