A number of technical details differ between Ethereum mainnet’s EVM and DogeOS’s modified design for a zkEVM. Below you can see those differences as they exist on DogeOS and DogeOS Chikyū Testnet.
For open-source contributors and infrastructure builders, please contact our team for additional support.
EVM Opcodes#
| Opcode | Solidity equivalent | DogeOS Behavior |
|---|---|---|
BLOCKHASH | blockhash(n) | Reads the hash from the EIP-2935 history contract storage. Only the last 256 blocks are available. See BLOCKHASH Gas. |
COINBASE | block.coinbase | Returns the pre-deployed fee vault contract address. |
DIFFICULTY / PREVRANDAO | block.difficulty | Returns 0. |
SELFDESTRUCT | selfdestruct | Disabled. Executing it fails the current call and consumes the call’s remaining gas. |
Solidity Version and EVM Target#
Compile with the osaka EVM target, which is the default since Solidity 0.8.31. We recommend the latest Solidity release. Apart from the exceptions below, DogeOS supports every opcode the compiler emits for osaka, including PUSH0, MCOPY, TLOAD, TSTORE, and CLZ. As of Solidity 0.8.38, the compiler only emits CLZ when you call clz in inline assembly. The prague and cancun targets also work.
Keep these limits in mind:
- The compiler accepts
selfdestruct,blobhash(),block.blobbasefee, and the matching assembly builtins for these targets, but they fail on DogeOS. Don’t use them. - Contracts must not rely on the BLS12-381 or
point evaluationprecompiles (see EVM Precompiles). - Don’t use the
amsterdamtarget. DogeOS doesn’t support opcodes added after Osaka, such asSLOTNUM.
BLOCKHASH Gas#
BLOCKHASH reads the EIP-2935 history contract and is priced by EIP-7709 : 2,120 gas for a cold slot and 120 for a warm one. Lookups of the current block, future blocks or blocks older than 256 cost 20 gas and return 0.1
EVM Precompiles#
The blake2f (address 0x09) precompile is not supported. Calls to it fail and consume all the gas passed to the call.
DogeOS doesn’t provide the point evaluation precompile (address 0x0a) or the BLS12-381 precompiles (addresses 0x0b to 0x11). There is no precompile at those addresses, so a low-level call to them succeeds with empty return data, pays the cold-account access cost unless the address is already warm, and leaves any DOGE sent there stuck (Solidity interface calls can still fail on code-existence checks or return-data decoding). Don’t treat a successful call to these addresses as a verified result.
The RIPEMD-160 precompile (address 0x03) is supported, but only for inputs of up to 32 bytes, such as a SHA-256 digest when you derive a Dogecoin address hash. Calls with longer inputs fail.
The other EVM precompiles are supported and behave as on Ethereum (Osaka), including their gas costs: ecRecover, SHA-256, identity, modexp, ecAdd, ecMul, ecPairing, and P256VERIFY (address 0x100).
DogeOS also adds a restricted native transfer precompile at 0x00000000000000000000000000000000000000fd. Only the native DOGE token can call it, and calls from any other address fail. See Native DOGE as an ERC-20.
Native DOGE as an ERC-20#
On Ethereum, ETH isn’t an ERC-20 token, so protocols wrap it into WETH. On DogeOS, native DOGE also has an ERC-20 interface at 0x530000000000000000000000000000000000d09e, so you don’t need to wrap it. Its balanceOf returns the native balance, and its transfer and transferFrom move native DOGE.
The native balance and the token’s balanceOf are the same funds, so never add them together. Many DOGE movements, such as gas fees and plain value transfers, don’t emit a Transfer event. Read Native DOGE as an ERC-20 before you handle DOGE in contracts, wallets, or indexers.
Transaction Ordering#
Similarly to Ethereum, the DogeOS sequencer aims to prioritize executable transactions based on their “tip” (priority fee). In most cases, transactions will be included in the next block in decreasing order of their tips.
However, just like in Ethereum, this ordering is not guaranteed by the protocol, and some blocks might diverge from it. In particular, during periods of low mempool congestion, the sequencer will process transactions on a first-come-first-served basis, so some transactions might precede others with higher tip in the same block.
Reorgs and Finality#
In order to support maximum capacity under load and keep gas prices low, the maximum reorg depth has been set to 17 blocks. Transaction ordering should be unchanged after this threshold.
For absolute ordering certainty, you can wait for blocks to be finalized (which occurs after a proof and withddrawal fulfillment transactions is completed on Dogecoin).
Transaction Fees#
The fee charged to DogeOS transactions:
- Execution fee: similar to Ethereum, the amount of the DogeOS execution fee equals to
gas_used * effective_gas_price, covering the following costs:- DogeOS sequencer execution & congestion costs
- Data and Finality fee: additional fee on top of execution fee. The Data and Finality fee covers the cost of posting transaction data to Ethereum for data availability (Ethereum DA) and updating the Dogecoin bridge. Because DogeOS rolls up the transaction data to Ethereum DA, the fee is calculated based on the size of transaction data.
For more information, see Transaction Fees on DogeOS.
Footnotes
-
DogeOS Chikyū Testnet still charges a flat 20 gas for
BLOCKHASHuntil its next upgrade. ↩