Stargate protocol contracts (StargatePool and StargateOFT) implement the standard IOFT interface for Omnichain Fungible Tokens (OFTs), making crosschain transfers straightforward with just two methods:Documentation Index
Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
Use this file to discover all available pages before exploring further.
quoteSend() and send().
For architecture and concepts, see Stargate Finance.
The IOFT Interface
All Stargate pool and HydraOFT contracts implement the same interface:token(): Returns the underlying ERC20 token address (oraddress(0)for native assets like ETH)approvalRequired(): Returnstrueif you need to approve tokens before sending,falsefor mint/burn or native assets
Interactive Interface Methods
quoteSend() - Get Transfer Fees
quoteOFT() - Get Detailed Transfer Quote
send() - Transfer Tokens
SendParam Structure
The key parameters for Stargate transfers is identical to OFT transfers:How send() Works
When you callsend() on a Stargate contract, it triggers a chain of calls through LayerZero’s infrastructure:
Call Flow:
- Stargate Contract → Debits tokens (lock or burn depending on contract type)
- LayerZero Endpoint → Routes the message to the configured MessageLib
- Message Library (SendUln302) → Requests quotes from DVNs and Executor
- Workers (DVNs + Executor) → Provide fee quotes for verification and execution
- Fee Aggregation → Returns total
nativeFeefrom all workers
quoteSend() exists - it aggregates fees from all components in the security stack.
Transfer Modes
Stargate supports two transfer modes with different characteristics:Taxi Mode (Immediate)
Use when: You need immediate transfer or composability Set:oftCmd: ""
Supports: Composability via composeMsg to trigger actions on destination
Bus Mode (Batched)
Use when: You want gas savings and don’t need composability Set:oftCmd: new bytes(1)
Does NOT support: Composability - no lzCompose() will be triggered
Basic Transfer Example
Note: These examples assume you’re using existing Stargate contracts (pre-configured by the Stargate team). If deploying your own OFT, you must complete the configuration steps first - see OFT Quickstart - Deployment and Wiring. Since Stargate implements IOFT, sending tokens works exactly like any OFT - the only Stargate-specific aspect is theoftCmd field for Taxi vs Bus mode:
Composability
Taxi mode supports composability - triggering additional actions on the destination chain after Stargate assets arrive. Key Points:- Set
composeMsgto your encoded data - Set
toaddress to your composer contract - Add
addExecutorLzComposeOption()for composer gas - Your composer receives via
lzCompose()and decodes withOFTComposeMsgCodec
- OFT Quickstart - Composer - Full examples and code
- Composer Overview - Deep dive on horizontal composability
- Composer Pattern - Architecture and concepts
Finding Stargate Contracts
Method 1: Deployed Contracts Page
- Visit Deployed Contracts
- Search for your chain or asset (e.g., “USDC”, “Ethereum”)
- Stargate contracts appear at the top of each chain’s list
- Copy the address you need
Method 2: Stargate API
Next Steps
Learn More:- Stargate Finance Concepts - Architecture and how it works
- OFT Standard - Understanding IOFT interface
- Stargate Protocol Docs - Full protocol reference
- OVault Overview - Build omnichain vaults with Stargate assets
- Composer Overview - Advanced composability patterns
- LayerZero Discord - Technical support
- Stargate Discord - Stargate-specific questions