Overview of OATS
OATS is an omnichain token standard that enables you to send and receive tokens and other data between smart contracts on different blockchains.
Why Use OATS?
Traditionally, extending a token's utility beyond its home blockchain was a complex and manual task for developers. OATS is designed to solve these challenges.
Before OATS:
- Complex Infrastructure: Required deploying and managing separate token contracts or liquidity pools on every new chain.
- Difficult Integrations: Involved complex work with various bridges, each having unique security protocols.
- Slow Development: Manually extending token features to new chains was a time-consuming process.
With OATS, you can:
- Deploy with Ease: Quickly make new or existing tokens ready for cross-chain operations.
- Enhance Security: Use the decentralized and secure Analog General Message Passing (GMP) for all token transfers.
- Gain Flexibility: Select the best transfer model for your token, such as a
burn/mintorlock/unlockmechanism. - Unlock New Possibilities: Trigger smart contract interactions on a destination chain immediately following a token transfer, enabling advanced DeFi and dApp features.
Key Concepts
OATS is built on top of Analog's core components: the Timechain and Analog GMP.
- Timechain: Serves as a decentralized and immutable ledger, providing the ultimate source of security and verification for all cross-chain activities.
- Analog GMP: Serves as the transport system for cross-chain data.
- OATS : This is the application layer.
While OATS uses Analog GMP to send messages, it provides the specific rules, interfaces (IOATS.sol), and base implementations (TokenSender.sol) and TokenSenderCallers.sol needed to create a unified omni-chain application. In essence, OATS defines what the application does, while Analog GMP handles how the cross-chain message is delivered.
OATS Models
OATS provides two distinct models for managing cross-chain token transfers: Burn/Mint and Lock/Unlock. The selection of a model is based on the token's architecture and the desired level of control over its supply mechanics.
- Burn/Mint:
- Suitable for: Newly deployed tokens or tokens where the developer controls the total supply mechanics across chains.
- Mechanism: Tokens are burned on the source chain, and an equivalent amount is minted on the destination chain. This requires the token contract to have minting and burning capabilities (e.g.,
ERC20Burnableand controlled minting, oftenERC20Cappedis used to manage total supply). - Implementation: Your token contract directly inherits
ISender/ISenderCallerandIGmpReceiver.
- Lock/Unlock:
- Suitable for: Existing tokens, especially those with a fixed supply that cannot be minted or burned arbitrarily.
- Mechanism: Tokens sent from the source chain are locked in a dedicated OATS Bridge contract. When these tokens arrive on the destination chain, an equivalent amount of tokens (which were previously locked from another transfer or pre-supplied) are unlocked from the OATS Bridge contract on the destination chain and sent to the recipient.
- Implementation: Requires a separate Bridge contract that implements
ISender/ISenderCallerandIGmpReceiver. This Bridge contract holds the locked tokens.