Repository navigation
fix(deposit): track multi-tx deposit routes as one deposit and raise IBC timeout - #2133
Closed
mintae-clk wants to merge 1 commit into
Closed
mintae-clk wants to merge 1 commit into
mintae-clk wants to merge 1 commit into
Conversation
…IBC timeout - Raise the deposit IBC timeout from 10 minutes to 24 hours. On Base -> Injective -> dYdX the Injective IBC tx is only broadcast after the CCTP leg lands (~15-20 min on standard finality), so a 10 minute timeout expired first and the tx failed on chain with "timeout elapsed". - Record a multi-tx route as one deposit (txsRequired + transactions[]), like withdraws, instead of one deposit per broadcast. - Mark the deposit successful only when the last required tx succeeds; mark it failed on a terminal error, a rejected later signature, or a route that can no longer progress after a reload. Never reopen a finished deposit.
|
@mintae-clk is attempting to deploy a commit to the dYdX Trading Team on Vercel. A member of the Team first needs to authorize it. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Addresses two follow-ups listed in #2131: raise the deposit timeout for multi-tx routes, and stop tracking a deposit twice when its route has two broadcasts.
Deposit IBC timeout: 10 minutes -> 24 hours (
depositHooks.ts)/msgssets the Injective -> dYdX IBC timeout when the route is built. That tx is only broadcast after the CCTP leg lands, and a CCTP V2 standard-finality transfer takes about 15-20 minutes. With 10 minutes the timeout had already passed, so the tx failed on chain withtimeout elapsed(code 40) and the funds stayed on Injective.One deposit record per route (
state/transfers.ts,depositHooks.ts)onTransactionBroadcastfires once per tx. Each call used to add a new deposit, so a 2-tx route showed up as two deposits.txsRequiredandtransactions[]. Later broadcasts are appended through a newonDepositBroadcastreducer, the same pattern withdraws use.txHash/chainIdon the deposit stay the origin tx, soupdateDeposit,selectDepositand the status dialog are unchanged.Status tracking (
useUpdateTransfers.tsx)successonly when the last required tx succeeds. Before, the CCTP leg landing on Injective already showed "deposit complete".errorwhen:STATE_COMPLETED_ERROR/STATE_ABANDONED). Before, it stayed pending forever. This also applies to single-tx deposits.inFlightDepositIds.explorerLinkstays the origin tx. Later txs keep their own link intransactions[].response.state, the same fieldwaitForTransactionchecks.statusis deprecated.Compatibility
txsRequired, so they follow the single-tx path as before. No migration is needed.errorinstead of staying pending.Not changed
IS_DEPOSIT_UNDER_MAINTENANCEstaystrue. Re-enabling deposits is your call.Known limitations
inFlightDepositIdsis per tab and transfer state is not synced across tabs. If a second tab is opened during a multi-tx deposit, that tab can mark the depositerror.error, the funds remain on the intermediate chain (Injective). The UI does not yet say where they are.Testing
tsc: no errors in the changed files. The existing TradingView module errors are unrelated.eslinton the changed files: no new warnings.vitest: existing tests pass. There are no deposit tracking tests yet.Issue
Related Issues (Optional)