Using a vault
Exit in kind
redeemInKind pays your proportional share of both tokens with no oracle gate and no swap, including when the feed is stale. If the Stock Token transfer fails, the stock leg is credited for a later claim.
Three exit paths
| Path | What you receive | Oracle gate | Swap |
|---|---|---|---|
| redeem | The asset value of your shares in the Stock Token, at least previewRedeem. | Required. | The USDG leg is swapped. |
| redeemInKind | Your pro-rata share of the Stock Token and USDG the vault holds. | Not required. | None. |
| UptickRouter.redeemInKindMin | Both legs, forwarded to your receiver and checked against your minimums. | Not required. | None. |
redeem burns your shares and sends the actual proceeds of their pro-rata slice in the Stock Token, at least previewRedeem(shares). It harvests fees first and reverts when the gate is not Ok.
redeemInKind burns your shares and releases their pro-rata slice of the idle balances and the position's liquidity in both tokens. It is not pausable and never routes through a swap, so it does not depend on pool liquidity at the moment you exit.
The router's redeemInKindMin pulls your shares, exits in kind to itself, checks both legs against your minimums with MinStockOut and MinUsdgOut, and forwards stockOut and usdgOut to your receiver.
Why in-kind works on a stale feed
redeemInKind never calls the gate. It tries health() and harvests only when the status is Ok, and it swallows a failing read. The exit then settles from balances the vault already holds, so it works when Chainlink is stale, when the TWAP is unavailable, or when the vault is paused.
What the holder receives
Your slice is shares divided by totalSupply of everything the vault holds in both tokens: idle balances, and both legs of the position taken through decreaseLiquidity and collect. Uncollected fees are not part of the release. They stay in the vault and are harvested later when the oracle allows it.
Because the vault holds both legs of the position and idle balances in both, an in-kind exit can return more of one token than a stock-only exit would. The split reflects the position's composition at your share of the supply, not a swap at the moment you exit.
If the Stock Token transfer to your receiver reverts, from an issuer pause or a blocklist, the stock leg is credited to your receiver and to totalStockOwed. The credited receiver calls claimStockOwed(to) once the transfer succeeds, and the vault pays the credit to to.
Sources
contracts/src/StockVault.solredeem, redeemInKind, claimStockOwed and the pro-rata release.
contracts/src/UptickRouter.solredeemInKindMin and its MinStockOut and MinUsdgOut checks.
contracts/README.mdThe exit paths and the pause behaviour.