plasma-contracts
plasma-contracts copied to clipboard
support for tokens contracts taking fee on `transferFrom`
Issue Type
[ ] bug report
[x] feature request
Current Behavior
Depositing DGX into the chain credits user with amount on plasma chain, while root contract balance is increased only by amount - fee. This causes chain to be insolvent for DGX token.
Expected Behavior
Account for the fact that token may extract such a fee and rely not on declared amount, but on actual change of balance of root chain contract.
Apparently, this behavior might be against ERC20 standard (or at least against its idea). It would be nice if we could ignore the misbehaving token.
Attempting to confirm whether or not this is against spec. Either way, we would still need to execute a balance check before and after the transfer to watch for this behavior. We could ignore this entirely, but that seems like it could lead to poor UX.