Open hats-bug-reporter[bot] opened 1 month ago
ERC20 is a very loose standard and there is, as far as I know, know claim that Thorn protocol will support all variants.
Hey, thank you,
Nowhere it's mentioned that only a set of tokens will be supported. Thorn is designed to be a foundational DEX on the Sapphire and it should be able to handle all the different ERC20 tokens, similar to how the Uniswap is. Also, these contracts are forked from Curve and it has support for FOT tokens.
Nowhere it's mentioned that only a set of tokens will be supported.
The first words in the blurb on the web site explicitly mention that it is a protocol for stablecoins
Some of the tokens in the provided configuration script are not stablecoins: link
Hey, can you provide PoC for this issue? @blckhv
Github username: -- Twitter username: -- Submission hash (on-chain): 0x583b3a6802966b63ea69ff06445baf91abc0d509afef998d359eb6198c369eca Severity: medium
Description: Description\ Fee on transfer tokens are not supported in both 2 and 3 token pools.
Attack Scenario\ There are numerous places where FOT tokens will cause discrepancies and can harm the protocol and users:
addLiquidity
,balances
mapping is increased with the gross amount, without getting the net balance before/after the transfer:exchange
,balances
will be also wrongly changed, since the wholedx
is taken in the calculations without accounting for any fees from thetokenIn
.After that:
balanceOf
andbalances
Attachments
in
TransferHandler
, consider getting the balance of the pair contract before and after the transfers