Skip to main content

Fees & Gas

TL;DR​

Operators:

The Neon Operator economy​

Neon Proxy enables Neon Operators to earn NEON tokens by processing transactions from Neon users.

The Neon Operator economy is based on providing a custom gas price returned by the eth_gasPrice method. The Neon Proxy calculates the gas price based on the assumption that it should cover the cost of transaction processing on the Solana cluster and include the profit of the Neon Operator. The Neon Operator should include all additional costs (such as hardware rent) plus profit in their Operator Fee.

The Neon EVM calculates gas usage by tracking the SOL spent by the Neon Operator during transaction execution. The gas price includes the ratio of NEON and SOL tokens, so the payment from the Neon User to Neon Operator covers all spent SOLs. The ultimate gas price is variable because it depends on the prices of SOL and NEON.

Pass on gas savings​

Because the Neon EVM operates on Solana, not Ethereum, it takes advantage of Solana’s inexpensive transaction costs and favorable approach to only charge for storage allocation. This contrasts with Ethereum, where calculations require much more gas, and gas is charged for every change in data stored in Ethereum. As a result, gas usage on Solana is much cheaper than on Ethereum, and the Neon EVM passes these savings on to users.

Gas price: the Operator fee​

The Neon Proxy obtains the current prices of SOL and NEON tokens from the pyth.network oracles.

Gas price = $SOL / $NEON( 10-9 NEON) (1 + PRX_OPERATOR_FEE + PRX_GAS_PRICE_SLIPPAGE)

which can also be represented as:

Gas price = SOL-to-NEON-rate in Galan * (1 + PRX_OPERATOR_FEE + PRX_GAS_PRICE_SLIPPAGE)

This ensures that the Neon Operator receives enough NEON to cover the transaction cost in SOL.

The Neon Operator configures the value of PRX_OPERATOR_FEE, where 1.0 represents 100% of the potential fee extraction. The value of this parameter is currently set to 1.

Parameter PRX_GAS_PRICE_SLIPPAGE provides a buffer against transactions getting stuck in the mempool if there is volatility in prices of $SOL and $NEON. The value of this parameter is currently set to 0.25.

For example:

ComponentValueUnits/DefinitionCalculation
Sol50$
Neon0.5$
RatioSOL:NEON120
Galan ratioRatio *10-90.00000012
Operator fee ratio1
Proxy Gas Price Slippage0.25
Adjustor1+fee+slippage2.09
Gas price0.0000002475NEONGas price formula
247.5Galan

Neon recommended that Neon Operators should initially set PRX_OPERATOR_FEE to β€œ1.0” for Mainnet launch. This allows Operators to cover their hardware costs while transaction demands are low. As demand grows, Operators may adjust their fees in response.

A PRX_OPERATOR_FEE = β€œ0.1” β†’ 10% of the total possible Neon Operator fee.

Minimum gas price​

An Operator has two options:

  • Recommended: set up the PRX_MINIMAL_GAS_PRICE to 1 as per the default value in EVMs
  • Set up the PRX_MINIMAL_GAS_PRICE to reject low offers

For example, by setting the gas price minimum to 65 Galan, Neon Proxy rejects transactions with a gas price of less than 65.

Gas price: oracle configuration​

If a transaction request arrives with a gas price below that of the Operator costs + Operator fee, but with a gas price larger than the designated PRX_MINIMAL_GAS_PRICE, the Neon Proxy accepts the transaction into mempool.

The Neon transaction will only be executed when the gas price covers Operator costs + Operator fee. If the number of transactions in the mempool grows to the PRX_MEMPOOL_CAPACITY (by default =4096), Neon Proxy removes the transaction with the smallest gas price from the mempool to accept transactions with the higher gas price. Therefore, it's not critical to set the PRX_MINIMAL_GAS_PRICE to a small value.

Calculation configuration​

The Neon Proxy has several settings that accommodate the calculation of gas-price on your required network:

  • PRX_PP_SOLANA_URL: the HTTP/S address of the Solana node (Devnet/Mainnet) that provides the Pyth data account that supplies $NEON and $SOL prices
  • PRX_PYTH_MAPPING_ACCOUNT: the Solana address of the Pyth mapping account; select the address on (https://pyth.network/developers/accounts) based on the type of network (Devnet/Mainnet)
  • PRX_UPDATE_PYTH_MAPPING_PERIOD_SEC: the time period to reread the Pyth mapping account. The Neon Proxy reads the Pyth mapping account at the start, gets the addresses of $NEON and $SOL accounts, and rechecks the address from the Pyth Mapping account only after UPDATE_PYTH_MAPPING_PERIOD_SEC. It is recommended to set this generously (e.g. 1/3/10 hours), because the price feed accounts don’t change often.
  • PRX_MINIMAL_GAS_PRICE: the minimum gas price to accept transactions into the mempool for on-chain execution
Was this page helpful?