Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tpawn committed Apr 19, 2024
1 parent 82ba6f1 commit d526d04
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contracts/swap/FlashSwapRouterV3Helper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ contract FlashSwapRouterV3Helper {
}

/// @dev Only meant for an off-chain client to call with eth_call.
/// When inQuote does not increase monotonically with outR,
/// this function does not guarantee to return the optimal solution.
/// This function uses binary search to find the maximum `outR` in the range `[minOutR, maxOutR)`
/// such that `getBuyR(outR).quoteDelta <= inQuote`. When `inQuote` does not increase monotonically
/// with `outR`, this function does not guarantee to return the optimal solution.
///
/// Although `FlashSwapRouterV3.getBuyR` is not a view function, it typically does not alter any
/// contract state. However, this function fails when `FlashSwapRouterV3.getBuyR` does modify some state.
function getBuyRFromQuote(
IFundV5 fund,
bool needWrap,
Expand Down

0 comments on commit d526d04

Please sign in to comment.