Skip to content

Add Cetus compensation module ported from sui-alpha-sdk - #89

Merged
harshaalphafi merged 1 commit into
mainfrom
feature/cetus-compensation
Jul 24, 2026
Merged

Add Cetus compensation module ported from sui-alpha-sdk#89
harshaalphafi merged 1 commit into
mainfrom
feature/cetus-compensation

Conversation

@11felix

@11felix 11felix commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Ports getUserCompensationAmountAll / userCollectCetusCompensation / userCollectCetusCompensationAll from sui-alpha-sdk with identical signatures and response shapes.

  • Only the 15 attacked pool names + compensator object IDs are hardcoded; pool data (pool IDs, coin types, move-call variant) is derived from /public/config
  • All chain reads and simulation via GraphQL (no JSON-RPC)
  • Verified against a real address: per-pool amounts sum exactly to the collect-all dry-run's CETUS balance change

Unblocks removing the sui-alpha-sdk dependency from alphafi-fe.

@11felix
11felix requested a review from jangid as a code owner July 23, 2026 19:17
@jangid

jangid commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

operate.md review — clean ✅

CI green (lint/test/build at HEAD cd444d3), no unresolved review threads. Reviewed the full current diff; no correctness, security, or breaking-change issues. This is an incident-scoped port of the Cetus compensation module (response shapes preserved), so the absence of new unit tests is acceptable.

Non-blocking notes (🟢, do not gate merge):

  • A few any uses parse the external /public/config response (entry.data, (r: any)). At an untyped network boundary this is defensible, but a narrow unknown + validated shape would be cleaner and stay within the repo's "no unjustified any" convention.
  • No tests added for the new ~260-line module — fine for an incident-scoped port, worth a follow-up if this path becomes long-lived.

Approving. Approvals now 2/2 (threshold met) — merge-ready pending your merge.

@jangid jangid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

operate.md: clean — CI green, no unresolved threads; incident-scoped port. Non-blocking notes in the summary comment. Approvals: 2/2 — threshold met, merge-ready pending your merge.

@harshaalphafi
harshaalphafi merged commit 8b661a5 into main Jul 24, 2026
3 checks passed
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.

4 participants