MarginAccount: Computation of margin may be prone to errors from fee on transfer tokens #62
Labels
bug
Something isn't working
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
Lines of code
https://github.com/code-423n4/2022-02-hubble/blob/main/contracts/MarginAccount.sol#L157
Vulnerability details
Impact
USDT is the most widely used stablecoin so it is reasonable to assume that (like other lending platforms) USDT will be used as a possible collateral option. This may be problematic for Hubble down the road if Tether chooses to turn on their fee on transfer (line 126). This will result in the wrong amount of margin added when
addMarginFor()
is called.Recommended Mitigation Steps
The text was updated successfully, but these errors were encountered: