is there a contract example which allows to exchange one erc20 for another?
i have 2 tokens
i want to exchange from tokenA to tokenB 1:1 and keep 1% as a fee
the sender should just make a normal erc20-send to the contracts address and receive back the other token.
the contract will have a pool of tokens, A and B
if someone pays 1 tokenA to the contract, the contract should send 0.99 tokenB back to the sending address and keep 0.01 tokenA in the pool.
i saw uniswap is doing something like this but with variable rates and more complex.
please point me to an example of such a contract or even point me to some good solidity programmer who could make this for me.
thanks for your time