Skip to content

Commit

Permalink
feat: set min profit (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
valiafetisov authored May 26, 2022
1 parent 3d958ed commit 8d976c1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/calleeFunctions/CurveLpTokenUniv3Callee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const getCalleeData = async function (
const route = await encodeRoute(network, collateral.exchange.route);
const curveData = [CURVE_POOL_ADDRESS, CURVE_COIN_INDEX];
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
const minProfit = 0;
const minProfit = 1;
const typesArray = ['address', 'address', 'uint256', 'bytes', 'address', 'tuple(address,uint256)'];
return ethers.utils.defaultAbiCoder.encode(typesArray, [
profitAddress,
Expand Down
2 changes: 1 addition & 1 deletion core/src/calleeFunctions/UniswapV2CalleeDai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getCalleeData = async function (
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
}
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
const minProfit = 0;
const minProfit = 1;
const typesArray = ['address', 'address', 'uint256', 'address[]'];
return ethers.utils.defaultAbiCoder.encode(typesArray, [
profitAddress,
Expand Down
2 changes: 1 addition & 1 deletion core/src/calleeFunctions/UniswapV2LpTokenCalleeDai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const getCalleeData = async function (
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
}
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
const minProfit = 0;
const minProfit = 1;
const typesArray = ['address', 'address', 'uint256', 'address[]', 'address[]'];
return ethers.utils.defaultAbiCoder.encode(typesArray, [
profitAddress,
Expand Down
2 changes: 1 addition & 1 deletion core/src/calleeFunctions/UniswapV3Callee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getCalleeData = async function (
throw new Error(`getCalleeData called with invalid collateral type "${collateral.ilk}"`);
}
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
const minProfit = 0;
const minProfit = 1;
const uniswapV3route = await encodeRoute(network, [collateral.symbol, ...collateral.exchange.route]);
const typesArray = ['address', 'address', 'uint256', 'bytes', 'address'];
return ethers.utils.defaultAbiCoder.encode(typesArray, [
Expand Down
2 changes: 1 addition & 1 deletion core/src/calleeFunctions/WstETHCurveUniv3Callee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getCalleeData = async function (
profitAddress: string
): Promise<string> {
const joinAdapterAddress = await getContractAddressByName(network, getJoinNameByCollateralType(collateral.ilk));
const minProfit = 0;
const minProfit = 1;
const typesArray = ['address', 'address', 'uint256', 'uint24', 'address'];
return ethers.utils.defaultAbiCoder.encode(typesArray, [
profitAddress,
Expand Down

0 comments on commit 8d976c1

Please sign in to comment.