feat(liquidation): PEPL support for GIGAHDX liquidations#1466
Open
iamyxsh wants to merge 8 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Crate versions that have not been updated:
hydradx-runtime: cargo and spec versions don't match. Runtime version has not been increased. |
Add query helpers (queries.ts) and 6 test groups inspired by integration-tests/src/gigahdx.rs: - Preconditions: pool approval, borrower stake, oracle price - Dispatch routing: stHDX-670 and GIGAHDX-67 both hit liquidate_gigahdx - Negative cases: wrong debt asset, no position, healthy position - Post-liquidation state: borrower stakes/gigahdx reduced, TotalLocked - Sequential liquidations: multiple 1-HOLLAR calls progressively drain - Staking lifecycle: gigaStake creates record, unstaked account is null Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…oncurrency) GigaHdxLiquidationAccount was returning //Bob for fork-test convenience — restore PalletId(*b"gigaliq!") derivation. Scraper CONCURRENCY was reduced to 50 for lark2 proxy — restore 1000. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…teral Liquidation execution tests need Bob with DOT on the MAIN AAVE pool (see gotcha #12). On forks without that, tests now skip gracefully instead of failing in the before() hook. Negative and staking tests still run unconditionally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- liquidator.ts: use gigaStake (like Martin's integration tests) instead of MAIN pool DOT supply — avoids EVM-side token funding issues - Healthy-position test: use Bob (staked, no debt) instead of shared borrower whose HF drops from prior test groups' price crashes - TotalLocked test: seized HDX re-locks under liq_account, so total is preserved not decreased All 15 e2e tests pass on lark2 fork zombienet. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
liquidatedispatch toliquidate_gigahdxwhen collateral is either GIGAHDX (asset 67) or stHDX (asset 670), since PEPL resolves the underlying reserve address--pap-contractnow accepts comma-separated addresses, worker tracks borrowers per-poolmax_candidate_depth3→4 to match runtime'sUNINCLUDED_SEGMENT_CAPACITYscripts/gigahdx-liquidation/e2e test project (Mocha + ethers) for fork-based liquidation testingTest plan
pallet-gigahdx— 130 tests passedpallet-gigahdx-rewards— 30 tests passedpallet-liquidation— 8 tests passedpallet-staking— 67 tests passedruntime-integration-tests(gigahdx + gigahdx_rewards) — 92 tests passedcargo fmt --check— clean🤖 Generated with Claude Code