{
 "sources": [
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/adapters/midnight/README.md",
   "quote": "In-kind redemptions therefore happen at a price of one asset per unit of credit, plus fees, whatever the time to maturity."
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/adapters/midnight/README.md",
   "quote": "The payment is the credit amount before pending fees plus the Midnight settlement fee."
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/adapters/midnight/MidnightAdapter.sol",
   "quote": "/// @dev Called by anyone through forceDeallocate. The adapter sells credit of the given market to the given taker at face value plus the settlement fee, paid by the sender."
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/adapters/midnight/MidnightAdapter.sol",
   "quote": "IMidnight(midnight).take(offer, hex\"\", assets, taker, address(0), address(this), hex\"\");"
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/adapters/midnight/MidnightAdapter.sol",
   "quote": "/// @dev The taker must hold at least 1 share of the parent vault and can then forceDeallocate as much as the penalty allows."
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/vault-v2/bbeda7b27ae80abcf070e0158cb8a31e87bb2286/src/VaultV2.sol",
   "quote": "uint256 penaltyAssets = assets.mulDivUp(forceDeallocatePenalty[adapter], WAD);"
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/midnight/4e2570e51171d09228645b2d5bdf84ef24b1720b/src/Midnight.sol",
   "quote": "uint256 sellerAssets = offer.buy ? units.mulDivDown(sellerPrice, WAD) : units.mulDivUp(sellerPrice, WAD);"
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/midnight/4e2570e51171d09228645b2d5bdf84ef24b1720b/src/Midnight.sol",
   "quote": "!offer.reduceOnly || (offer.buy ? buyerCreditIncrease == 0 : sellerDebtIncrease == 0),"
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/midnight/4e2570e51171d09228645b2d5bdf84ef24b1720b/src/Midnight.sol",
   "quote": "? UtilsLib.toUint128(sellerPos.pendingFee.mulDivUp(sellerCreditDecrease, sellerPos.credit))"
  },
  {
   "url": "https://raw.githubusercontent.com/morpho-org/midnight/4e2570e51171d09228645b2d5bdf84ef24b1720b/src/libraries/TickLib.sol",
   "quote": "uint256 constant PRICE_ROUNDING_STEP = 1e11;"
  }
 ]
}