Gas Cost Comparison — Trading. How does trading on nahmii compare to a…
By: John Derbyshire
Tags: Scaling, Trading, Ethereum, Cyptocurrency, Blockchain

With the first of nahmii’s smart contracts for trades now on Ropsten, we can bring you an exclusive first look at what it will cost to trade on nahmii versus a typical centralised exchange.

The comparison we’re making today is a little more complicated than you might think, mainly due to how gas costs are calculated. To simplify things, we’re using a wallet that has performed each transaction at least once before (as Ethereum generally requires more gas the first time you perform a smart contract function call). Similarly, we’ll work with a typical ERC-20 token (we used TT1 on Ropsten).

Our comparison will look at each step in the process: deposit, one singular trade, account settlement and withdrawal. We’ll use Binance as the point of comparison, other exchanges may be cheaper or more expensive.

Deposits

Depositing ERC-20 tokens into nahmii costs approximately 275,000 gas, whereas the equivalent cost to deposit into Binance is 35,000 gas.

In USD terms, presuming a gas price of 2 Gwei and ETH overestimated at $300, that works out at:

nahmii deposit = $0.165

Binance deposit = $0.021

Trades

Both Binance and nahmii charge a flat 0.1% fee for maker and taker orders. Please note that nahmii’s fee structure will eventually be adjusted to have a differential between maker and taker, and it will also include substantial discounts for larger monthly trading volumes.

Account Settlement & Withdrawal

To withdraw funds from nahmii, users must first ‘settle’ their account by providing a valid transaction receipt. Withdrawals are therefore a three part process: first, a user starts the settlement process and triggers the settlement waiting period; second, the user confirms their settlement request once the waiting period has expired; third, the user requests a withdrawal from nahmii’s on-chain client fund.

Taken together, the total gas cost to settle and withdraw from nahmii is 1,500,000 gas.

Withdrawals from a centralised exchange are usually both slow and expensive. Binance charges different fees depending on the withdrawal currency (0.0005 BTC, 0.01 ETH). We can calculate an approximate average withdrawal fee by looking at a range of currencies, generally a withdrawal from Binance will cost in the region of $1.50–3.00. This approximation understates the withdrawal cost for some currencies (0.0005 BTC = $5 at $10,000 per BTC), while overstating the fee for others (1.4 USDT = $1.40 at $1 per USDT).

In summary, presuming a gas price of 2 Gwei and ETH at $300, that works out at:

nahmii settlement & withdrawal = $0.90

Binance withdrawal = approximately $2.25 (using the middle value in the range $1.50–3.00)

Summary

Adding the values together, we can see that the full deposit-trade-withdraw life cycle on nahmii is over 50% cheaper than using Binance ($1.065 vs $2.28). This only tells us half of the story though; there are many reasons to use nahmii over an equivalent centralised exchange.

Before nahmii, centralised exchanges were the only option for serious traders of cryptocurrencies. Decentralised alternatives, while more secure, suffered from terrible performance problems: high latency; unpredictable fees; slow order cancellation; delayed finality and miserable overall throughput. Now with nahmii, traders will soon be able to enjoy all the performance benefits of a traditional centralised exchange with the security and non-custodial features of decentralised exchange.

When a trader deposits funds into nahmii, they are not held by a centralised operator. Instead, funds are stored in nahmii’s ‘Client Fund’ contract; users, like nahmii’s operator, cannot withdraw from the Client Fund without first providing a valid transaction receipt. This non-custodial approach means that a user’s funds are always safe, even against a fully compromised operator. With nahmii, users are protected against the kind of security breaches that seem to happen regularly at centralised exchanges — users are responsible for their own security.

There are other benefits to using nahmii too; we have no minimum withdrawal requirements and will soon have much lower transaction fees, with significant discounts for high volume traders. Even better, we have plans in place to remove nahmii’s settlement period delay entirely — nahmii will have instant withdrawals available for a small fee in the near future! More blog posts coming on this soon.

For too long, traders have had to compromise between security and performance. That all changes when nahmii’s exchange goes live later this year; the future of trading is coming and that future is nahmii.