Skip to content

[Bug] Accrual keeper cannot fail open during a state-store outage #1132

Closed

Description

@collinsezedike

Summary

The accrual keeper documents a deliberate fail-open when the prior submission state is unknown, so a store outage cannot leave every vault's cached TVL/APY stale. But the very next step takes a submission lease through the same state store, so when the store is unreachable acquire returns an error and the adapter is skipped, producing exactly the halted accrual the fail-open is meant to prevent.

Tasks

  1. packages/stellar-sdk-helpers/src/accrual-keeper.ts:461-492 logs and proceeds when prior.state === "unknown", then calls SubmissionLease.acquire with the same stateStore.
  2. packages/stellar-sdk-helpers/src/keeper-state.ts:335-347 returns { error: "submission state store unavailable" } from claim when the store cannot be reached.
  3. packages/stellar-sdk-helpers/src/accrual-keeper.ts:483-492 pushes the adapter into skipped on that error.
  4. Either keep accruing without the lease when the store is unavailable, or correct the comment so the documented behavior matches the code.

Scope

Field Value
Area SDK
Protocol affected None
Network testnet and mainnet
Breaking change? No

Acceptance Criteria

  • The behavior during a state-store outage matches the documented fail-open intent, or the documentation is corrected and the outage path is tested.
  • pnpm lint && pnpm typecheck && pnpm test pass.

Additional Context

Found in a repository-wide code audit on 2026-10-18 and re-verified against the source at 66fad4d.

Star the repo

Please star this repository before picking up this issue. It is a small ask that meaningfully helps the project reach more people.

Activity

  1. added
    bugSomething isn't working
    mediumRequires familiarity with the Meridian codebase or relevant tooling; expect 4–8 hours
    sdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helpers
    on Oct 18, 2026
  2. liutingqiu commented on Oct 18, 2026

    @liutingqiu
    Contributor

    @liutingqiu has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Plan: when the state store is unreachable, do not let the submission lease defeat the documented fail-open. Acquire the lease best-effort, run the accrual path when the store errors out, bound concurrency locally, and log a degraded-mode event. Add a test that simulates a store outage and asserts accrual still updates cached TVL/APY.Relevant: merged reliability fixes in Sottara-Labs/sottara - #208 serialize live testnet workflow runs, #207 bound migration and backup gate timeouts, #197 fail security gate on regression evidence.ETA: 1-2 days after assignment.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @liutingqiu to this issue.

  3. The-Big-Danny commented on Oct 18, 2026

    @The-Big-Danny
    Contributor

    @The-Big-Danny has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello, can I work on this issue?!

    I can fix it!

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @The-Big-Danny to this issue.

  4. drips-wave commented on Oct 18, 2026

    @drips-wave

    Congratulations, @liutingqiu! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @liutingqiu: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  5. grantfox-oss commented on Oct 20, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @liutingqiu's PR #1175 was approved and merged by @collinsezedike.

    🏆 @liutingqiu: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (35 total points). Track your full progress on GrantFox.

    👏 Great work, @liutingqiu! Keep contributing to drydocs.

  6. drips-wave commented on Oct 20, 2026

    @drips-wave

    This issue has been completed by @liutingqiu as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @liutingqiu: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbugSomething isn't workingmediumRequires familiarity with the Meridian codebase or relevant tooling; expect 4–8 hourssdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helpers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions