Contract For Token on Multiple Exchanges

Hi everyone,

I've been referring to many token contracts on Etherscan which performed really well on the community. When I referred to their contracts, some uses the reflect.sol (https://github.com/reflectfinance/reflect-contracts/blob/main/contracts/REFLECT.sol) transfer methods:

 transferStandard()
 transferToExcluded()
 transferFromExcluded()
 transferBothExcluded()

Some contracts detect if its a buy or sell depending on the interaction with uniswap router.

If uniswap router is the sender, its a buy.
If uniswap router is the receiver, its a sell.

if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) {
//this is a buy
//take the buy tax
}
if (!inSwap && from != uniswapV2Pair && swapEnabled) {
//this is a sell
//take the sell tax
}

When reading these contracts, I've got a question. Can someone please explain how these codes will react when the token gets listed on different exchange like Hotbit or ShibaSwap or some other exchanges. ?

How to compute taxes separately for buy and sell even when on a different exchange ? Is that possible, please help me.

And one more question, can someone explain the transfer methods used by reflect.sol ?

Please help me with the best methods to use for the long run.

Can someone please explain how these codes will react when the token gets listed on different exchange like Hotbit or ShibaSwap or some other exchanges. ?

If the tax is only on buying and selling and not on traditional transfers then it will function every other ERC20 token. Everything you see in a CEX is stored in a centralised DB owned by the CEX so there are actually no on chain transactions until you withdraw i.e. buy and sell tax should be 0 for all CEX.

And one more question, can someone explain the transfer methods used by reflect.sol ?

It looks like 4 different functions which detemines who to take the fees from (both, sender, receiver, none).

Please help me with the best methods to use for the long run.

Do you need to use these transfer functions? Can you use the standard transfer function with no fees?

2 Likes

Hi,

If my token is taking taxes on all transfers, will it be a problem when it gets listed on other exchanges than Uniswap ?

Thanks.

I think for the deflationary token, you can have a look at this:

:warning: A deflationary token can cause problems such as this issue: https://medium.com/balancer-protocol/incident-with-non-standard-erc20-deflationary-tokens-95a0f6d46dea

This is not about just a deflationary token. Think of just a dev tax only option.

Okay, at least, I think Uniswap can support, as for others DEX, maybe you have got to check the code.

1 Like

Sorry for necro-ing a dead thread but just thought it'd be good to share that for dexes that use the amount argument to determine how many tokens are transferred will not be able to handle your token.

iirc, uniswap looks at the balance before and after the transfer so they don't care what amount is.

1 Like