Skip to content

Holyfuchs/review fixes - #118

Merged
holyfuchs merged 8 commits into
mainfrom
holyfuchs/review-fixes
Aug 15, 2026
Merged

Holyfuchs/review fixes#118
holyfuchs merged 8 commits into
mainfrom
holyfuchs/review-fixes

Conversation

@holyfuchs

Copy link
Copy Markdown
Member
  • FLOWSCAC-4 (one-share oracle NAV floor): YieldTokenOracle.CONVERSION_SAMPLE was hardcoded to 10**vault.decimals(), maximizing the convertToAssets floor and understating large yield positions; it is now a constructor argument, with DeployVault/Status passing 1e36 so the accumulated error is sub-raw-wei for any realistic TVL.

  • FLOWSCAC-11 (redeem debt rounding): _unwindSlice rounds debtSlice up (Ceil) and collSlice/yieldOut down (Floor), matching redeemInKind so the residual position is not left under-collateralized.

  • FLOWSCAC-15 (full delever revert): _rebalanceDelever calls market().repayAll() (repay by borrow shares) when a favorable fill exceeds the remaining debt, instead of repay(currentDebt) (by assets), so a full delever zeros the debt exactly without borrow-share dust that reverts the call.

  • FLOWSCAC-13 (debt-share dust blocks exits): added test_Fuzz_Redeem_WithDebtDust verifying that after a third-party share repayment leaves debt dust, redeem() recovers via rebalance().

  • FLOWSCAC-2 (delever strands loan proceeds): documented in _rebalanceDelever that a favorable fill can leave surplus loan token idle in the vault (accepted trade-off).

  • FLOWSCAC-3 (deposit/redeem MEV slippage): added WARNING NatSpec on deposit() and redeem() in IFCMVault that standard ERC-4626 calls lack slippage protection and should be routed through a router enforcing minSharesOut/minAssetsOut.

@holyfuchs
holyfuchs force-pushed the holyfuchs/review-fixes branch 4 times, most recently from 6e1c1bb to d986b55 Compare August 14, 2026 13:56
@holyfuchs
holyfuchs marked this pull request as ready for review August 14, 2026 14:12
@holyfuchs
holyfuchs force-pushed the holyfuchs/review-fixes branch 2 times, most recently from 59be952 to a0627d6 Compare August 14, 2026 15:17
Base automatically changed from holyfuchs/unhealthy-redeem-block to main August 14, 2026 19:02
@holyfuchs
holyfuchs force-pushed the holyfuchs/review-fixes branch from a0627d6 to 3e5ef2b Compare August 14, 2026 19:02
Comment thread solidity/src/interfaces/IFCMVault.sol
@holyfuchs
holyfuchs force-pushed the holyfuchs/review-fixes branch from 3e5ef2b to 1bba352 Compare August 15, 2026 03:54
@holyfuchs
holyfuchs merged commit d88710e into main Aug 15, 2026
4 checks passed
@holyfuchs
holyfuchs deleted the holyfuchs/review-fixes branch August 15, 2026 03:56
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