Skip to content

osToken redemptions - #106

Merged
tsudmi merged 19 commits into
mainfrom
redemptions
Aug 26, 2026
Merged

osToken redemptions#106
tsudmi merged 19 commits into
mainfrom
redemptions

Conversation

@ulieth

@ulieth ulieth commented May 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 26, 2026 1:06pm

Request Review

Copilot AI 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.

Pull request overview

This PR expands and refines the osToken documentation by adding a dedicated “osToken Redemptions” page, rewriting key parts of “How osToken Works”, and updating multiple cross-links/navigation entries to point at the new/updated sections.

Changes:

  • Added a new osToken Redemptions doc and included it in the osToken sidebar.
  • Reworked How osToken Works structure/content (LTV, exchange rate, redemption/liquidation, burning) and updated related deep links.
  • Updated a few staker/protocol/operator docs for revised anchors and minor UI/icon adjustments.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
staker/vault-staking.mdx Updates “Position Health” links to new anchors in osToken docs.
staker/risks.mdx Updates osETH depeg explanation link to the new redemption anchor.
sidebars.ts Adds the new osToken redemptions doc to navigation.
operator/start-operator.mdx Swaps the checklist icon asset.
docs/docs/stakewise-protocol/what-is-stakewise.mdx Updates oracle “Token Stability” deep link to the exchange rate section.
docs/docs/ostoken/ostoken-redemptions.mdx Adds new documentation explaining the redemption mechanism and flow.
docs/docs/ostoken/intro.mdx Updates osToken intro copy for clarity and positioning.
docs/docs/ostoken/how-ostoken-works.mdx Major rewrite/restructure of the osToken mechanics page.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread staker/vault-staking.mdx Outdated
Comment thread staker/risks.mdx Outdated
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx Outdated
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/intro.mdx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ulieth <uliana.eth@proton.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ulieth <uliana.eth@proton.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ulieth <uliana.eth@proton.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ulieth <uliana.eth@proton.me>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: ulieth <uliana.eth@proton.me>
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx Outdated
Comment thread docs/docs/ostoken/how-ostoken-works.mdx
Comment thread docs/docs/ostoken/intro.mdx Outdated
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx Outdated
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx Outdated
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx
Comment thread docs/docs/ostoken/ostoken-redemptions.mdx Outdated
Comment thread staker/vault-staking.mdx Outdated
Signed-off-by: Dmitri Tsumak <tsumak.dmitri@gmail.com>
@tsudmi

tsudmi commented Aug 26, 2026

Copy link
Copy Markdown
Member

Code review

Found 2 issues:

  1. The new page says osToken held on Arbitrum counts as kept, but the Operator Service has no Arbitrum code path — it was removed in v3-operator#811 ("Remove Arbitrum support from redemptions"). AVAILABLE_NETWORKS = [MAINNET, HOODI, GNOSIS] (src/config/networks.py), and DeBank/Rabby lookups are pinned to the vault's own chain via API_SUPPORTED_CHAINS = {MAINNET: 'eth', GNOSIS: 'xdai'} with a chain != api_chain: continue filter (src/redemptions/api_client.py). As written, readers would expect Arbitrum balances to be excluded from redeemable when they are not.

3. Skip [Boost](/docs/vaults/boost) positions. Each Boost leverage position has its own proxy contract that holds the osToken on the user's behalf, so those proxy addresses are removed from the minters list, and each user's leveraged shares are subtracted from their balance to avoid double-counting.
4. Compute `kept` shares — osToken in trackable locations: mainnet, Arbitrum, and DeFi protocols indexed by DeBank or Rabby. Anything else is treated as missing.
5. Compute `redeemable = minted − kept`, split it across the user's Vaults proportionally to where they minted, and sort by LTV descending then amount descending so the riskiest positions are drawn down first.

  1. The page states that for a MetaVault short on liquidity the Operator Service "first pulls assets up from Sub-vaults via a separate redeemSubVaultsAssets transaction". The Operator Service never calls redeemSubVaultsAssets — it skips MetaVault positions outright. src/redemptions/commands/process_redeemer.py logs 'Unexpected meta vault position for %s; redeemable positions should not include meta vaults.' and continues, and they are already filtered upstream at the subgraph query with isMetaVault: false (src/redemptions/graph.py). src/redemptions/tasks.py notes "Meta vault assets are not yet distributed across their sub-vault tree." The function exists on OsTokenRedeemer but is not part of the current flow.

The Operator Service downloads the published list from IPFS, picks a batch of eligible positions, and decides how much to redeem from each. If a target Vault is a MetaVault without enough liquidity on hand, the Operator Service first pulls assets up from Sub-vaults via a separate `redeemSubVaultsAssets` transaction. It then builds a Merkle multiproof against the published root and submits a multicall to `OsTokenRedeemer` that refreshes Vault state and calls `redeemOsTokenPositions`.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

@tsudmi
tsudmi merged commit 2fd3c5c into main Aug 26, 2026
2 checks passed
@tsudmi
tsudmi deleted the redemptions branch August 26, 2026 13:07
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