Skip to content

fix(keepers): raise submission fee and retry txInsufficientFee - #759

Merged
collinsezedike merged 3 commits into
mainfrom
fix/keeper-insufficient-fee-rejections
Sep 13, 2026
Merged

collinsezedike merged 3 commits into
mainfrom
fix/keeper-insufficient-fee-rejections

Conversation

@collinsezedike

Copy link
Copy Markdown
Collaborator

Summary

  • Real mainnet log from the accrual keeper: Transaction rejected at submission: txInsufficientFee on meridian-usdc's adapter, confirmed via Vercel Functions Observability, not a timeout as originally suspected from the platform's own timeout alert.
  • Root cause: submitKeeperOperation (keeper-tx.ts) built every keeper transaction with the network's absolute minimum classic fee (BASE_FEE, 100 stroops, internal.ts), shared with the user-facing transaction-building path where a wallet can react to a rejection. An unattended keeper has no such fallback, so any ordinary fee-market congestion produces a hard rejection.
  • isTransientKeeperError didn't recognize txInsufficientFee as retryable, so the keeper gave up after one attempt instead of retrying with a higher bid.
  • Fix: added a keeper-specific starting fee (KEEPER_BASE_FEE_STROOPS, 10,000 stroops) well above the network floor, escalating per retry attempt (keeperFeeForAttempt, doubling each time), and classified txInsufficientFee as transient so a rejection now actually retries with a bumped fee instead of failing outright. internal.ts's BASE_FEE and the user-facing transaction-building path are untouched.
  • Threaded the real retry attempt number from both keepers' existing withKeeperRetry callbacks into submitKeeperOperation, so each retry bids higher than the last.

Test plan

  • pnpm typecheck && pnpm lint pass across the whole monorepo (turbo run lint typecheck, 16/16 tasks)
  • Full monorepo test suite passes (turbo run test, 16/16 tasks, including @meridian/api's keeper-endpoint tests)
  • Added unit tests for the new txInsufficientFee transient classification and the keeperFeeForAttempt escalation
  • prettier --check passes on every changed file

@vercel

vercel Bot commented Sep 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
meridian Ready Ready Preview Sep 13, 2026 6:34pm UTC

@collinsezedike
collinsezedike force-pushed the fix/keeper-insufficient-fee-rejections branch from ed93342 to 16f44c6 Compare September 13, 2026 18:33
@collinsezedike
collinsezedike merged commit f585858 into main Sep 13, 2026
10 checks passed
@collinsezedike
collinsezedike deleted the fix/keeper-insufficient-fee-rejections branch September 13, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant