Skip to content

Commit 8d976c1

Browse files
authored
feat: set min profit (#278)
1 parent 3d958ed commit 8d976c1

5 files changed

+5
-5
lines changed

core/src/calleeFunctions/CurveLpTokenUniv3Callee.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const getCalleeData = async function (
1818
const route = await encodeRoute(network, collateral.exchange.route);
1919
const curveData = [CURVE_POOL_ADDRESS, CURVE_COIN_INDEX];
2020
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
21-
const minProfit = 0;
21+
const minProfit = 1;
2222
const typesArray = ['address', 'address', 'uint256', 'bytes', 'address', 'tuple(address,uint256)'];
2323
return ethers.utils.defaultAbiCoder.encode(typesArray, [
2424
profitAddress,

core/src/calleeFunctions/UniswapV2CalleeDai.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const getCalleeData = async function (
1313
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
1414
}
1515
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
16-
const minProfit = 0;
16+
const minProfit = 1;
1717
const typesArray = ['address', 'address', 'uint256', 'address[]'];
1818
return ethers.utils.defaultAbiCoder.encode(typesArray, [
1919
profitAddress,

core/src/calleeFunctions/UniswapV2LpTokenCalleeDai.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getCalleeData = async function (
1919
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
2020
}
2121
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
22-
const minProfit = 0;
22+
const minProfit = 1;
2323
const typesArray = ['address', 'address', 'uint256', 'address[]', 'address[]'];
2424
return ethers.utils.defaultAbiCoder.encode(typesArray, [
2525
profitAddress,

core/src/calleeFunctions/UniswapV3Callee.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const getCalleeData = async function (
1313
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
1414
}
1515
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
16-
const minProfit = 0;
16+
const minProfit = 1;
1717
const uniswapV3route = await encodeRoute(network, [collateral.symbol, ...collateral.exchange.route]);
1818
const typesArray = ['address', 'address', 'uint256', 'bytes', 'address'];
1919
return ethers.utils.defaultAbiCoder.encode(typesArray, [

core/src/calleeFunctions/WstETHCurveUniv3Callee.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const getCalleeData = async function (
1212
profitAddress: string
1313
): Promise<string> {
1414
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
15-
const minProfit = 0;
15+
const minProfit = 1;
1616
const typesArray = ['address', 'address', 'uint256', 'uint24', 'address'];
1717
return ethers.utils.defaultAbiCoder.encode(typesArray, [
1818
profitAddress,

0 commit comments

Comments
 (0)