Skip to content

fix: use user_emergency_withdraw for alphafi_cetus_pool withdrawals - #100

Draft
Zorag44 wants to merge 1 commit into
mainfrom
feature/emergency-withdraw
Draft

fix: use user_emergency_withdraw for alphafi_cetus_pool withdrawals#100
Zorag44 wants to merge 1 commit into
mainfrom
feature/emergency-withdraw

Conversation

@Zorag44

@Zorag44 Zorag44 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

The alphafi-cetus-investor pools have had emergency withdraw called, so their
liquidity is held as investor emergency balances and user_withdraw can no
longer serve users. Point that branch of withdrawCetusTx at
alphafi_cetus_pool::user_emergency_withdraw, dropping the xTokens amount and
the Cetus config/vault/pool arguments the new signature doesn't take.

Affects ALPHA-USDC, ALPHA-WUSDC, USDC-SUIUSDT, USDT-WUSDC, WETH-WUSDC and
WSOL-WUSDC. Other Cetus branches (alphafi_cetus_pool_base_a,
alphafi_cetus_sui_pool) are unchanged.

Dry-run against mainnet: ALPHA-USDC (already paused) simulates successfully;
the other five abort with 1000 (error::pool_paused) because they are not
paused yet.

Note: user_emergency_withdraw always exits the full receipt, so partial
withdraw amounts are ignored on these pools.

@Zorag44
Zorag44 requested a review from rg-alpha August 31, 2026 12:44
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