Transaction Batching
With the introduction of LayerZero V2, applications can now batch their LayerZero cross-chain message - meaning that any arbitrary number of users can submit their source chain transactions and pay an amortized portion of BOTH the LayerZero message and destination transaction fee.
The Bus and the Taxi
Stargate offers two transaction options for users: the Bus (Economy mode) and the Taxi (Fast Mode).
The Bus: This batched transaction method can reduce costs by over 95% compared to Stargate V1. Users buy a "bus ticket" for a seat on a transaction bus, which departs once all seats are filled or paid for. This option is more economical, though it might involve longer wait times since the transaction only processes when the bus is either fully occupied or reaches the maximum waiting period. It's ideal for users who prioritize cost savings over speed.
The Taxi: This option represents a one-to-one transaction that processes immediately once the source chain finality is achieved. While more expensive than the bus, it's faster and still offers cost savings compared to earlier versions due to optimized gas usage. This choice suits users who prefer speed over lower costs.
In practice, if a user wishes to transfer from Chain A to Chain B, they could choose the cheaper bus ticket, sharing the transaction cost with others, or opt for the immediate but more expensive taxi. This system allows users to balance their preferences for cost versus transaction speed.
Last updated