Permission to swap


What’s the cost to add Cyberfm on 1inch so that I can swap?

CyberFM Radio’s token is CYFM.

Please be aware that the token is extremely illiquid (meaning that it will be very hard to buy and sell at a price that doesn’t significantly move the market). CoinGecko shows CYFM’s daily volume as being extremely low. Etherscan shows that there is a maximum total supply of over 100 Trillion tokens… I cannot give you investment advise, but personally I’d steer clear of that project.

With that said, knowing how to calculate transaction fees is a very good skill to have in this DeFi space!

Ethereum transaction fees can be calculated by using the current gas price (gwei), market price of ETH ($USD), and the total gas cost of the transaction. Here’s a breakdown:

  • Ether denominations are fixed:
    • 1 ETH = 10^9 gwei
  • USD-ETH is floating
    • 1 ETH = ~$3,500 (at current market price)
  • GASCOST (fixed price of certain functions)
    • 21,000 GAS to send ETH
    • 56,000 GAS to give a contract ERC20 approval (per ERC20)
    • 65,000 to send an ERC20
    • 200,000 to do a Uniswap AMM swap
  • GASPRICE (floating based on market demand for blockspace)
    • Currently ~50 gwei

Using the values above we can calculate the cost of contract approval:

  • It cost 56,000 gas to give 1inch approval for CYFM
  • GAS is currently priced at 50 gwei
  • One billion GWEI in an ETH
  • ~$3,500/ETH
  • Transaction cost = (50 GWEI/GAS)*(56,000 GAS) * (1ETH/ 10^9 GWEI) * ($3500 USD/ETH) = $9.80 (0.0028 ETH)

TL;DR: Giving the 1inch contract permission to access an ERC20 would cost ~$10, or 0.003 ETH, at the time of writing this – you can use Etherescan’s Gas Tracker for dynamic pricing (it will cost slightly less than an ERC20 transfer).

Tokens can be added directly to 1inch by using the token’s contract address (be very careful doing this, it is a semi-advanced feature and you should only add a token if you 100% trust the team behind it and can verify that it is the proper token address).