To recap, each Operator is responsible for maintaining 2 secure processes:
A fully synced Injective Chain Validator node (injectived process)
The Orchestrator service (peggo orchestrator process) which interacts with both networks. Implicitly, an RPC endpoint to a fully synced Ethereum node is required as well (see peggo .env example)
Combined, these 2 entities accomplish 3 things:
Move token assets from Ethereum to Injective
Move token assets from Injective to Ethereum
Keep the Peggy.sol contract in sync with the active Validator Set on Injective
It is possible to run peggo without ever being a Validator. Peggo automatically runs in “relayer mode” when configured to run with an address not associated with a Validator.
In this mode, only 2 things can happen:
new token batches can be created on Injective
confirmed valsets/batches can be relayed to Ethereum
Types of Assets
Native Ethereum assets
Any asset originating from Ethereum which implements the ERC-20 standard can be transferred from Ethereum to Injective by calling the sendToInjective function on the Peggy.sol contract which transfers tokens from the sender’s balance to the Peggy contract.The Operators all run their peggo processes which submit MsgDepositClaim messages describing the deposit they have observed. Once more than 66% of all voting power has submitted a claim for this specific deposit representative tokens are minted and issued to the Injective Chain address that the sender requested.These representative tokens have a denomination prefix of peggy concatenated with the ERC-20 token hex address, e.g. peggy0xdac17f958d2ee523a2206206994597c13d831ec7.
Native Cosmos SDK assets
An asset native to a Cosmos SDK chain (e.g. ATOM) first must be represented on Ethereum before it’s possible to bridge it. To do so, the Peggy contract allows anyone to create a new ERC-20 token representing a Cosmos asset by calling the deployERC20 function.This endpoint is not permissioned, so it is up to the validators and the users of the Peggy bridge to declare any given ERC-20 token as the representation of a given asset.When a user on Ethereum calls deployERC20 they pass arguments describing the desired asset. Peggy.sol uses an ERC-20 factory to deploy the actual ERC-20 contract and assigns ownership of the entire balance of the new token to the Peggy contract itself before emitting an ERC20DeployedEvent.The peggo orchestrators observe this event and decide if a Cosmos asset has been accurately represented (correct decimals, correct name, no pre-existing representation). If this is the case, the ERC-20 contract address is adopted and stored as the definitive representation of that Cosmos asset on Ethereum.
Orchestrator (Peggo) subprocesses
The peggo orchestrator process consists of 4 subprocesses running concurrently at exact intervals (loops). These are:
Signer which signs new Validator Set updates and Token Batches with the Operator’s Ethereum keys and submits using messages.
Oracle which observes Ethereum events and sends them as claims to Injective.
Relayer which submits confirmed Validator Set updates and Token Batches to the Peggy Contract on Ethereum
Batch Creator which observes (new) withdrawals on Injective and decides which of these to batch according to their type and the configured PEGGO_MIN_BATCH_FEE_USD value
Batch Creator
The purpose of the Batch Creator is only in creating token batches on the Injective side. The relevant Peggy module RPC is not permissioned so anyone can create a batch.When a user wants to withdraw assets from Injective to Ethereum they send a special message to Injective (MsgSendToEth) which adds their withdrawal to Peggy Tx Pool.
Batch Creator continually queries the pool for withdrawals (by token type) and issues a MsgRequestBatch to Injective when a potential batch satisfies the configured PEGGO_MIN_BATCH_FEE_USD value (see .env example).On the receiving end, all pooled withdrawals matching the token type in the request are moved from the Outgoing Tx Pool as a single batch and placed in the Outgoing Batch Pool.
Signer
The responsibility of Signer is to provide confirmations that an Operator (Orchestrator) is partaking in bridge activity. Failure to provide these confirmations results in slashing penalties for the orchestrator’s Validator.
In other words, this process must be running at all times for a Validator node.Any payload moving in the Injective->Ethereum pipeline (Validator Set updates/Token Batches) requires Validator signatures to be successfully relayed to Ethereum. Certain calls on Peggy Contract accept an array of signatures to be checked against the Validator Set in the contract itself.
Orchestrators make these signatures with their Delegate Ethereum address: this is an Ethereum address decided by the Operator upon initial setup (SetOrchestratorAddress). This address then represents that validator on the Ethereum blockchain and will be added as a signing member of the multisig with a weighted voting power as close as possible to the Injective Chain voting power.Whenever Signer finds that there is a unconfirmed valset update (token batch) present within the Peggy Module it issues a MsgConfirmValset (MsgConfirmBatch) as proof that the operating Validator is active in bridge activity.
Oracle
Monitors the Ethereum network for new events involving the Peggy Contract.Every event emitted by the contract has a unique event nonce. This nonce value is crucial in coordinating Orchestrators to properly observe contract activity and make sure Injective acknowledges them via Claims.
Multiple claims of the same nonce make up an Attestation and when the majority (2/3) of orchestrators have observed an event its particular logic gets executed on Injective.If 2/3 of the validators can not agree on a single Attestation, the oracle is halted. This means no new events will be relayed from Ethereum until some of the validators change their votes. There is no slashing condition for this, with reasoning outlined in the slashing specThere are 4 types of events emitted from Peggy.sol:
TransactionBatchExecutedEvent - event indicating that a token batch (withdrawals) has been successfully relayed to Ethereum
ValsetUpdatedEvent - event indicating that a Validator Set update has been successfully relayed to Ethereum
SendToInjectiveEvent - event indicating that a new deposit to Injective has been initiated
ERC20DeployedEvent - event indicating a new Cosmos token has been registered on Ethereum
Injective’s Oracle implementation ignores the last 12 blocks on Ethereum to ensure block finality. In reality, this means latest events are observed 2-3 minutes after they occurred.
Relayer
Relayer bundles valset updates (or token batches) along with their confirmations into an Ethereum transaction and sends it to the Peggy contract.Keep in mind that these messages cost a variable amount of money based on wildly changing Ethereum gas prices, so it’s not unreasonable for a single batch to cost over a million gas.
A major design decision for our relayer rewards was to always issue them on the Ethereum chain. This has downsides, namely some strange behavior in the case of validator set update rewards.But the upsides are undeniable, because the Ethereum messages pay msg.sender any existing bot in the Ethereum ecosystem will pick them up and try to submit them. This makes the relaying market much more competitive and less prone to cabal like behavior.
End-to-end Lifecycle
This document describes the end to end lifecycle of the Peggy bridge.
Peggy Smart Contract Deployment
In order to deploy the Peggy contract, the validator set of the native chain (Injective Chain) must be known. Upon deploying the Peggy contract suite (Peggy Implementation, Proxy contract, and ProxyAdmin contracts), the Peggy contract (the Proxy contract) must be initialized with the validator set.
Upon initialization a ValsetUpdatedEvent is emitted from the contract.The proxy contract is used to upgrade Peggy Implementation contract which is needed for bug fixing and potential improvements during initial phase. It is a simple wrapper or “proxy” which users interact with directly and is in charge of forwarding transactions to the Peggy implementation contract, which contains the logic. The key concept to understand is that the implementation contract can be replaced but the proxy (the access point) is never changed.The ProxyAdmin is a central admin for the Peggy proxy, which simplifies management. It controls upgradability and ownership transfers. The ProxyAdmin contract itself has a built-in expiration time which, once expired, prevents the Peggy implementation contract from being upgraded in the future.Then the following peggy genesis params should be updated:
bridge_ethereum_address with Peggy proxy contract address
bridge_contract_start_height with the height at which the Peggy proxy contract was deployed
This completes the bootstrap of the Peggy bridge and the chain can be started. Afterward, Operators should start their peggo processes and eventually observe that the initial ValsetUpdatedEvent is attested on Injective.
Updating Injective Chain validator set on Ethereum
A validator set is a series of Ethereum addresses with attached normalized powers used to represent the Injective validator set (Valset) in the Peggy contract on Ethereum. The Peggy contract stays in sync with the Injective Chain validator set through the following mechanism:
Creating a new Valset on Injective: A new Valset is automatically created on the Injective Chain when either:
the cumulative difference of the current validator set powers compared to the last recorded Valset exceeds 5%
a validator begins unbonding from the set
Confirming a Valset on Injective: Each Operator is responsible for confirming Valset updates that are created on Injective. The Signer process sends these confirmations via MsgConfirmValset by having the validator’s delegated Ethereum key sign over a compressed representation of the Valset data. The Peggy module verifies the validity of the signature and persists it to its state.
Updating the Valset on the Peggy contract: After a 2/3+ 1 majority of validators have submitted their confirmations for a given Valset, Relayer submits the new Valset data to the Peggy contract by calling updateValset.
The Peggy contract then validates the data, updates the valset checkpoint, transfers valset rewards to sender and emits a ValsetUpdatedEvent.
Acknowledging the ValsetUpdatedEvent on Injective:Oracle witnesses the ValsetUpdatedEvent on Ethereum, and sends a MsgValsetUpdatedClaim which informs the Peggy module that the Valset has been updated on Ethereum.
Pruning Valsets on Injective: Once a 2/3 majority of validators send their claim for a given ValsetUpdateEvent, all the previous valsets are pruned from the Peggy module state.
Validator Slashing: Validators are subject to slashing after a configured window of time (SignedValsetsWindow) for not providing confirmations. Read more valset slashing
Transferring ERC-20 tokens from Ethereum to Injective
ERC-20 tokens are transferred from Ethereum to Injective through the following mechanism:
Depositing ERC-20 tokens on the Peggy Contract: A user initiates a transfer of ERC-20 tokens from Ethereum to Injective by calling the sendToInjective function on the Peggy contract which deposits tokens on the Peggy contract and emits a SendToInjectiveEvent.
The deposited tokens will remain locked until withdrawn at some undetermined point in the future. This event contains the amount and type of tokens, as well as a destination address on the Injective Chain to receive the funds.
Confirming the deposit: Each Oracle witnesses the SendToInjectiveEvent and sends a MsgDepositClaim which contains the deposit information to the Peggy module.
Minting tokens on the Injective: Once a majority of validators confirm the deposit claim, the deposit is processed.
If the asset is Ethereum originated, the tokens are minted and transferred to the intended recipient’s address on the Injective Chain.
If the asset is Cosmos-SDK originated, the coins are unlocked and transferred to the intended recipient’s address on the Injective Chain.
Withdrawing tokens from Injective to Ethereum
Request Withdrawal from Injective: A user can initiate the transfer of assets from the Injective Chain to Ethereum by sending a MsgSendToEth transaction to the peggy module.
If the asset is Ethereum native, the represented tokens are burnt.
If the asset is Cosmos SDK native, coins are locked in the module. The withdrawal is then added to Outgoing Tx Pool.
Batch Creation: A Batch Creator observes the pool of pending withdrawals. The batch creator (or any external third party) then requests a batch of to be created for given token by sending MsgRequestBatch to the Injective Chain. The Peggy module collects withdrawals matching the token type into a batch and puts it in Outgoing Batch Pool.
Batch Confirmation: Upon detecting the existence of an Outgoing Batch, the Signer signs over the batch with its Ethereum key and submits a MsgConfirmBatch tx to the Peggy module.
Submit Batch to Peggy Contract: Once a majority of validators confirm the batch, the Relayer calls submitBatch on the Peggy contract with the batch and its confirmations. The Peggy contract validates the signatures, updates the batch checkpoint, processes the batch ERC-20 withdrawals, transfers the batch fee to the tx sender and emits a TransactionBatchExecutedEvent.
Send Withdrawal Claim to Injective:Oracles witness the TransactionBatchExecutedEvent and send a MsgWithdrawClaim containing the withdrawal information to the Peggy module.
Prune Batches Once a majority of validators submit their MsgWithdrawClaim , the batch is deleted along and all previous batches are cancelled on the Peggy module. Withdrawals in cancelled batches get moved back into Outgoing Tx Pool.
Batch Slashing: Validators are responsible for confirming batches and are subject to slashing if they fail to do so. Read more on batch slashing.
Note while that batching reduces individual withdrawal costs dramatically, this comes at the cost of latency and implementation complexity. If a user wishes to withdraw quickly they will have to pay a much higher fee. However this fee will be about the same as the fee every withdrawal from the bridge would require in a non-batching system.
Last modified on March 31, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Injective Docs","description":"Injective is a high-performance, interoperable layer-one blockchain for building premier Web3 financial applications.","colors":{"primary":"#0082FA","light":"#E6F2FF","dark":"#0082FA"},"logo":{"light":"https://mintcdn.com/injectivelabs/QlZaYS7qaDAyLKCM/img/injective-logo-192x192.png?fit=max\u0026auto=format\u0026n=QlZaYS7qaDAyLKCM\u0026q=85\u0026s=07e0ad67fc7a332d74f7d418e2727dbd","dark":"https://mintcdn.com/injectivelabs/QlZaYS7qaDAyLKCM/img/injective-logo-192x192.png?fit=max\u0026auto=format\u0026n=QlZaYS7qaDAyLKCM\u0026q=85\u0026s=07e0ad67fc7a332d74f7d418e2727dbd"},"favicon":"https://mintcdn.com/injectivelabs/QlZaYS7qaDAyLKCM/img/injective-logo-192x192.png?fit=max\u0026auto=format\u0026n=QlZaYS7qaDAyLKCM\u0026q=85\u0026s=07e0ad67fc7a332d74f7d418e2727dbd","navbar":{"links":[{"href":"https://status.injective.network","label":"Status"},{"href":"https://testnet.faucet.injective.network","label":"Faucet"},{"href":"https://github.com/InjectiveLabs","type":"github"},{"href":"https://sentry.lcd.injective.network/swagger/#/","label":"API"},{"href":"https://chain.injective.network","label":"Operator Portal"},{"href":"/upgrade/latest","label":"Latest Upgrade"}]},"search":{"prompt":"Search Injective docs..."},"seo":{"metatags":{"og:type":"website","og:site_name":"Injective Docs","canonical":"https://docs.injective.network","indexnow-verification":"83e83a6368fb4defb4ae2ae309922656","msvalidate.01":"C0245176149C1961102F102F1E76F150"},"indexing":"all"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"gtm":{"tagId":"GTM-T4827WQD"}},"metadata":{"timestamp":true},"navigation":{"languages":[{"language":"en","footer":{"socials":{"website":"https://injective.com/","github":"https://github.com/InjectiveLabs","x":"https://x.com/injective","youtube":"https://youtube.com/@injective_","discord":"https://discord.gg/injective","telegram":"https://t.me/+8Y_0HOFLhnRlZDU9","linkedin":"https://www.linkedin.com/company/injectivelabs","reddit":"https://www.reddit.com/r/injective"},"links":[{"header":"About docs","items":[{"label":"Maintained by Injective Labs' Developer Relations Team","href":"https://injective.com/"},{"label":"Open an issue","href":"https://github.com/InjectiveLabs/injective-docs/issues"},{"label":"Submit a PR","href":"https://github.com/InjectiveLabs/injective-docs/pulls"}]},{"header":"Resources","items":[{"label":"Operator Portal","href":"https://chain.injective.network"},{"label":"Network Status","href":"https://status.injective.network"},{"label":"Blog","href":"https://injective.com/blog"},{"label":"Build","href":"https://injective.com/build"},{"label":"7 days of Injective","href":"https://youtube.com/watch?v=bE9JbFpsDFM\u0026list=PLTS_stt4XpDBGDXxrx4crxijAemFr3Mix"}]}]},"href":""},{"language":"zh-Hans","href":"cn"},{"language":"ko","href":"ko"},{"language":"jp","href":"jp"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"injectivelabs","hasAudioNarration":false,"actualSubdomain":"injectivelabs","customDomains":["docs.injective.network"],"gitSource":{"type":"github","owner":"injectivelabs","repo":"injective-docs","deployBranch":"main","contentDirectory":".gitbook","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b06d7b04d746179e791e6c8","clientVersion":"0.0.4342","searchFilterCounts":[{"language":"en","tag":"Develop","count":264},{"language":"en","tag":"BUILD","count":264},{"language":"ko","tag":"개발","count":255},{"language":"ko","tag":"빌드","count":255},{"language":"en","tag":"Native Developers","count":198},{"language":"ko","tag":"Native 개발자","count":175},{"language":"zh-Hans","tag":"开发","count":158},{"language":"zh-Hans","tag":"构建","count":158},{"language":"jp","tag":"開発","count":133},{"language":"jp","tag":"ビルド","count":133},{"language":"en","tag":"Getting Started","count":123},{"language":"en","tag":"INJECTIVE","count":123},{"language":"en","tag":"Injective Modules","count":100},{"language":"ko","tag":"Injective Modules","count":93},{"language":"zh-Hans","tag":"Native 开发者","count":73},{"language":"zh-Hans","tag":"快速开始","count":71},{"language":"zh-Hans","tag":"INJECTIVE","count":71},{"language":"jp","tag":"ネイティブ開発者","count":66},{"language":"en","tag":"Network Infrastructure","count":65},{"language":"ko","tag":"시작하기","count":64},{"language":"ko","tag":"INJECTIVE","count":64},{"language":"jp","tag":"はじめに","count":58},{"language":"jp","tag":"INJECTIVE","count":58},{"language":"en","tag":"DeFi on Injective","count":52},{"language":"en","tag":"Upgrades","count":45},{"language":"zh-Hans","tag":"DeFi","count":41},{"language":"en","tag":"Historical Upgrades","count":40},{"language":"jp","tag":"DeFi","count":40},{"language":"ko","tag":"DeFi","count":40},{"language":"zh-Hans","tag":"EVM 开发者","count":31},{"language":"zh-Hans","tag":"开发者","count":30},{"language":"ko","tag":"개발자","count":30},{"language":"jp","tag":"EVM開発者","count":28},{"language":"ko","tag":"EVM 개발자","count":28},{"language":"zh-Hans","tag":"在 Injective 上构建","count":26},{"language":"jp","tag":"Injectiveで構築","count":26},{"language":"zh-Hans","tag":"交易","count":24},{"language":"ko","tag":"Injective에서 빌드","count":22},{"language":"jp","tag":"チェーンのクエリ","count":18},{"language":"jp","tag":"開発者","count":17},{"language":"default","tag":"개발","count":8},{"language":"default","tag":"빌드","count":8},{"language":"default","tag":"개발자","count":8},{"language":"default","tag":"INJECTIVE","count":2},{"language":"default","tag":"Develop","count":2},{"language":"default","tag":"BUILD","count":2},{"language":"default","tag":"EVM Developers","count":2},{"language":"default","tag":"시작하기","count":1},{"language":"default","tag":"인프라","count":1},{"language":"default","tag":"Getting Started","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"utility-bar.css","content":"nav a[href*=\"chain-portal\"]{color:#0082FA!important;font-weight:600!important}aside [data-active=\"true\"],[data-component-name=\"sidebar\"] [data-active=\"true\"]{color:#0082FA!important;background:rgba(0, 130, 250, 0.08)!important}nav [data-active=\"true\"],[data-component-name=\"tabs\"] [data-active=\"true\"]{background:transparent!important}nav a[href*=\"/upgrade/latest\"]{color:#0082FA!important;font-weight:600!important;background:#E6F2FF!important;padding:4px 10px!important;border-radius:6px!important}"}]}
{"page":{"pagePath":"developers-native/injective/peggy/02_workflow","slug":"/developers-native/injective/peggy/02_workflow","pageMetadata":{"sidebar_position":2,"title":"Workflow","updatedAt":"2025-12-05","description":null,"href":"/developers-native/injective/peggy/02_workflow"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,OptimizedImage}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`workflow`,children:`Workflow`}),`\n`,_jsx(Heading,{level:`2`,id:`conceptual-overview`,children:`Conceptual Overview`}),`\n`,_jsxs(_components.p,{children:[`To recap, each `,_jsx(_components.code,{children:`Operator`}),` is responsible for maintaining 2 secure processes:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`A fully synced Injective Chain `,_jsx(_components.code,{children:`Validator`}),` node (`,_jsx(_components.code,{children:`injectived`}),` process)`]}),`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.code,{children:`Orchestrator`}),` service (`,_jsx(_components.code,{children:`peggo orchestrator`}),` process) which interacts with both networks. Implicitly, an RPC endpoint to a fully synced Ethereum node is required as well (see peggo .env example)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Combined, these 2 entities accomplish 3 things:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Move token assets from Ethereum to Injective`}),`\n`,_jsx(_components.li,{children:`Move token assets from Injective to Ethereum`}),`\n`,_jsxs(_components.li,{children:[`Keep the `,_jsx(_components.code,{children:`Peggy.sol`}),` contract in sync with the active `,_jsx(_components.code,{children:`Validator Set`}),` on Injective`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`It is possible to run `,_jsx(_components.code,{children:`peggo`}),` without ever being a `,_jsx(_components.code,{children:`Validator`}),`. Peggo automatically runs in “relayer mode” when configured to run with an address `,_jsx(_components.strong,{children:`not associated`}),` with a `,_jsx(_components.code,{children:`Validator`}),`.\nIn this mode, only 2 things can happen:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`new token batches can be created on Injective`}),`\n`,_jsx(_components.li,{children:`confirmed valsets/batches can be relayed to Ethereum`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`types-of-assets`,children:`Types of Assets`}),`\n`,_jsx(Heading,{level:`3`,id:`native-ethereum-assets`,children:`Native Ethereum assets`}),`\n`,_jsxs(_components.p,{children:[`Any asset originating from Ethereum which implements the ERC-20 standard can be transferred from Ethereum to Injective by calling the `,_jsx(_components.code,{children:`sendToInjective`}),` function on the `,_jsx(_components.a,{href:`https://github.com/InjectiveLabs/peggo/blob/master/solidity/contracts/Peggy.sol`,children:`Peggy.sol`}),` contract which transfers tokens from the sender’s balance to the Peggy contract.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`Operators`}),` all run their `,_jsx(_components.code,{children:`peggo`}),` processes which submit `,_jsx(_components.code,{children:`MsgDepositClaim`}),` messages describing the deposit they have observed. Once more than 66% of all voting power has submitted a claim for this specific deposit representative tokens are minted and issued to the Injective Chain address that the sender requested.`]}),`\n`,_jsxs(_components.p,{children:[`These representative tokens have a denomination prefix of `,_jsx(_components.code,{children:`peggy`}),` concatenated with the ERC-20 token hex address, e.g. `,_jsx(_components.code,{children:`peggy0xdac17f958d2ee523a2206206994597c13d831ec7`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`native-cosmos-sdk-assets`,children:`Native Cosmos SDK assets`}),`\n`,_jsxs(_components.p,{children:[`An asset native to a Cosmos SDK chain (e.g. `,_jsx(_components.code,{children:`ATOM`}),`) first must be represented on Ethereum before it’s possible to bridge it. To do so, the `,_jsx(_components.a,{href:`https://github.com/InjectiveLabs/peggo/blob/master/solidity/contracts/Peggy.sol`,children:`Peggy contract`}),` allows anyone to create a new ERC-20 token representing a Cosmos asset by calling the `,_jsx(_components.code,{children:`deployERC20`}),` function.`]}),`\n`,_jsx(_components.p,{children:`This endpoint is not permissioned, so it is up to the validators and the users of the Peggy bridge to declare any given ERC-20 token as the representation of a given asset.`}),`\n`,_jsxs(_components.p,{children:[`When a user on Ethereum calls `,_jsx(_components.code,{children:`deployERC20`}),` they pass arguments describing the desired asset. `,_jsx(_components.a,{href:`https://github.com/InjectiveLabs/peggo/blob/master/solidity/contracts/Peggy.sol`,children:`Peggy.sol`}),` uses an ERC-20 factory to deploy the actual ERC-20 contract and assigns ownership of the entire balance of the new token to the Peggy contract itself before emitting an `,_jsx(_components.code,{children:`ERC20DeployedEvent`}),`.`]}),`\n`,_jsx(_components.p,{children:`The peggo orchestrators observe this event and decide if a Cosmos asset has been accurately represented (correct decimals, correct name, no pre-existing representation). If this is the case, the ERC-20 contract address is adopted and stored as the definitive representation of that Cosmos asset on Ethereum.`}),`\n`,_jsxs(Heading,{level:`2`,id:`orchestrator-peggo-subprocesses`,children:[_jsx(_components.code,{children:`Orchestrator`}),` (Peggo) subprocesses`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`peggo orchestrator`}),` process consists of 4 subprocesses running concurrently at exact intervals (loops). These are:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Signer`}),` which signs new `,_jsx(_components.code,{children:`Validator Set`}),` updates and `,_jsx(_components.code,{children:`Token Batches`}),` with the `,_jsx(_components.code,{children:`Operator`}),`’s Ethereum keys and submits using `,_jsx(_components.a,{href:`/developers-native/injective/peggy/04_messages#Ethereum-Signer-messages`,children:`messages`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Oracle`}),` which observes Ethereum events and sends them as `,_jsx(_components.a,{href:`/developers-native/injective/peggy/04_messages#Oracle-messages`,children:`claims`}),` to Injective.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Relayer`}),` which submits confirmed `,_jsx(_components.code,{children:`Validator Set`}),` updates and `,_jsx(_components.code,{children:`Token Batches`}),` to the `,_jsx(_components.code,{children:`Peggy Contract`}),` on Ethereum`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Batch Creator`}),` which observes (new) withdrawals on Injective and decides which of these to batch according to their type and the configured `,_jsx(_components.code,{children:`PEGGO_MIN_BATCH_FEE_USD`}),` value`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`batch-creator`,children:`Batch Creator`}),`\n`,_jsxs(_components.p,{children:[`The purpose of the `,_jsx(_components.code,{children:`Batch Creator`}),` is only in creating token batches on the Injective side. The relevant `,_jsx(_components.code,{children:`Peggy module`}),` RPC is not permissioned so anyone can create a batch.`]}),`\n`,_jsxs(_components.p,{children:[`When a user wants to withdraw assets from Injective to Ethereum they send a special message to Injective (`,_jsx(_components.code,{children:`MsgSendToEth`}),`) which adds their withdrawal to `,_jsx(_components.code,{children:`Peggy Tx Pool`}),`.\n`,_jsx(_components.code,{children:`Batch Creator`}),` continually queries the pool for withdrawals (by token type) and issues a `,_jsx(_components.code,{children:`MsgRequestBatch`}),` to Injective when a potential batch satisfies the configured `,_jsx(_components.code,{children:`PEGGO_MIN_BATCH_FEE_USD`}),` value (see .env example).`]}),`\n`,_jsxs(_components.p,{children:[`On the receiving end, all pooled withdrawals matching the token type in the request are moved from the `,_jsx(_components.code,{children:`Outgoing Tx Pool`}),` as a single batch and placed in the `,_jsx(_components.code,{children:`Outgoing Batch Pool`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`signer`,children:`Signer`}),`\n`,_jsxs(_components.p,{children:[`The responsibility of Signer is to provide confirmations that an `,_jsx(_components.code,{children:`Operator (Orchestrator)`}),` is partaking in bridge activity. Failure to provide these confirmations results in slashing penalties for the orchestrator’s `,_jsx(_components.code,{children:`Validator`}),`.\nIn other words, this process `,_jsx(_components.strong,{children:`must be running at all times`}),` for a `,_jsx(_components.code,{children:`Validator`}),` node.`]}),`\n`,_jsxs(_components.p,{children:[`Any payload moving in the Injective->Ethereum pipeline (`,_jsx(_components.code,{children:`Validator Set`}),` updates/`,_jsx(_components.code,{children:`Token Batches`}),`) requires `,_jsx(_components.code,{children:`Validator`}),` signatures to be successfully relayed to Ethereum. Certain calls on `,_jsx(_components.code,{children:`Peggy Contract`}),` accept an array of signatures to be checked against the `,_jsx(_components.code,{children:`Validator Set`}),` in the contract itself.\n`,_jsx(_components.code,{children:`Orchestrators`}),` make these signatures with their `,_jsx(_components.code,{children:`Delegate Ethereum address`}),`: this is an Ethereum address decided by the `,_jsx(_components.code,{children:`Operator`}),` upon initial setup (`,_jsx(_components.a,{href:`/developers-native/injective/peggy/04_messages#setorchestratoraddresses`,children:`SetOrchestratorAddress`}),`). This address then represents that validator on the Ethereum blockchain and will be added as a signing member of the multisig with a weighted voting power as close as possible to the Injective Chain voting power.`]}),`\n`,_jsxs(_components.p,{children:[`Whenever `,_jsx(_components.code,{children:`Signer`}),` finds that there is a unconfirmed valset update (token batch) present within the `,_jsx(_components.code,{children:`Peggy Module`}),` it issues a `,_jsx(_components.code,{children:`MsgConfirmValset`}),` (`,_jsx(_components.code,{children:`MsgConfirmBatch`}),`) as proof that the operating `,_jsx(_components.code,{children:`Validator`}),` is active in bridge activity.`]}),`\n`,_jsx(Heading,{level:`3`,id:`oracle`,children:`Oracle`}),`\n`,_jsxs(_components.p,{children:[`Monitors the Ethereum network for new events involving the `,_jsx(_components.code,{children:`Peggy Contract`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Every event emitted by the contract has a unique event nonce. This nonce value is crucial in coordinating `,_jsx(_components.code,{children:`Orchestrators`}),` to properly observe contract activity and make sure Injective acknowledges them via `,_jsx(_components.code,{children:`Claims`}),`.\nMultiple claims of the same nonce make up an `,_jsx(_components.code,{children:`Attestation`}),` and when the majority (2/3) of orchestrators have observed an event its particular logic gets executed on Injective.`]}),`\n`,_jsxs(_components.p,{children:[`If 2/3 of the validators can not agree on a single `,_jsx(_components.code,{children:`Attestation`}),`, the oracle is halted. This means no new events will be relayed from Ethereum until some of the validators change their votes. There is no slashing condition for this, with reasoning outlined in the `,_jsx(_components.a,{href:`/developers-native/injective/peggy/05_slashing`,children:`slashing spec`})]}),`\n`,_jsx(_components.p,{children:`There are 4 types of events emitted from Peggy.sol:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`TransactionBatchExecutedEvent`}),` - event indicating that a token batch (withdrawals) has been successfully relayed to Ethereum`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ValsetUpdatedEvent`}),` - event indicating that a `,_jsx(_components.code,{children:`Validator Set`}),` update has been successfully relayed to Ethereum`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`SendToInjectiveEvent`}),` - event indicating that a new deposit to Injective has been initiated`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ERC20DeployedEvent`}),` - event indicating a new Cosmos token has been registered on Ethereum`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Injective’s `,_jsx(_components.code,{children:`Oracle`}),` implementation ignores the last 12 blocks on Ethereum to ensure block finality. In reality, this means latest events are observed 2-3 minutes after they occurred.`]}),`\n`,_jsx(Heading,{level:`3`,id:`relayer`,children:`Relayer`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`Relayer`}),` bundles valset updates (or token batches) along with their confirmations into an Ethereum transaction and sends it to the `,_jsx(_components.code,{children:`Peggy contract`}),`.`]}),`\n`,_jsx(_components.p,{children:`Keep in mind that these messages cost a variable amount of money based on wildly changing Ethereum gas prices, so it’s not unreasonable for a single batch to cost over a million gas.\nA major design decision for our relayer rewards was to always issue them on the Ethereum chain. This has downsides, namely some strange behavior in the case of validator set update rewards.`}),`\n`,_jsxs(_components.p,{children:[`But the upsides are undeniable, because the Ethereum messages pay `,_jsx(_components.code,{children:`msg.sender`}),` any existing bot in the Ethereum ecosystem will pick them up and try to submit them. This makes the relaying market much more competitive and less prone to cabal like behavior.`]}),`\n`,_jsx(Heading,{level:`2`,id:`end-to-end-lifecycle`,children:`End-to-end Lifecycle`}),`\n`,_jsx(_components.p,{children:`This document describes the end to end lifecycle of the Peggy bridge.`}),`\n`,_jsx(Heading,{level:`3`,id:`peggy-smart-contract-deployment`,children:`Peggy Smart Contract Deployment`}),`\n`,_jsxs(_components.p,{children:[`In order to deploy the Peggy contract, the validator set of the native chain (Injective Chain) must be known. Upon deploying the Peggy contract suite (Peggy Implementation, Proxy contract, and ProxyAdmin contracts), the Peggy contract (the Proxy contract) must be initialized with the validator set.\nUpon initialization a `,_jsx(_components.code,{children:`ValsetUpdatedEvent`}),` is emitted from the contract.`]}),`\n`,_jsx(_components.p,{children:`The proxy contract is used to upgrade Peggy Implementation contract which is needed for bug fixing and potential improvements during initial phase. It is a simple wrapper or “proxy” which users interact with directly and is in charge of forwarding transactions to the Peggy implementation contract, which contains the logic. The key concept to understand is that the implementation contract can be replaced but the proxy (the access point) is never changed.`}),`\n`,_jsx(_components.p,{children:`The ProxyAdmin is a central admin for the Peggy proxy, which simplifies management. It controls upgradability and ownership transfers. The ProxyAdmin contract itself has a built-in expiration time which, once expired, prevents the Peggy implementation contract from being upgraded in the future.`}),`\n`,_jsx(_components.p,{children:`Then the following peggy genesis params should be updated:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`bridge_ethereum_address`}),` with Peggy proxy contract address`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`bridge_contract_start_height`}),` with the height at which the Peggy proxy contract was deployed`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`This completes the bootstrap of the Peggy bridge and the chain can be started. Afterward, `,_jsx(_components.code,{children:`Operators`}),` should start their `,_jsx(_components.code,{children:`peggo`}),` processes and eventually observe that the initial `,_jsx(_components.code,{children:`ValsetUpdatedEvent`}),` is attested on Injective.`]}),`\n`,_jsx(Heading,{level:`3`,id:`updating-injective-chain-validator-set-on-ethereum`,children:_jsx(_components.strong,{children:`Updating Injective Chain validator set on Ethereum`})}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=87fb068989b98b9746f7e42b10ca45d3`,alt:`img.png`,\"data-og-width\":`4054`,width:`4054`,\"data-og-height\":`2520`,height:`2520`,\"data-path\":`developers-native/injective/peggy/images/valsetupdate.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=280\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=866d14fe530dd66d7cef92b2ac22d5b1 280w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=560\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=90dd22cff8b4853e24fb88ad8d159dc4 560w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=840\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=f998fd412f176caec4ca83771388da58 840w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=1100\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=6dbdd99d91692b9338e27354a4b315d4 1100w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=1650\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=7be05117db56e64cfaa04b71ff2bec81 1650w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/valsetupdate.png?w=2500\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=583c7794b16d8dfd5202c2eea28f250e 2500w`}),`\n`,_jsx(_components.p,{children:`A validator set is a series of Ethereum addresses with attached normalized powers used to represent the Injective validator set (Valset) in the Peggy contract on Ethereum. The Peggy contract stays in sync with the Injective Chain validator set through the following mechanism:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Creating a new Valset on Injective:`}),` A new Valset is automatically created on the Injective Chain when either:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`the cumulative difference of the current validator set powers compared to the last recorded Valset exceeds 5%`}),`\n`,_jsx(_components.li,{children:`a validator begins unbonding from the set`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Confirming a Valset on Injective:`}),` Each `,_jsx(_components.code,{children:`Operator`}),` is responsible for confirming Valset updates that are created on Injective. The `,_jsx(_components.code,{children:`Signer`}),` process sends these confirmations via `,_jsx(_components.code,{children:`MsgConfirmValset`}),` by having the validator’s delegated Ethereum key sign over a compressed representation of the Valset data. The `,_jsx(_components.code,{children:`Peggy module`}),` verifies the validity of the signature and persists it to its state.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Updating the Valset on the Peggy contract:`}),` After a 2/3+ 1 majority of validators have submitted their confirmations for a given Valset, `,_jsx(_components.code,{children:`Relayer`}),` submits the new Valset data to the Peggy contract by calling `,_jsx(_components.code,{children:`updateValset`}),`.\nThe Peggy contract then validates the data, updates the valset checkpoint, transfers valset rewards to sender and emits a `,_jsx(_components.code,{children:`ValsetUpdatedEvent`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`Acknowledging the `,_jsx(_components.code,{children:`ValsetUpdatedEvent`}),` on Injective:`]}),` `,_jsx(_components.code,{children:`Oracle`}),` witnesses the `,_jsx(_components.code,{children:`ValsetUpdatedEvent`}),` on Ethereum, and sends a `,_jsx(_components.code,{children:`MsgValsetUpdatedClaim`}),` which informs the `,_jsx(_components.code,{children:`Peggy module`}),` that the Valset has been updated on Ethereum.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Pruning Valsets on Injective:`}),` Once a 2/3 majority of validators send their claim for a given `,_jsx(_components.code,{children:`ValsetUpdateEvent`}),`, all the previous valsets are pruned from the `,_jsx(_components.code,{children:`Peggy module`}),` state.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Validator Slashing:`}),` Validators are subject to slashing after a configured window of time (`,_jsx(_components.code,{children:`SignedValsetsWindow`}),`) for not providing confirmations. Read more `,_jsx(_components.a,{href:`/developers-native/injective/peggy/05_slashing`,children:`valset slashing`})]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`transferring-erc-20-tokens-from-ethereum-to-injective`,children:_jsx(_components.strong,{children:`Transferring ERC-20 tokens from Ethereum to Injective`})}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=a54c00772781f52fc51ac05325c00bc5`,alt:`img.png`,\"data-og-width\":`3442`,width:`3442`,\"data-og-height\":`1618`,height:`1618`,\"data-path\":`developers-native/injective/peggy/images/SendToCosmos.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=280\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=5261daa778f88efd0615621a521475eb 280w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=560\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=5e49cec9ebe842303d4af20f5852ba8c 560w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=840\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=e3435e0aa25ca8d317fd7a5f48ef8f68 840w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=1100\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=3a8c304774cf9a3011974f7a715c70c0 1100w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=1650\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=8f7bba5916178792924dfe1e65aad6a6 1650w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToCosmos.png?w=2500\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=bf93ab3d92777ea6d57ee1976f866bab 2500w`}),`\n`,_jsx(_components.p,{children:`ERC-20 tokens are transferred from Ethereum to Injective through the following mechanism:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Depositing ERC-20 tokens on the Peggy Contract:`}),` A user initiates a transfer of ERC-20 tokens from Ethereum to Injective by calling the `,_jsx(_components.code,{children:`sendToInjective`}),` function on the Peggy contract which deposits tokens on the Peggy contract and emits a `,_jsx(_components.code,{children:`SendToInjectiveEvent`}),`.\nThe deposited tokens will remain locked until withdrawn at some undetermined point in the future. This event contains the amount and type of tokens, as well as a destination address on the Injective Chain to receive the funds.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Confirming the deposit:`}),` Each `,_jsx(_components.code,{children:`Oracle`}),` witnesses the `,_jsx(_components.code,{children:`SendToInjectiveEvent`}),` and sends a `,_jsx(_components.code,{children:`MsgDepositClaim`}),` which contains the deposit information to the Peggy module.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Minting tokens on the Injective:`}),` Once a majority of validators confirm the deposit claim, the deposit is processed.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`If the asset is Ethereum originated, the tokens are minted and transferred to the intended recipient’s address on the Injective Chain.`}),`\n`,_jsx(_components.li,{children:`If the asset is Cosmos-SDK originated, the coins are unlocked and transferred to the intended recipient’s address on the Injective Chain.`}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`3`,id:`withdrawing-tokens-from-injective-to-ethereum`,children:_jsx(_components.strong,{children:`Withdrawing tokens from Injective to Ethereum`})}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=59a9dd237d6580d09260ee392034a7a2`,alt:`img.png`,\"data-og-width\":`2760`,width:`2760`,\"data-og-height\":`3480`,height:`3480`,\"data-path\":`developers-native/injective/peggy/images/SendToEth.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=280\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=141406e8153366261adb5702cbbe30a2 280w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=560\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=4b6c6cad37cb43a06e2528431817c93d 560w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=840\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=8e720ff5c6c2ba6fa2be4a070adaf36e 840w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=1100\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=e807563d1e8a66a9fb5304ca7bcafcf3 1100w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=1650\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=cd66740e4f4e369f2e5f470483a556ad 1650w, https://mintcdn.com/injectivelabs/uX2NM6Rg-WvYYnwC/developers-native/injective/peggy/images/SendToEth.png?w=2500\u0026fit=max\u0026auto=format\u0026n=uX2NM6Rg-WvYYnwC\u0026q=85\u0026s=7a685a6a1d42d001818e15c54fe2b8fc 2500w`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Request Withdrawal from Injective:`}),` A user can initiate the transfer of assets from the Injective Chain to Ethereum by sending a `,_jsx(_components.code,{children:`MsgSendToEth`}),` transaction to the peggy module.`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`If the asset is Ethereum native, the represented tokens are burnt.`}),`\n`,_jsxs(_components.li,{children:[`If the asset is Cosmos SDK native, coins are locked in the module. The withdrawal is then added to `,_jsx(_components.code,{children:`Outgoing Tx Pool`}),`.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Batch Creation:`}),` A `,_jsx(_components.code,{children:`Batch Creator`}),` observes the pool of pending withdrawals. The batch creator (or any external third party) then requests a batch of to be created for given token by sending `,_jsx(_components.code,{children:`MsgRequestBatch`}),` to the Injective Chain. The `,_jsx(_components.code,{children:`Peggy module`}),` collects withdrawals matching the token type into a batch and puts it in `,_jsx(_components.code,{children:`Outgoing Batch Pool`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Batch Confirmation:`}),` Upon detecting the existence of an Outgoing Batch, the `,_jsx(_components.code,{children:`Signer`}),` signs over the batch with its Ethereum key and submits a `,_jsx(_components.code,{children:`MsgConfirmBatch`}),` tx to the Peggy module.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Submit Batch to Peggy Contract:`}),` Once a majority of validators confirm the batch, the `,_jsx(_components.code,{children:`Relayer`}),` calls `,_jsx(_components.code,{children:`submitBatch`}),` on the Peggy contract with the batch and its confirmations. The Peggy contract validates the signatures, updates the batch checkpoint, processes the batch ERC-20 withdrawals, transfers the batch fee to the tx sender and emits a `,_jsx(_components.code,{children:`TransactionBatchExecutedEvent`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send Withdrawal Claim to Injective:`}),` `,_jsx(_components.code,{children:`Oracles`}),` witness the `,_jsx(_components.code,{children:`TransactionBatchExecutedEvent`}),` and send a `,_jsx(_components.code,{children:`MsgWithdrawClaim`}),` containing the withdrawal information to the Peggy module.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Prune Batches`}),` Once a majority of validators submit their `,_jsx(_components.code,{children:`MsgWithdrawClaim`}),` , the batch is deleted along and all previous batches are cancelled on the Peggy module. Withdrawals in cancelled batches get moved back into `,_jsx(_components.code,{children:`Outgoing Tx Pool`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Batch Slashing:`}),` Validators are responsible for confirming batches and are subject to slashing if they fail to do so. Read more on `,_jsx(_components.a,{href:`/developers-native/injective/peggy/05_slashing`,children:`batch slashing`}),`.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Note while that batching reduces individual withdrawal costs dramatically, this comes at the cost of latency and implementation complexity. If a user wishes to withdraw quickly they will have to pay a much higher fee. However this fee will be about the same as the fee every withdrawal from the bridge would require in a non-batching system.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"sidebar_position":2,"title":"Workflow","updatedAt":"2025-12-05","description":null,"href":"/developers-native/injective/peggy/02_workflow"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Workflow","slug":"workflow","depth":1,"children":[]},{"title":"Conceptual Overview","slug":"conceptual-overview","depth":2,"children":[]},{"title":"Types of Assets","slug":"types-of-assets","depth":2,"children":[{"title":"Native Ethereum assets","slug":"native-ethereum-assets","depth":3,"children":[]},{"title":"Native Cosmos SDK assets","slug":"native-cosmos-sdk-assets","depth":3,"children":[]}]},{"title":"Orchestrator (Peggo) subprocesses","slug":"orchestrator-peggo-subprocesses","depth":2,"children":[{"title":"Batch Creator","slug":"batch-creator","depth":3,"children":[]},{"title":"Signer","slug":"signer","depth":3,"children":[]},{"title":"Oracle","slug":"oracle","depth":3,"children":[]},{"title":"Relayer","slug":"relayer","depth":3,"children":[]}]},{"title":"End-to-end Lifecycle","slug":"end-to-end-lifecycle","depth":2,"children":[{"title":"Peggy Smart Contract Deployment","slug":"peggy-smart-contract-deployment","depth":3,"children":[]},{"title":"Updating Injective Chain validator set on Ethereum","slug":"updating-injective-chain-validator-set-on-ethereum","depth":3,"children":[]},{"title":"Transferring ERC-20 tokens from Ethereum to Injective","slug":"transferring-erc-20-tokens-from-ethereum-to-injective","depth":3,"children":[]},{"title":"Withdrawing tokens from Injective to Ethereum","slug":"withdrawing-tokens-from-injective-to-ethereum","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/injectivelabs/afb6b70adb7c4270/layout-tweaks.js"],"subdomain":"injectivelabs","siteName":"Injective Docs","title":"Workflow - Injective Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/developers-native/injective/peggy/02_workflow","matchLevel":0},"zh-Hans":{"href":"/cn","matchLevel":4},"ko":{"href":"/ko/developers-native/injective/peggy/02_workflow","matchLevel":1},"jp":{"href":"/jp","matchLevel":4}}},"lastModified":"2026-10-11T10:31:52.054Z","gitLastModified":"2026-03-31T12:24:45.000Z","originalFileLocation":"developers-native/injective/peggy/02_workflow.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Injective Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Workflow - Injective Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Injective Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://injectivelabs.mintlify.site/_mintlify/api/og/v2?division=Peggy\u0026amp;title=Workflow\u0026amp;theme=899fdb1d0593f9b560558788\u0026amp;signature=a89927dd7b873fa9cfe1d8038f1955439f497619060f3ebfd743034cd72cae10\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Workflow - Injective Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://injectivelabs.mintlify.site/_mintlify/api/og/v2?division=Peggy\u0026amp;title=Workflow\u0026amp;theme=899fdb1d0593f9b560558788\u0026amp;signature=a89927dd7b873fa9cfe1d8038f1955439f497619060f3ebfd743034cd72cae10\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/injectivelabs/dGav8VeqGBHoojU_/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Injective Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0082FA\">\u003cmeta data-mint-head name=\"indexnow-verification\" content=\"83e83a6368fb4defb4ae2ae309922656\">\u003cmeta data-mint-head name=\"msvalidate.01\" content=\"C0245176149C1961102F102F1E76F150\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/developers-native/injective/peggy/02_workflow.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.injective.network/ko/developers-native/injective/peggy/02_workflow\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.injective.network/#organization\",\"name\":\"Injective Docs\",\"url\":\"https://docs.injective.network\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/injectivelabs/QlZaYS7qaDAyLKCM/img/injective-logo-192x192.png?fit=max\u0026auto=format\u0026n=QlZaYS7qaDAyLKCM\u0026q=85\u0026s=07e0ad67fc7a332d74f7d418e2727dbd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.injective.network#website\",\"name\":\"Injective Docs\",\"url\":\"https://docs.injective.network\",\"publisher\":{\"@id\":\"https://docs.injective.network/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow#webpage\",\"url\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\",\"name\":\"Workflow\",\"dateModified\":\"2026-03-31T12:24:45.000Z\",\"isPartOf\":{\"@id\":\"https://docs.injective.network#website\"},\"breadcrumb\":{\"@id\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"BUILD\",\"item\":\"https://docs.injective.network/build-index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Native Developers\",\"item\":\"https://docs.injective.network/developers-native\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Injective Modules\",\"item\":\"https://docs.injective.network/developers-native/injective\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Peggy\",\"item\":\"https://docs.injective.network/developers-native/injective/peggy\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Workflow\",\"item\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow#article\",\"headline\":\"Workflow\",\"name\":\"Workflow\",\"url\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow\",\"mainEntityOfPage\":{\"@id\":\"https://docs.injective.network/developers-native/injective/peggy/02_workflow#webpage\"},\"dateModified\":\"2026-03-31T12:24:45.000Z\",\"publisher\":{\"@id\":\"https://docs.injective.network/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.injective.network#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Injective Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Injective Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/developers-native/injective/peggy/02_workflow.md","siteName":"Injective Docs","nav":{"global":null,"languages":[{"language":"en","footer":{"socials":{"website":"https://injective.com/","github":"https://github.com/InjectiveLabs","x":"https://x.com/injective","youtube":"https://youtube.com/@injective_","discord":"https://discord.gg/injective","telegram":"https://t.me/+8Y_0HOFLhnRlZDU9","linkedin":"https://www.linkedin.com/company/injectivelabs","reddit":"https://www.reddit.com/r/injective"},"links":[{"header":"About docs","items":[{"label":"Maintained by Injective Labs' Developer Relations Team","href":"https://injective.com/"},{"label":"Open an issue","href":"https://github.com/InjectiveLabs/injective-docs/issues"},{"label":"Submit a PR","href":"https://github.com/InjectiveLabs/injective-docs/pulls"}]},{"header":"Resources","items":[{"label":"Operator Portal","href":"https://chain.injective.network"},{"label":"Network Status","href":"https://status.injective.network"},{"label":"Blog","href":"https://injective.com/blog"},{"label":"Build","href":"https://injective.com/build"},{"label":"7 days of Injective","href":"https://youtube.com/watch?v=bE9JbFpsDFM\u0026list=PLTS_stt4XpDBGDXxrx4crxijAemFr3Mix"}]}]},"tabs":[{"tab":"Getting Started","pages":[{"title":"Getting Started","href":""}]},{"tab":"Build on Injective","pages":[{"title":"Build on Injective","href":"/developers-defi/integrator-guide"}]},{"tab":"Develop","groups":[{"group":"BUILD","pages":[{"title":"Overview","icon":"hammer","href":"/build-index"},{"group":"Developer Setup","icon":"screwdriver-wrench","pages":[{"title":"Developer Setup","sidebarTitle":"Overview","href":"/developers/setup"}]},{"group":"EVM Developers","icon":"rectangle-code","expanded":false,"pages":[{"title":"Overview","href":"/developers-evm/index"},{"title":"EVM Network Information","href":"/developers-evm/network-information"},{"title":"Local EVM Development","href":"/developers-evm/local-development"},{"group":"Your First EVM Smart Contract","pages":[{"title":"Your First EVM Smart Contract","href":"/developers-evm/smart-contracts/index"},{"title":"Set up Hardhat and compile a smart contract","href":"/developers-evm/smart-contracts/compile-hardhat"},{"title":"Test a smart contract using Hardhat","href":"/developers-evm/smart-contracts/test-hardhat"},{"title":"Deploy a smart contract using Hardhat","href":"/developers-evm/smart-contracts/deploy-hardhat"},{"title":"Verify a smart contract using Hardhat","href":"/developers-evm/smart-contracts/verify-hardhat"},{"title":"Interact with a smart contract using Hardhat","href":"/developers-evm/smart-contracts/interact-hardhat"},{"title":"Set up Foundry and compile a smart contract","href":"/developers-evm/smart-contracts/compile-foundry"},{"title":"Test a smart contract using Foundry","href":"/developers-evm/smart-contracts/test-foundry"},{"title":"Deploy a smart contract using Foundry","href":"/developers-evm/smart-contracts/deploy-foundry"},{"title":"Verify a smart contract using Foundry","href":"/developers-evm/smart-contracts/verify-foundry"},{"title":"Interact with a smart contract using Foundry","href":"/developers-evm/smart-contracts/interact-foundry"}]},{"group":"Your First EVM dApp","pages":[{"title":"Your First EVM dApp","href":"/developers-evm/dapps/index"},{"title":"Connect with MetaMask","href":"/developers-evm/dapps/connect-with-metamask"},{"title":"Connect with WalletConnect","href":"/developers-evm/dapps/connect-with-walletconnect"}]},{"title":"EVM Equivalence","href":"/developers-evm/evm-equivalence"},{"title":"MultiVM Token Standard","href":"/developers-evm/multivm-token-standard"},{"title":"Permissioned MTS Tokens","href":"/developers-evm/permissioned-multivm-token"},{"title":"Wrapped INJ (wINJ)","href":"/developers-evm/wrapped-inj"},{"title":"Precompiles","href":"/developers-evm/precompiles"},{"title":"Bank Precompile","href":"/developers-evm/bank-precompile"},{"title":"Exchange Precompile","href":"/developers-evm/exchange-precompile"},{"title":"Oracle Precompile","href":"/developers-evm/oracle-precompile"},{"title":"Swap Precompile","href":"/developers-evm/swap-precompile"},{"title":"IBC Precompile","href":"/developers-evm/ibc-precompile"},{"title":"ERC20 Module","href":"/developers-evm/erc20-module"},{"title":"Infrastructure \u0026 Tooling","href":"/developers-evm/infrastructure-and-tooling"},{"title":"EVM Gateway","href":"/developers-evm/evm-gateway"},{"title":"Alchemy RPC Setup","href":"/developers-evm/alchemy-rpc-setup"},{"title":"Add Injective to Your dApp","href":"/developers-evm/add-injective-to-your-dapp"},{"title":"EVM Integrations Cheat Sheet","href":"/developers-evm/evm-integrations-cheat-sheet"},{"title":"EVM Integrations FAQ","href":"/developers-evm/evm-integrations-faq"},{"title":"EVM Testnet Faucet","url":"https://testnet.faucet.injective.network/","href":"/redirects/https_testnet_faucet_injective_network"},{"title":"EVM Testnet Explorer","url":"https://testnet.blockscout.injective.network/blocks","href":"/redirects/https_testnet_blockscout_injective_network_blocks"}]},{"group":"dApp Developers","icon":"browser","expanded":false,"pages":[{"title":"Building dApps","href":"/developers/dapps/index"},{"title":"Configuring Nuxt","href":"/developers/dapps/configure-nuxt"},{"title":"Configuring React","href":"/developers/dapps/configure-react"},{"title":"Running examples","href":"/developers/dapps/run-examples"},{"title":"Smart Contract","href":"/developers/dapps/example-smart-contract"},{"title":"DEX","href":"/developers/dapps/example-dex"},{"title":"Simple HTML example with Webpack","href":"/developers/dapps/example-webpack"}]},{"group":"Native Developers","icon":"microchip","expanded":false,"pages":[{"title":"Overview","href":"/developers-native/index"},{"group":"Developer Setup","pages":[{"group":"Injective Node and CLI","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/developers/injectived/index"},{"title":"Install","href":"/developers/injectived/install"},{"title":"Usage","href":"/developers/injectived/use"},{"title":"Commands","href":"/developers/injectived/advanced"}]},{"title":"Run a Local Node","href":"/developers-native/developer-setup/local-network"}]},{"group":"Wallets","pages":[{"title":"Wallets","href":"/developers-native/wallets/index"},{"title":"Accounts","href":"/developers-native/wallets/accounts"},{"title":"Wallet Connections","href":"/developers-native/wallets/connections"},{"title":"Wallet Strategy","href":"/developers-native/wallets/strategy"},{"title":"Offchain (Arbitrary) Data","href":"/developers-native/wallets/offchain-data"}]},{"group":"Bridges","pages":[{"title":"Bridges","href":"/developers-native/bridges/index"},{"title":"Ethereum Bridge","href":"/developers-native/bridges/ethereum"}]},{"group":"Transactions","pages":[{"title":"Transactions","href":"/developers-native/transactions/index"},{"title":"Cosmos Transactions","href":"/developers-native/transactions/cosmos"},{"title":"Ledger through Keplr Wallet Transaction","href":"/developers-native/transactions/cosmos-ledger-keplr"},{"title":"Ethereum Transaction","href":"/developers-native/transactions/ethereum"},{"title":"Ethereum Ledger Transaction","href":"/developers-native/transactions/ethereum-ledger"},{"title":"MsgBroadcaster Transaction","href":"/developers-native/transactions/msgbroadcaster"},{"title":"Private Key Transaction","href":"/developers-native/transactions/private-key"},{"title":"Web3 Gateway Transaction","href":"/developers-native/transactions/web3-gateway"}]},{"group":"Transaction Examples","pages":[{"title":"Transaction Examples","href":"/developers-native/examples/index"},{"title":"Auction","href":"/developers-native/examples/auction"},{"title":"AuthZ","href":"/developers-native/examples/authz"},{"title":"Bank","href":"/developers-native/examples/bank"},{"title":"Distribution","href":"/developers-native/examples/distribution"},{"title":"Exchange","href":"/developers-native/examples/exchange"},{"title":"Fee Grant","href":"/developers-native/examples/feegrant"},{"title":"Governance","href":"/developers-native/examples/governance"},{"title":"IBC","href":"/developers-native/examples/ibc"},{"title":"Insurance","href":"/developers-native/examples/insurance"},{"title":"Peggy","href":"/developers-native/examples/peggy"},{"title":"Permissions","href":"/developers-native/examples/permissions"},{"title":"Staking","href":"/developers-native/examples/staking"},{"title":"Token Factory","href":"/developers-native/examples/token-factory"},{"title":"Wasm","href":"/developers-native/examples/wasm"}]},{"group":"Querying the Chain","pages":[{"title":"Querying the Chain","href":"/developers-native/query-chain/index"},{"title":"Auction","href":"/developers-native/query-chain/auction"},{"title":"Auth","href":"/developers-native/query-chain/auth"},{"title":"Bank","href":"/developers-native/query-chain/bank"},{"title":"Distribution","href":"/developers-native/query-chain/distribution"},{"title":"Exchange","href":"/developers-native/query-chain/exchange"},{"title":"Governance","href":"/developers-native/query-chain/governance"},{"title":"IBC","href":"/developers-native/query-chain/ibc"},{"title":"Mint","href":"/developers-native/query-chain/mint"},{"title":"Insurance Funds","href":"/developers-native/query-chain/insurance-funds"},{"title":"Oracle","href":"/developers-native/query-chain/oracle"},{"title":"Peggy","href":"/developers-native/query-chain/peggy"},{"title":"Permissions","href":"/developers-native/query-chain/permissions"},{"title":"Staking","href":"/developers-native/query-chain/staking"},{"title":"Tendermint","href":"/developers-native/query-chain/tendermint"},{"title":"Wasm","href":"/developers-native/query-chain/wasm"},{"title":"WasmX","href":"/developers-native/query-chain/wasmx"},{"title":"Token Factory","href":"/developers-native/query-chain/token-factory"}]},{"group":"Querying the Indexer","pages":[{"title":"Querying the Indexer","href":"/developers-native/query-indexer/index"},{"title":"Account","href":"/developers-native/query-indexer/account"},{"title":"Auction","href":"/developers-native/query-indexer/auction"},{"title":"Derivatives","href":"/developers-native/query-indexer/derivatives"},{"title":"Explorer","href":"/developers-native/query-indexer/explorer"},{"title":"Insurance Funds","href":"/developers-native/query-indexer/insurance-funds"},{"title":"Markets","href":"/developers-native/query-indexer/markets"},{"title":"Leaderboard","href":"/developers-native/query-indexer/leaderboard"},{"title":"Mito","href":"/developers-native/query-indexer/mito"},{"title":"Oracle","href":"/developers-native/query-indexer/oracle"},{"title":"Portfolio","href":"/developers-native/query-indexer/portfolio"},{"title":"Spot","href":"/developers-native/query-indexer/spot"},{"title":"Web3 Gateway Transactions","href":"/developers-native/query-indexer/transaction"}]},{"group":"Streaming the Indexer","pages":[{"title":"Streaming the Indexer","href":"/developers-native/query-indexer-stream/index"},{"title":"Account","href":"/developers-native/query-indexer-stream/account"},{"title":"Archiver","href":"/developers-native/query-indexer-stream/archiver"},{"title":"Auction","href":"/developers-native/query-indexer-stream/auction"},{"title":"Derivatives","href":"/developers-native/query-indexer-stream/derivatives"},{"title":"Mito","href":"/developers-native/query-indexer-stream/mito"},{"title":"Oracle","href":"/developers-native/query-indexer-stream/oracle"},{"title":"Portfolio","href":"/developers-native/query-indexer-stream/portfolio"},{"title":"Spot","href":"/developers-native/query-indexer-stream/spot"},{"title":"Trading","href":"/developers-native/query-indexer-stream/trading"},{"title":"Explorer","href":"/developers-native/query-indexer-stream/explorer"}]},{"title":"Querying GraphQL Endpoints","href":"/developers-native/query-ethereum"},{"group":"Injective Modules","pages":[{"title":"Injective","href":"/developers-native/injective/index"},{"group":"Auction","pages":[{"title":"Auction","href":"/developers-native/injective/auction/index"},{"title":"State","href":"/developers-native/injective/auction/01_state"},{"title":"Messages","href":"/developers-native/injective/auction/02_messages"},{"title":"End-Block","href":"/developers-native/injective/auction/03_end_block"},{"title":"Events","href":"/developers-native/injective/auction/04_events"},{"title":"Parameters","href":"/developers-native/injective/auction/05_params"},{"title":"Error Codes","href":"/developers-native/injective/auction/99_errors"}]},{"group":"Exchange","pages":[{"title":"Exchange","href":"/developers-native/injective/exchange/index"},{"title":"Derivative Market Concept","href":"/developers-native/injective/exchange/00_derivative_market_concepts"},{"title":"Spot Market Concepts","href":"/developers-native/injective/exchange/01_spot_market_concepts"},{"title":"Binary Options Markets","href":"/developers-native/injective/exchange/02_binary_options_markets"},{"title":"Other Concepts","href":"/developers-native/injective/exchange/02_other_concepts"},{"title":"State","href":"/developers-native/injective/exchange/03_state"},{"title":"State Transitions","href":"/developers-native/injective/exchange/04_state_transitions"},{"title":"Messages","href":"/developers-native/injective/exchange/05_messages"},{"title":"Governance Proposals","href":"/developers-native/injective/exchange/06_proposals"},{"title":"BeginBlocker","href":"/developers-native/injective/exchange/07_begin_block"},{"title":"EndBlocker","href":"/developers-native/injective/exchange/08_end_block"},{"title":"Events","href":"/developers-native/injective/exchange/09_events"},{"title":"Parameters","href":"/developers-native/injective/exchange/10_params"},{"title":"MsgPrivilegedExecuteContract","href":"/developers-native/injective/exchange/11_msg_privileged_execute_contract"},{"title":"Gas Heuristics","href":"/developers-native/injective/exchange/12_gas_heuristics"},{"title":"Error Codes","href":"/developers-native/injective/exchange/99_errors"}]},{"group":"ERC20","pages":[{"title":"ERC20","href":"/developers-native/injective/erc20/index"},{"title":"Concepts","href":"/developers-native/injective/erc20/01_concepts"},{"title":"State","href":"/developers-native/injective/erc20/02_state"},{"title":null,"href":"/developers-native/injective/erc20/03_messages"},{"title":"Events","href":"/developers-native/injective/erc20/04_events"}]},{"group":"EVM","pages":[{"title":"EVM","href":"/developers-native/injective/evm/index"},{"title":"Concepts","href":"/developers-native/injective/evm/01_concepts"},{"title":"State","href":"/developers-native/injective/evm/02_state"},{"title":"State Transitions","href":"/developers-native/injective/evm/03_state_transitions"},{"title":"Transactions","href":"/developers-native/injective/evm/04_transactions"},{"title":"Application Blockchain Interface (ABCI)","href":"/developers-native/injective/evm/05_abci"},{"title":"Hooks","href":"/developers-native/injective/evm/06_hooks"},{"title":"Events","href":"/developers-native/injective/evm/07_events"},{"title":"Parameters","href":"/developers-native/injective/evm/08_params"},{"title":"Client","href":"/developers-native/injective/evm/09_client"}]},{"group":"Insurance","pages":[{"title":"Insurance","href":"/developers-native/injective/insurance/index"},{"title":"State","href":"/developers-native/injective/insurance/01_state"},{"title":"State Transitions","href":"/developers-native/injective/insurance/02_state_transitions"},{"title":"Messages","href":"/developers-native/injective/insurance/03_messages"},{"title":"End-Block","href":"/developers-native/injective/insurance/04_end_block"},{"title":"Events","href":"/developers-native/injective/insurance/05_events"},{"title":"Parameters","href":"/developers-native/injective/insurance/06_params"},{"title":"Future Improvements","href":"/developers-native/injective/insurance/07_future_improvements"},{"title":"Error Codes","href":"/developers-native/injective/insurance/99_errors"}]},{"group":"OCR","pages":[{"title":"OCR","href":"/developers-native/injective/ocr/index"},{"title":"Concepts","href":"/developers-native/injective/ocr/01_concepts"},{"title":"State","href":"/developers-native/injective/ocr/02_state"},{"title":"Messages","href":"/developers-native/injective/ocr/03_messages"},{"title":"Governance Proposals","href":"/developers-native/injective/ocr/04_proposals"},{"title":"Begin-Block","href":"/developers-native/injective/ocr/05_begin_block"},{"title":null,"href":"/developers-native/injective/ocr/06_hooks"},{"title":"Events","href":"/developers-native/injective/ocr/07_events"},{"title":"Params","href":"/developers-native/injective/ocr/08_params"},{"title":"Error Codes","href":"/developers-native/injective/ocr/99_errors"}]},{"group":"Oracle","pages":[{"title":"Oracle","href":"/developers-native/injective/oracle/index"},{"title":"State","href":"/developers-native/injective/oracle/01_state"},{"title":"Keepers","href":"/developers-native/injective/oracle/02_keeper"},{"title":"Messages","href":"/developers-native/injective/oracle/03_messages"},{"title":"Governance Proposals","href":"/developers-native/injective/oracle/04_proposals"},{"title":"Events","href":"/developers-native/injective/oracle/05_events"},{"title":"Future Improvements","href":"/developers-native/injective/oracle/06_future_improvements"},{"title":"Error Codes","href":"/developers-native/injective/oracle/99_errors"}]},{"group":"Peggy","pages":[{"title":"Peggy","href":"/developers-native/injective/peggy/index"},{"title":"Definitions","description":null,"href":"/developers-native/injective/peggy/01_definitions"},{"title":"Workflow","href":"/developers-native/injective/peggy/02_workflow"},{"title":"State","description":null,"href":"/developers-native/injective/peggy/03_state"},{"title":"Messages","href":"/developers-native/injective/peggy/04_messages"},{"title":"Slashing","href":"/developers-native/injective/peggy/05_slashing"},{"title":"End-Block","href":"/developers-native/injective/peggy/06_end_block"},{"title":"Events","href":"/developers-native/injective/peggy/07_events"},{"title":"Parameters","href":"/developers-native/injective/peggy/08_params"},{"title":"Relay Semantics","href":"/developers-native/injective/peggy/09_relay_semantics"},{"title":"Future Improvements","href":"/developers-native/injective/peggy/10_future_improvements"},{"title":"Error Codes","href":"/developers-native/injective/peggy/99_errors"}]},{"group":"Permissions","pages":[{"title":"Permissions","href":"/developers-native/injective/permissions/index"},{"title":"Key Concepts","href":"/developers-native/injective/permissions/01_concepts"},{"title":"State","href":"/developers-native/injective/permissions/02_state"},{"title":"State Transitions","href":"/developers-native/injective/permissions/03_state_transitions"},{"title":"How to Launch Permissioned Assets","href":"/developers-native/injective/permissions/04_launch_permissioned_asset"},{"title":"Error Codes","href":"/developers-native/injective/permissions/99_errors"}]},{"group":"TokenFactory","pages":[{"title":"TokenFactory","href":"/developers-native/injective/tokenfactory/index"},{"title":"Concepts","href":"/developers-native/injective/tokenfactory/01_concepts"},{"title":"State","href":"/developers-native/injective/tokenfactory/02_state"},{"title":null,"href":"/developers-native/injective/tokenfactory/03_messages"},{"title":"Events","href":"/developers-native/injective/tokenfactory/04_events"},{"title":"Params","href":"/developers-native/injective/tokenfactory/05_params"},{"title":"Error Codes","href":"/developers-native/injective/tokenfactory/99_errors"}]},{"group":"WasmX","pages":[{"title":"Wasmx","href":"/developers-native/injective/wasmx/index"},{"title":"Concepts","href":"/developers-native/injective/wasmx/01_concepts"},{"title":"Data","href":"/developers-native/injective/wasmx/02_data"},{"title":"Governance Proposals","href":"/developers-native/injective/wasmx/03_proposals"},{"title":"Messages","href":"/developers-native/injective/wasmx/04_messages"},{"title":"Params","href":"/developers-native/injective/wasmx/05_params"},{"title":"Error Codes","href":"/developers-native/injective/wasmx/99_errors"}]},{"title":"Lanes","href":"/developers-native/injective/lanes"},{"title":"Txfees","href":"/developers-native/injective/txfees"}]},{"group":"Core Modules","pages":[{"title":"Core","href":"/developers-native/core/index"},{"title":"Auth","href":"/developers-native/core/auth"},{"title":"Authz","href":"/developers-native/core/authz"},{"title":"Bank","href":"/developers-native/core/bank"},{"title":"Consensus","href":"/developers-native/core/consensus"},{"title":"Crisis","href":"/developers-native/core/crisis"},{"title":"Distribution","href":"/developers-native/core/distribution"},{"title":"Evidence","href":"/developers-native/core/evidence"},{"title":"Feegrant","href":"/developers-native/core/feegrant"},{"title":"Gov","href":"/developers-native/core/gov"},{"title":"Group","href":"/developers-native/core/group"},{"title":"Mint","href":"/developers-native/core/mint"},{"title":"Nft","href":"/developers-native/core/nft"},{"title":"Params","href":"/developers-native/core/params"},{"title":"Slashing","href":"/developers-native/core/slashing"},{"title":"Staking","href":"/developers-native/core/staking"},{"title":"Upgrade","href":"/developers-native/core/upgrade"},{"title":"Circuit","href":"/developers-native/core/circuit"},{"title":"Genutil","href":"/developers-native/core/genutil"}]}]},{"group":"CosmWasm Developers","icon":"comet","expanded":false,"pages":[{"title":"Overview","href":"/developers-cosmwasm/index"},{"group":"CosmWasm Smart Contracts","pages":[{"title":"CosmWasm Smart Contracts","href":"/developers-cosmwasm/smart-contracts/index"},{"title":"Your First CosmWasm Smart Contract","href":"/developers-cosmwasm/smart-contracts/your-first-smart-contract"},{"title":"Injective Name Service","href":"/developers-cosmwasm/smart-contracts/injective-name-service"},{"title":"NeptuneService","href":"/developers-cosmwasm/smart-contracts/neptune-service"},{"title":"CW20 to Bank \u0026 Market Order in One Transaction","href":"/developers-cosmwasm/smart-contracts/cw20-convert-market-order"}]},{"title":"Local Development","href":"/developers-cosmwasm/local-development-guide"},{"title":"Mainnet Deployment","href":"/developers-cosmwasm/mainnet-deployment-guide"},{"title":"Whitelisting deployment address","href":"/developers-cosmwasm/whitelisting-deployment-address-guide"},{"title":"Create your Swap Contract","href":"/developers-cosmwasm/create-your-swap-contract-guide"},{"title":"Creating UIs","href":"/developers-cosmwasm/create-uis-guide"},{"title":"Using Injective Modules and Queries in CosmWasm","href":"/developers-cosmwasm/cosmwasm-any"},{"title":"CW20 Adapter","href":"/developers-cosmwasm/cw20-adapter"},{"title":"Injective Test Tube","href":"/developers-cosmwasm/injective-test-tube"}]},{"group":"AI Developers","icon":"brain","expanded":false,"pages":[{"title":"AI developers","href":"/developers-ai/index"},{"title":"AI SDK","href":"/developers-ai/ai-sdk"},{"title":"Injective CLI Agent Skill","href":"/developers-ai/injective-cli-skill"},{"title":"Injective EVM Developer Agent Skill","href":"/developers-ai/injective-evm-developer-skill"},{"title":"Injective MCP Servers Skill","href":"/developers-ai/injective-mcp-servers-skill"},{"title":"Injective Trading Skills","href":"/developers-ai/injective-trading-skills"},{"title":"Injective Documentation MCP Server","href":"/developers-ai/documentation-mcp"},{"title":"Injective MCP Server","href":"/developers-ai/mcp"},{"title":"x402","href":"/developers-ai/x402"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks-index"}]},{"tab":"Testnet","pages":[{"title":"Testnet","href":"/testnet"}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/resources-index"}]}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/cn"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/developers-native/injective/peggy/02_workflow"}]},{"language":"jp","pages":[{"title":"jp","href":"/jp"}]}]},"basePath":"","title":"Workflow - Injective Docs","deploymentId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","buildId":"dpl_QQ3G2kinQNQFFK6Sh8dmX2teK74w","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-lceUjs6n.js","lightbox-handle-r17bVUz3.js"]}