Ethereum Compatibility in Kaia Network

ยท

Kaia provides encapsulated transaction types to support Ethereum compatibility. Except for a single-byte type separator called "EthereumTxTypeEnvelope," Kaia's Ethereum transaction types share the same properties and RLP encoding scheme as Ethereum's design. This allows users to successfully deploy transactions generated by Ethereum development tools on the Kaia network. When using the eth namespace API, the type separator is omitted, enabling users to interact with Kaia just like they would with Ethereum.

Ethereum Transaction Types in Kaia

EthereumTxTypeEnvelope

The EthereumTxTypeEnvelope is a single-byte prefix for raw transactions that indicates Ethereum transaction types. Ethereum adopted an extensible transaction type scheme through EIP-2718, which uses a type numbering system that conflicts with Kaia's. To resolve this conflict, Kaia introduced the "EthereumTxTypeEnvelope," allowing for future separation and expansion of Ethereum transaction types.

Key details:

Transaction Types

TxTypeEthereumAccessList

This transaction type represents Ethereum's access list transactions as specified in EIP-2930. It's designed for compatibility and only applicable to EOAs associated with AccountKeyLegacy.

Properties

PropertyTypeDescription
typeuint8Must be 0x7801
chainId*big.IntTarget chain ID
nonceuint64Unique sender transaction identifier
gasPrice*big.IntMultiplier for calculating transaction fee
gasuint64Maximum allowed transaction fee
to*common.AddressRecipient address
value*big.IntAmount of KAIA transferred
data[]byteExecution data
accessListtype.AccessListList of addresses and storage keys
v, r, s*big.IntCryptographic signature

Encoding Details

๐Ÿ‘‰ Learn more about Ethereum transaction types

TxTypeEthereumDynamicFee

This transaction type represents Ethereum's dynamic fee transactions as specified in EIP-1559, using gasTipCap and gasFeeCap instead of gasPrice.

Properties

PropertyTypeDescription
typeuint8Must be 0x7802
chainId*big.IntTarget chain ID
nonceuint64Unique sender transaction identifier
gasTipCap*big.IntFee multiplier (excluding baseFee)
gasFeeCap*big.IntTotal fee multiplier
gasuint64Maximum allowed transaction fee
to*common.AddressRecipient address
value*big.IntAmount of KAIA transferred
data[]byteExecution data
accessListtype.AccessListList of addresses and storage keys
v, r, s*big.IntCryptographic signature

Encoding Details

๐Ÿ‘‰ Explore Kaia's Ethereum compatibility features

FAQs

What is EthereumTxTypeEnvelope?

It's a single-byte prefix (0x78) that separates Ethereum transaction types from Kaia's native types while maintaining compatibility.

How does Kaia handle Ethereum-style transactions?

Kaia processes Ethereum-formatted transactions through special encapsulated types (0x7801 and 0x7802) that maintain Ethereum's RLP encoding while preventing type conflicts.

Are there gas fee savings with access lists in Kaia?

No, unlike Ethereum's EIP-2930, using access lists in Kaia doesn't provide gas fee benefits since Kaia uses a fixed gas price model.

Can I use Ethereum development tools with Kaia?

Yes, tools generating standard Ethereum transactions can be used with Kaia through its compatibility layer.

What's the difference between eth and kaia namespace APIs?

The eth namespace omits type separators for Ethereum compatibility, while kaia namespace preserves full transaction details including type information.

How does dynamic fee calculation work in Kaia?

While Kaia supports the format, it uses fixed gas prices (currently 250 Gkei), so gasTipCap and gasFeeCap should match this value.