Bundler SDK calls "morphoBorrow" with argument of slippageAmount
https://github.com/morpho-org/sdks/blob/03a9a9ebd201c2409c05ca989b13e8db8796537e/packages/bundler-sdk-viem/src/BundlerAction.ts#L1180C4-L1180C165
This is described as the follows:
@param slippageAmount The minimum (resp. maximum) amount of assets (resp. borrow shares) to borrow (resp. mint) (protects the sender from unexpected slippage).
I believe the slippageAmount description is incorrect and should be a minSharePrice which would reflect the solidity code
https://github.com/morpho-org/bundler3/blob/3b22daf606bdef4f119f168c74496f87a90ac8e5/src/adapters/GeneralAdapter1.sol#L238
@param minSharePriceE27 The minimum amount of assets borrowed per borrow share minted, scaled by 1e27.
This is reinforced by the SDK bundler implementation for "Blue_Borrow" which takes the DEFAULT_SLIPPAGE_TOLERANCE and performs a minSharePrice calculation, before calling "morphoBorrow"
|
const minSharePrice = MathLib.mulDivDown( |
The same problem also exists for morphoRepay, morphoSupply, and morphoWithdraw
Bundler SDK calls "morphoBorrow" with argument of slippageAmount
https://github.com/morpho-org/sdks/blob/03a9a9ebd201c2409c05ca989b13e8db8796537e/packages/bundler-sdk-viem/src/BundlerAction.ts#L1180C4-L1180C165
This is described as the follows:
@param slippageAmount The minimum (resp. maximum) amount of assets (resp. borrow shares) to borrow (resp. mint) (protects the sender from unexpected slippage).I believe the slippageAmount description is incorrect and should be a minSharePrice which would reflect the solidity code
https://github.com/morpho-org/bundler3/blob/3b22daf606bdef4f119f168c74496f87a90ac8e5/src/adapters/GeneralAdapter1.sol#L238
@param minSharePriceE27 The minimum amount of assets borrowed per borrow share minted, scaled by 1e27.This is reinforced by the SDK bundler implementation for "Blue_Borrow" which takes the DEFAULT_SLIPPAGE_TOLERANCE and performs a minSharePrice calculation, before calling "morphoBorrow"
sdks/packages/bundler-sdk-viem/src/actions.ts
Line 680 in 03a9a9e
The same problem also exists for morphoRepay, morphoSupply, and morphoWithdraw