Merge pull request #144 from die-herdplatte/ekubo-partial-swaps
breaking: Remove Ekubo executor support for partial swaps
This commit is contained in:
@@ -120,10 +120,8 @@ contract EkuboExecutor is IExecutor, ICallback, ILocker, IPayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _locked(bytes calldata swapData) internal {
|
function _locked(bytes calldata swapData) internal {
|
||||||
// For partial swaps this is not equivalent to the given input amount
|
|
||||||
uint128 tokenInDebtAmount = 0;
|
|
||||||
|
|
||||||
int128 nextAmountIn = int128(uint128(bytes16(swapData[0:16])));
|
int128 nextAmountIn = int128(uint128(bytes16(swapData[0:16])));
|
||||||
|
uint128 tokenInDebtAmount = uint128(nextAmountIn);
|
||||||
|
|
||||||
address receiver = address(bytes20(swapData[16:36]));
|
address receiver = address(bytes20(swapData[16:36]));
|
||||||
address tokenIn = address(bytes20(swapData[36:POOL_DATA_OFFSET]));
|
address tokenIn = address(bytes20(swapData[36:POOL_DATA_OFFSET]));
|
||||||
@@ -153,10 +151,6 @@ contract EkuboExecutor is IExecutor, ICallback, ILocker, IPayer {
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
|
||||||
if (tokenInDebtAmount == 0) {
|
|
||||||
tokenInDebtAmount = uint128(isToken1 ? delta1 : delta0);
|
|
||||||
}
|
|
||||||
|
|
||||||
nextTokenIn = nextTokenOut;
|
nextTokenIn = nextTokenOut;
|
||||||
nextAmountIn = -(isToken1 ? delta0 : delta1);
|
nextAmountIn = -(isToken1 ? delta0 : delta1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user