Some ERC20 tokens such as stETH have a special feature of rebasing , which results in their balance changing from time to time, and some ERC20 also have a feature for FEE On Transfer
Since Tadleis expected to support all kinds of ERC20 tokens and if one such token has gone through a rebasing/FOT users might not get their exact amount out.
Users can withdraw their tokens amount out from the capitalPool by withdrawing their claimable Amountfrom their [Balance mapping](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/TokenManager.sol#L141)
Since if the balance changed later,the returned value will inaccurate and the amount used before and after that specific operation might differ
Note: This problem also applies for WETHin blast chain since WETH has a rebasing functionality in that chain
The problem will be in the following functions createOffer, listOffer, relistOfferwhile depositing the amount
The ultimate effect will be when the Token balance in the contract will be zero, while the internal acconting still registers that there are still amount available for users to collect
Manual Review
Query the balance before and after the transfer like it is done in internal _transfer function
Valid medium, there are disruptions to the ability to take market actions. The following functions will be disrupted without the possibiliy of reaching settlement, since the respective offers cannot be created/listed regardless of mode when transferring collateral token required to the CapitalPool contract or when refunding token from user to capital pool during relisting. So withdrawal is not an issue - `createOffer()` - reverts [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L96-L102) - `listOffer()` - reverts [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L355-L362) - `relistOffer()` - reverts [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L515-L521) - `createTaker()` - reverts [here](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/PreMarkets.sol#L831-L836) I believe medium severity is appropriate although the likelihood is high and impact is medium (only some level of disruption i.e. FOT tokens not supported and no funds at risk)
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.