Submitted by cmichel
There are ERC20 tokens that may make certain customizations to their ERC20 contracts.
One type of these tokens is deflationary tokens that charge a certain fee for every transfer() or transferFrom().
Others are rebasing tokens that increase in value over time like Aaves aTokens (balanceOf changes over time).
The RCTreasury.deposit() function will credit more deposits than the contract actually received:
Recommend ensuring that the erc20 token does not implement any customizations.
Alternatively, a mitigation is to measure the asset change right before and after the asset-transferring routines
Splidge (Reality Cards) acknowledged:
