Feedback received via email from the team after submitting the contract code:
The contract uses a mapping to store the liquidity of each token, but it does not appear to be used in any of the functions.
The swap function does not check if the contract has enough liquidity to make the swap.
The unswap function does not check if the contract has enough of the output token to make the swap.
The unswap function returns three values, but only two of them appear to be used in the function. The third value is not used and could be removed.
The swap and unswap functions should only allow three tokens A, B, or C (here Euler, Fermat, and Gauss) tokens to be exchanged. Currently, the swap and unswap functions allow any token that implements the IERC20 interface to be exchanged. This means that any token that implements the IERC20 interface, including tokens that are not A, B or C can be exchanged using these functions.
The swap and unswap functions in the contract are not working as intended. The swap function is supposed to mint tokens to the user, but it is actually using the transfer function. The unswap function is supposed to burn tokens, but it is using the transfer function
The amount in the function argument should be expressed in Wei. In Ethereum, the smallest unit of a token is called a Wei, and it is equivalent to 10^-18 of the token. For example, if a token has 18 decimal places, one Wei is equal to 0.000000000000000001 of the token. It is generally best to handle the conversion from decimals to Wei off-chain, as this allows the contract to accept and return the amount in Wei directly. For example, if the user wants to transfer 1.234 tokens, it can convert off-chain to the equivalent number of Wei (12340000000000000000) and pass it to the contract's transfer function. This allows the contract to handle the transfer without having to worry about the conversion from decimals to Wei.
You did not make any transactions On-chain on your smart contracts. It is important to test your contracts by making transactions to ensure that they work as intended and do not have any issues.