The protcol doesnt account the fees when PAXG token is transferred inside the protcol. THis is a loss to protcol, and should be accounted actually for user.
example => 2 bps is charged for a transfer on this transaction https://etherscan.io/tx/0x057435ecced6578613787c088a6231c26261bf9e08544cc8e73b78d95bf9c221
The function LiquidationPool.distributeAssets() calulated how much portion to reward and that amount of tokens are transferred from manager to LiquidationPool contract.
Now the above line doesnt account the fee, and result in getting more than actually deserving.
So at tyhe end, if 1000 PAXG tokens are distributed 2 bps worth of tokens are sent as fees, so now the last users who claim the reward will not be able to get the rewards since the early claimers can claim without accounting for fees o transfer.
See this transferFrom line, where 2 bps worth tokens gets to fees, and the reward claimers at last will get rekt.
Also The function SmartVaultV3.swap() calculated the minimumAmountOut which doesn't account fee that is charged on transfer.
so, the swap will always fail, since the fee is not considered on swapping, resulting in a failed swap transaction
Medium
Manual review
You should cache the balance before a transfer to the contract and then check it after the transfer and use the difference between them as the newly added balance.
Or call PAXG.getFeeFor() or call the PAXG token's feeRate, for how many base points is the fee charged for a transfer.
Take inspiration from uniswapV2 handling of Fee on transfer here.
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.