Submitted by cmichel, also found by Dravee, IllIllI, and Ruhum
Shelter.sol#L34
The Sheler.donate function transferFroms _amount and adds the entire _amount to savedTokens[_token].
But the actual received token amount from the transfer can be less for fee-on-transfer tokens.
The last person to withdraw will not be able to as withdraw uses a share computation for the entire savedTokens[_token] amount.
The calculated amount will then be higher than the actual contract balance.
In donate, add only the actual transferred amounts (computed by post-transfer balance - pre-transfer balance) to savedTokens[_token].
leekt (Concur) acknowledged
Alex the Entreprenerd (judge) commented:
