The costInEuros from distributeAssets is lower than it should be due to division before multiplication. This leads to accounting errors down the execution tree.
uint256 costInEuros = _portion * 10 ** (18 - asset.token.dec) * uint256(assetPriceUsd) / uint256(priceEurUsd) * _hundredPC / _collateralRate;
The division before multiplication above leads to a lower costInEuros compared to the rearranged version available in the Recommendations section below. Which in turn leads to a higher _portion because in the costInEuros > _position.EUROs true case the _portion variable is calculated like this _portion = _portion * _position.EUROs / costInEuros. This, in the end, translates to a higher reward distributed via claimRewards function.
Higher rewards due to bad accounting generated by precision loss.
Manual review
Update the costInEuros variable calculation as follows:
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.