Submitted by cmichel
Certain ERC20 tokens make modifications to their ERC20s transfer or balanceOf functions.
One type of these tokens is deflationary tokens that charge a certain fee for every transfer() or transferFrom().
The Bonding._bond() function will revert in the _balanceCheck when transferring a fee-on-transfer token as it assumes the entire amount was received.
To support fee-on-transfer tokens, measure the asset change right before and after the asset-transferring calls and use the difference as the actual bonded amount.
0xScotch (sponsor) confirmed
Alex the Entreprenerd (judge) commented:
