Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add callback in LiFiDEXAggregator [LiFiDEXAggregator v1.5.0] #832

Merged
merged 24 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
705c680
feat: add callback in LiFiDEXAggregator (v1.1.0)
maxklenk Oct 10, 2024
5b4b8b2
deployed v1.1.0 to Fraxtal
0xDEnYO Oct 11, 2024
bb8bcdb
new LiFiDEXAggregator address whitelisted @fraxtal
0xDEnYO Oct 16, 2024
a14bc77
Merge branch 'main' of github.com:lifinance/contracts into LF-10403
0xDEnYO Oct 16, 2024
c98221d
add more DEX-specific callback functions
0xDEnYO Oct 17, 2024
5948ad0
redeploy to sei and whitelist as DEX
0xDEnYO Oct 17, 2024
a1cf198
Merge branch 'main' of github.com:lifinance/contracts into LF-10403
0xDEnYO Nov 8, 2024
0d463a2
add callback functions to LiFiDEXAggregator
0xDEnYO Nov 8, 2024
b812ce0
deploy and whitelist new version of LiFiDEXAggregator on mantle (1.3.0)
0xDEnYO Nov 8, 2024
d69f1f2
Merge branch 'main' of github.com:lifinance/contracts into LF-10403
ezynda3 Nov 14, 2024
5bc4895
deploy custom callback to cronos
ezynda3 Nov 14, 2024
a049588
add sushiswap callback for mode
ezynda3 Nov 22, 2024
4ede0ff
add zebraswap callback for scroll
ezynda3 Nov 22, 2024
e0a0859
bump version
ezynda3 Nov 22, 2024
8a34562
deploy to mode and scroll
ezynda3 Nov 22, 2024
1291004
Merge branch 'main' of github.com:lifinance/contracts into LF-10403
0xDEnYO Dec 4, 2024
e687c9e
Merge branch 'LF-10403' of github.com:lifinance/contracts into LF-10403
0xDEnYO Dec 4, 2024
3ca0f9b
audit report added
0xDEnYO Dec 4, 2024
f036060
date fixed
0xDEnYO Dec 4, 2024
a190c1a
diamond logs updated
0xDEnYO Dec 4, 2024
ab28a9a
re-add gasZip in mantle diamondlog
0xDEnYO Dec 4, 2024
09ea35c
pushing a formatting commit since github shows outdated state
0xDEnYO Dec 4, 2024
20299c8
remove formatting change - github shows correct state now
0xDEnYO Dec 4, 2024
5de6f7b
Merge branch 'main' into LF-10403
ezynda3 Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions audit/auditLog.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@
"auditorGitHandle": "sujithsomraaj",
"auditReportPath": "./audit/reports/2024.11.22_Permit2Proxy.pdf",
"auditCommitHash": "0e3debb78abcdf9a9f934115338b611e16b039a0"
},
"audit20241203": {
"auditCompletedOn": "03.12.2024",
"auditedBy": "Sujith Somraaj (individual security researcher)",
"auditorGitHandle": "sujithsomraaj",
"auditReportPath": "./audit/reports/2024.12.03_LiFiDexAggregator.pdf",
"auditCommitHash": "8a34562c912b5b19c919bb95338655c944428af5"
}
},
"auditedContracts": {
Expand All @@ -54,6 +61,9 @@
"1.0.0": ["audit20240913"],
"1.0.1": ["audit20241105"]
},
"LiFiDEXAggregator": {
"1.5.0": ["audit20241203"]
},
"Permit2Proxy": {
"1.0.0": ["audit20241122"]
},
Expand Down
Binary file added audit/reports/2024.12.03_LiFiDexAggregator.pdf
Binary file not shown.
13 changes: 8 additions & 5 deletions config/dexs.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
"0x70D6cFE9146D6B6ebEb88BcB22fa220E78058D6F",
"0x11d40Dc8Ff0CE92F54A315aD8e674a55a866cBEe",
"0xf2614A233c7C3e7f08b1F887Ba133a13f1eb2c55",
"0xf88F6948C8AFf60c0B011f3175CDF459c66Ed035",
"0x3a629404258dF01bef29Dd5d428508D92e207bD0",
"0xf332761c673b59b21ff6dfa8ada44d78c12def09",
"0x70cbb871e8f30fc8ce23609e9e0ea87b6b222f58"
Expand Down Expand Up @@ -435,8 +436,8 @@
"fraxtal": [
"0x7956280Ec4B4d651C4083Ca737a1fa808b5319D8",
"0x9870F0C91D722B3393383722968269496d919bD8",
"0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"0xC82fd49be3F3D851b9E10589C50784cEAC7114a5"
"0xC82fd49be3F3D851b9E10589C50784cEAC7114a5",
"0xE38621607316cB43367c134C65dca3f41B61250f"
0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved
],
"harmony": [
"0xdFC2983401614118E1F2D5A5FD93C17Fecf8BdC6",
Expand Down Expand Up @@ -504,7 +505,7 @@
"0xf3552b98BB4234B47674700A99a0308D74B40F51",
"0xF2ee649caB7a0edEdED7a27821B0aCDF77778aeD",
"0x0263180888007D45340F86eC0b610d250BbDcB23",
"0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"0xEcf953290D36fA96236356e171044DC802EeC598",
"0x6131b5fae19ea4f9d964eac0408e4408b66337b5",
"0x6b2c0c7be2048daa9b5527982c29f48062b34d58",
"0x57df6092665eb6058DE53939612413ff4B09114E"
Expand All @@ -528,7 +529,8 @@
"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
"0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"0xd0f95fafa06de1b21e79db03c649919501e99ea9",
"0xbd0ebe49779e154e5042b34d5bcfbc498e4b3249"
"0xbd0ebe49779e154e5042b34d5bcfbc498e4b3249",
"0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9"
],
"moonbeam": [
"0x5215E9fd223BC909083fbdB2860213873046e45d",
Expand Down Expand Up @@ -743,7 +745,7 @@
"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
"0x7956280Ec4B4d651C4083Ca737a1fa808b5319D8",
"0x9870F0C91D722B3393383722968269496d919bD8",
"0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"0xfdE9CE4e17B650efdcA13d524F132876700d806f",
"0xC82fd49be3F3D851b9E10589C50784cEAC7114a5",
"0xdb3af8df1cab8ae4159ed6a9b33df5f8c3ad1485",
"0x801d8ed849039007a7170830623180396492c7ed"
Expand All @@ -758,6 +760,7 @@
"0xbfe03c9e20a9fc0b37de01a172f207004935e0b1",
"0x0000000000005e88410ccdfade4a5efae4b49562",
"0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9"
"0x6b2c0c7be2048daa9b5527982c29f48062b34d58",
"0x57df6092665eb6058DE53939612413ff4B09114E"
],
Expand Down
60 changes: 60 additions & 0 deletions deployments/_deployments_log_file.json
Original file line number Diff line number Diff line change
Expand Up @@ -23482,6 +23482,16 @@
"SALT": "",
"VERIFIED": "false"
}
],
"1.2.0": [
{
"ADDRESS": "0xfdE9CE4e17B650efdcA13d524F132876700d806f",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-10-17 07:16:41",
"CONSTRUCTOR_ARGS": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003b6211981d47fb6375e0125a6a401830616f7906",
"SALT": "20241016",
"VERIFIED": "true"
}
0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved
]
}
},
Expand All @@ -23496,6 +23506,16 @@
"SALT": "",
"VERIFIED": "true"
}
],
"1.3.0": [
{
"ADDRESS": "0xEcf953290D36fA96236356e171044DC802EeC598",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-11-08 06:54:16",
"CONSTRUCTOR_ARGS": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000029dacdf7ccadf4ee67c923b4c22255a4b2494ed7",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
Expand Down Expand Up @@ -23552,6 +23572,16 @@
"SALT": "",
"VERIFIED": "true"
}
],
"1.1.0": [
{
"ADDRESS": "0xE38621607316cB43367c134C65dca3f41B61250f",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-10-11 15:46:23",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d38743b48d26743c0ec6898d699394fbc94657ee",
"SALT": "",
"VERIFIED": "true"
}
0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved
]
}
},
Expand Down Expand Up @@ -23678,6 +23708,16 @@
"SALT": "",
"VERIFIED": "true"
}
],
"1.5.0": [
{
"ADDRESS": "0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-11-22 12:43:30",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d38743b48d26743c0ec6898d699394fbc94657ee",
"SALT": "",
"VERIFIED": "true"
}
0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved
]
}
},
Expand Down Expand Up @@ -23734,6 +23774,16 @@
"SALT": "",
"VERIFIED": "true"
}
],
"1.5.0": [
{
"ADDRESS": "0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-11-22 12:57:37",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d38743b48d26743c0ec6898d699394fbc94657ee",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
Expand Down Expand Up @@ -23818,6 +23868,16 @@
"SALT": "",
"VERIFIED": "true"
}
],
"1.4.0": [
{
"ADDRESS": "0xf88F6948C8AFf60c0B011f3175CDF459c66Ed035",
"OPTIMIZER_RUNS": "1000000",
"TIMESTAMP": "2024-11-14 11:54:19",
"CONSTRUCTOR_ARGS": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d38743b48d26743c0ec6898d699394fbc94657ee",
"SALT": "",
"VERIFIED": "true"
}
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion deployments/cronos.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
"SymbiosisFacet": "0x70a51Bbc58D6180709D99a759bd91A3feD212fD3",
"EmergencyPauseFacet": "0x3CDDc79Da7c829643F5b2378110158Ea6ff349F9",
"TokenWrapper": "0x693c18A628866BdD04956d9544Ce769C0e468149",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc"
"LiFiDEXAggregator": "0xf88F6948C8AFf60c0B011f3175CDF459c66Ed035"
}
4 changes: 2 additions & 2 deletions deployments/fraxtal.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"ServiceFeeCollector": "0x45d69A8a07F79DE2364F0B80F78af86e99015162",
"TokenWrapper": "0xC82fd49be3F3D851b9E10589C50784cEAC7114a5",
"SymbiosisFacet": "0x095857146B116802fBf4f75D96CC1b35c5F3ad1a",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFiDEXAggregator": "0xE38621607316cB43367c134C65dca3f41B61250f",
"EmergencyPauseFacet": "0x6F2baA7cd5F156CA1B132F7FF11E0fa2aD775F61"
}
}
2 changes: 1 addition & 1 deletion deployments/mantle.diamond.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
"TokenWrapper": "0x0263180888007D45340F86eC0b610d250BbDcB23"
}
}
}
}
4 changes: 2 additions & 2 deletions deployments/mantle.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"SquidFacet": "0xc23ae3A8d74C0a428FA59E4AD3EB6aa4b2330530",
"StargateFacetV2": "0x6e378C84e657C57b2a8d183CFf30ee5CC8989b61",
"ReceiverStargateV2": "0x1493e7B8d4DfADe0a178dAD9335470337A3a219A",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFiDEXAggregator": "0xEcf953290D36fA96236356e171044DC802EeC598",
"EmergencyPauseFacet": "0x6F2baA7cd5F156CA1B132F7FF11E0fa2aD775F61"
}
}
4 changes: 2 additions & 2 deletions deployments/mode.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"AcrossFacet": "0x4D67951397bc8162111BC45F973Ae7576Fd814F0",
"AcrossFacetPacked": "0x54910b7b4723a775708aFd88f31b6572e168aF66",
"GenericSwapFacetV3": "0x31a9b1835864706Af10103b31Ea2b79bdb995F5F",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFiDEXAggregator": "0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9",
"EmergencyPauseFacet": "0x6F2baA7cd5F156CA1B132F7FF11E0fa2aD775F61",
"AcrossFacetV3": "0x6e00e0a7685Ca22c288d56D9E7924746B5043Ee7",
"ReceiverAcrossV3": "0xB9CEc304899037E661F49DdFa7f64943b5920072",
"AcrossFacetPackedV3": "0x20F3FFf5A89e988c4109A6e496a839480B1B558f"
}
}
4 changes: 2 additions & 2 deletions deployments/scroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"ReceiverStargateV2": "0x1493e7B8d4DfADe0a178dAD9335470337A3a219A",
"AcrossFacet": "0x9535A1AFd986FA9a2D324657116F02C364edebFf",
"AcrossFacetPacked": "0xFd796bf7Ff74d414b99CacF6F216eAC24bF3aC8E",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFiDEXAggregator": "0x78bF01555bCF05e6B1d4dad017dBD0A105652DC9",
"EmergencyPauseFacet": "0x6F2baA7cd5F156CA1B132F7FF11E0fa2aD775F61",
"AcrossFacetV3": "0x6e00e0a7685Ca22c288d56D9E7924746B5043Ee7",
"ReceiverAcrossV3": "0xB9CEc304899037E661F49DdFa7f64943b5920072",
"AcrossFacetPackedV3": "0x20F3FFf5A89e988c4109A6e496a839480B1B558f"
}
}
4 changes: 2 additions & 2 deletions deployments/sei.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"GenericSwapFacetV3": "0x31a9b1835864706Af10103b31Ea2b79bdb995F5F",
"ReceiverStargateV2": "0x1493e7B8d4DfADe0a178dAD9335470337A3a219A",
"StargateFacetV2": "0x6e378C84e657C57b2a8d183CFf30ee5CC8989b61",
"LiFiDEXAggregator": "0x6140b987d6B51Fd75b66C3B07733Beb5167c42fc",
"LiFiDEXAggregator": "0xfdE9CE4e17B650efdcA13d524F132876700d806f",
"EmergencyPauseFacet": "0x6F2baA7cd5F156CA1B132F7FF11E0fa2aD775F61"
}
}
122 changes: 121 additions & 1 deletion src/Periphery/LiFiDEXAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ uint160 constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970
/// @title LiFi DEX Aggregator
/// @author Ilya Lyalin (contract copied from: https://github.com/sushiswap/sushiswap/blob/c8c80dec821003eb72eb77c7e0446ddde8ca9e1e/protocols/route-processor/contracts/RouteProcessor4.sol)
/// @notice Processes calldata to swap using various DEXs
/// @custom:version 1.0.0
/// @custom:version 1.5.0
contract LiFiDEXAggregator is Ownable {
using SafeERC20 for IERC20;
using Approve for IERC20;
Expand Down Expand Up @@ -575,6 +575,126 @@ contract LiFiDEXAggregator is Ownable {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via RaExchangeV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the RaExchangeV3#swap call
function ramsesV2SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}
0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved

/// @notice Called to `msg.sender` after executing a swap via XeiV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the XeiV3#swap call
function xeiV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via DragonSwapV2#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the DragonSwapV2#swap call
function dragonswapV2SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via AgniV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the AgniV3#swap call
function agniSwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via FusionXV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the FusionXV3#swap call
function fusionXV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via VVS FinanceV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the VVS Finance V3#swap call
function vvsV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via SupSwapV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the SupSwapV3#swap call
function supV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

/// @notice Called to `msg.sender` after executing a swap via ZebraV3#swap.
/// @dev In the implementation you must pay the pool tokens owed for the swap.
/// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
/// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
/// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
/// @param data Any data passed through by the caller via the ZebraV3#swap call
function zebraV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external {
uniswapV3SwapCallback(amount0Delta, amount1Delta, data);
}

0xDEnYO marked this conversation as resolved.
Show resolved Hide resolved
/// @notice Curve pool swap. Legacy pools that don't return amountOut and have native coins are not supported
/// @param stream [pool, poolType, fromIndex, toIndex, recipient, output token]
/// @param from Where to take liquidity for swap
Expand Down
Loading