Was doing some simple math to make sure @NEARProtocol's #EVM compares to #Ethereum one. @mattdlockyer, thanks for bringing this up!
Ethereum protocol has a block gas limit of ~12.5M EVM gas. One can schedule a single transaction of this size. In current prices (90 Gwei), a block costs 1.12 ETH, which is around $1.5k.
@NEARProtocol has a block limit of 1000 NEAR Tgas, and a transaction (receipt) limit of NEAR 200 Tgas. See more here: https://github.com/near/nearcore/blob/49b4fcdc297a609d8bb38858fdbf71e7d821f1f5/neard/res/genesis_config.json#L20
So, how do we compare this?
So, how do we compare this?
NEAR EVM implementation recalculates the EVM gas into NEAR gas in the runtime using some complex (he-he) linear regression formulas: https://github.com/near/nearcore/blob/master/runtime/near-evm-runner/src/runner.rs#L504-L515
Coefficients in the regressions were obtained during thorough comparison of similar contracts running in both EVM and NEAR VM: https://github.com/near/nearcore/blob/master/runtime/near-runtime-fees/src/lib.rs#L216-L220
As a result, @NEARProtocol #EVM implementation supports transactions up to 1.7M EVM Gas with up to 8.6M EVM Gas block limit
Also, take into account, that NEAR block generation time is around 1 sec, while Ethereum's currently is 13 sec.
So, during the same timespan @NEARProtocol can do ~9 times more calculations than #Ethereum on a single EVM shard.
So, during the same timespan @NEARProtocol can do ~9 times more calculations than #Ethereum on a single EVM shard.
Should we worry about the transaction gas limit? In general, no: Ethereum blocks contain in the mean around 100 transactions: https://pirlea.net/2020/01/20/ethereum-usage-graphs/
Which means that the mean Ethereum transaction costs around 125k Gas. And this is 13.6 times lower than NEAR transaction gas limit
Which means that the mean Ethereum transaction costs around 125k Gas. And this is 13.6 times lower than NEAR transaction gas limit
However, if you're developing complex smart contracts that are triggered by a single transaction, it can be really big. See this #RainbowBridge 5.4M EVM Gas singe transaction: https://etherscan.io/tx/0xfa45021726ebbabb45fdd408caf203c2bd143d0e6c1be8ff9e80f10db7b6ccf6
From the other side, the difference in prices is drastic:
@NEARProtocol's 1000 Tgas (block) would cost you around 0.1 NEAR, which is in current prices worth of $0.24.
@NEARProtocol's 1000 Tgas (block) would cost you around 0.1 NEAR, which is in current prices worth of $0.24.
This means that @NEARProtocol's #EVM calculations at the moment are 4300 times lower than Ethereum's. And what is more important, sharding will keep prices low even in #EVM environment (multiple EVM shards).
Yeah, and one more thing...
You don't need to have a NEAR account or hold $NEAR to schedule EVM transactions on NEAR. You can use same tooling and same token to pay for your transactions, as in Ethereum. How?
See here: https://gov.near.org/t/evm-runtime-base-token/340
You don't need to have a NEAR account or hold $NEAR to schedule EVM transactions on NEAR. You can use same tooling and same token to pay for your transactions, as in Ethereum. How?
See here: https://gov.near.org/t/evm-runtime-base-token/340