Skip to content

Skip redemption positions where LTV > 1#766

Merged
evgeny-stakewise merged 1 commit into
v5-releasefrom
ltv-1
Jun 23, 2026
Merged

Skip redemption positions where LTV > 1#766
evgeny-stakewise merged 1 commit into
v5-releasefrom
ltv-1

Conversation

@evgeny-stakewise

@evgeny-stakewise evgeny-stakewise commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Skips redemption positions where LTV > 1 (the user's full minted osToken loan exceeds the value of their vault position).

Redemption lowers a position's LTV when LTV < 1, but raises it when LTV > 1. Redeeming an already-underwater position would push its LTV even higher, which is unwanted, so these positions are now skipped before simulation/submission.

LTV = loan / value, where:

  • loan = converter.to_assets(vault.osTokenPositions(owner)) — the user's total on-chain minted osToken shares (not just the IPFS leaf shares for this round)
  • value = vault.convertToAssets(vault.getShares(owner)) — the user's full vault position

Changes

  • VaultContract: add get_os_token_position and get_user_assets helpers (both back IEthVault ABI calls).
  • redemptions/tasks.py: add is_position_ltv_exceeded.
  • redeem_positions: skip positions failing the LTV check, after the unharvested-vault check and before fetching withdrawable assets.

@evgeny-stakewise evgeny-stakewise merged commit 47ed75b into v5-release Jun 23, 2026
7 checks passed
@evgeny-stakewise evgeny-stakewise deleted the ltv-1 branch June 23, 2026 13:36
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.

2 participants