Compare commits

...

10 Commits

Author SHA1 Message Date
semantic-release-bot
4b69a0b6bc chore(release): 0.131.0 [skip ci]
## [0.131.0](https://github.com/propeller-heads/tycho-execution/compare/0.130.2...0.131.0) (2025-10-23)

### Features

* Deploy new UniswapV4Executor to unichain and base ([605122f](605122fa96))

### Bug Fixes

* Forge fmt (after updating local foundry) ([e0cc25e](e0cc25e166))
2025-10-23 14:32:47 +00:00
dianacarvalho1
238c4cea71 Merge pull request #283 from propeller-heads/dc/deploy-univ4-unichain-and-base
feat: Deploy new UniswapV4Executor to unichain and base
2025-10-23 15:30:30 +01:00
Diana Carvalho
e0cc25e166 fix: Forge fmt (after updating local foundry)
Took 6 minutes
2025-10-23 15:16:21 +01:00
Diana Carvalho
605122fa96 feat: Deploy new UniswapV4Executor to unichain and base
Took 1 hour 22 minutes
2025-10-23 15:07:49 +01:00
Tamara
644790ef01 Merge pull request #282 from propeller-heads/hooks/tnl/ENG-5138-seq-euler
test: Sequential Euler swap with low balance
2025-10-21 13:08:56 -04:00
TAMARA LIPOWSKI
2a1662f505 chore: forge fmt 2025-10-21 13:05:05 -04:00
TAMARA LIPOWSKI
23405350b6 test: Sequential Euler swap with low balance
- We want to check pools using RLUSD because the pool manager doesn't hold much of this token, so we can't rely on pre-existing balance before the user makes a swap. We want to test a sequential swap here to check our grouping logic still works on Euler pools which store the balances on a proxy contract.
2025-10-21 12:53:48 -04:00
semantic-release-bot
b175834311 chore(release): 0.130.2 [skip ci]
## [0.130.2](https://github.com/propeller-heads/tycho-execution/compare/0.130.1...0.130.2) (2025-10-17)

### Bug Fixes

* Forge fmt was going crazy in this function ([40ea447](40ea447d2d))
* Make TychoEncode Send + Sync ([ef0f9ab](ef0f9ab959))
2025-10-17 08:25:44 +00:00
dianacarvalho1
d775b80cca Merge pull request #281 from propeller-heads/dc/ENG-4804-tycho-encoder-send-sync
fix: Make TychoEncode Send + Sync
2025-10-17 09:22:44 +01:00
Diana Carvalho
40ea447d2d fix: Forge fmt was going crazy in this function
It kept changing the formatting between two states and was never happy..

Took 4 minutes
2025-10-16 16:56:06 +01:00
11 changed files with 85 additions and 28 deletions

View File

@@ -1,3 +1,23 @@
## [0.131.0](https://github.com/propeller-heads/tycho-execution/compare/0.130.2...0.131.0) (2025-10-23)
### Features
* Deploy new UniswapV4Executor to unichain and base ([605122f](https://github.com/propeller-heads/tycho-execution/commit/605122fa9693c7a885f68626dbe47b200889b946))
### Bug Fixes
* Forge fmt (after updating local foundry) ([e0cc25e](https://github.com/propeller-heads/tycho-execution/commit/e0cc25e1666c844392e6c6e4053e37e93ab04955))
## [0.130.2](https://github.com/propeller-heads/tycho-execution/compare/0.130.1...0.130.2) (2025-10-17)
### Bug Fixes
* Forge fmt was going crazy in this function ([40ea447](https://github.com/propeller-heads/tycho-execution/commit/40ea447d2dd2fedc9972d9fcd2cb8f56b9e44f8c))
* Make TychoEncode Send + Sync ([ef0f9ab](https://github.com/propeller-heads/tycho-execution/commit/ef0f9ab959514e2c6dcb545cad2edbfeee863c15))
## [0.130.1](https://github.com/propeller-heads/tycho-execution/compare/0.130.0...0.130.1) (2025-10-09)

2
Cargo.lock generated
View File

@@ -4785,7 +4785,7 @@ dependencies = [
[[package]]
name = "tycho-execution"
version = "0.130.1"
version = "0.131.0"
dependencies = [
"alloy",
"async-trait",

View File

@@ -1,6 +1,6 @@
[package]
name = "tycho-execution"
version = "0.130.1"
version = "0.131.0"
edition = "2021"
description = "Provides tools for encoding and executing swaps against Tycho router and protocol executors."
repository = "https://github.com/propeller-heads/tycho-execution"

View File

@@ -18,14 +18,14 @@
"base": {
"uniswap_v2": "0xF744EBfaA580cF3fFc25aD046E92BD8B770a0700",
"uniswap_v3": "0x647bffbf8bd72bf6341ecba8b0279e090313a40d",
"uniswap_v4": "0x7Dfa502736C7bd84DA1402F7524214215BC9534d",
"uniswap_v4_hooks": "0x7Dfa502736C7bd84DA1402F7524214215BC9534d",
"uniswap_v4": "0x8a3520889fE0bbF9E1F4a9724C27d8D6Ed9f0e29",
"uniswap_v4_hooks": "0x8a3520889fE0bbF9E1F4a9724C27d8D6Ed9f0e29",
"rfq:bebop": "0x489A3f531dA3873D6585BF3f8E0dEE48CAC6F7BC"
},
"unichain": {
"uniswap_v2": "0x00C1b81e3C8f6347E69e2DDb90454798A6Be975E",
"uniswap_v3": "0xD26A838A41af3d4815DfD745a080B2062c4124d1",
"uniswap_v4": "0x647bfFbF8Bd72bF6341ECBa8B0279e090313A40D",
"uniswap_v4_hooks": "0x647bfFbF8Bd72bF6341ECBa8B0279e090313A40D"
"uniswap_v4": "0x052a40Ab2875437e0fF7f68976954AD62aB1f235",
"uniswap_v4_hooks": "0x052a40Ab2875437e0fF7f68976954AD62aB1f235"
}
}

View File

@@ -811,8 +811,9 @@ contract TychoRouter is
view
returns (uint256)
{
return
token == address(0) ? owner.balance : IERC20(token).balanceOf(owner);
return token == address(0)
? owner.balance
: IERC20(token).balanceOf(owner);
}
/**

View File

@@ -93,10 +93,9 @@ contract CurveExecutor is IExecutor, RestrictTransferFrom {
// crypto or llamma
if (tokenIn == nativeToken || tokenOut == nativeToken) {
// slither-disable-next-line arbitrary-send-eth
CryptoPoolETH(pool)
.exchange{
value: ethAmount
}(uint256(int256(i)), uint256(int256(j)), amountIn, 0, true);
CryptoPoolETH(pool).exchange{value: ethAmount}(
uint256(int256(i)), uint256(int256(j)), amountIn, 0, true
);
} else {
CryptoPool(pool)
.exchange(

View File

@@ -42,8 +42,7 @@ contract MaverickV2Executor is IExecutor, RestrictTransferFrom {
bool isTokenAIn = pool.tokenA() == tokenIn;
int32 tickLimit = isTokenAIn ? type(int32).max : type(int32).min;
IMaverickV2Pool.SwapParams memory swapParams =
IMaverickV2Pool.SwapParams({
IMaverickV2Pool.SwapParams memory swapParams = IMaverickV2Pool.SwapParams({
amount: givenAmount,
tokenAIn: isTokenAIn,
exactOutput: false,

View File

@@ -216,9 +216,7 @@ contract TychoRouterSequentialSwapTest is TychoRouterTestSetup {
)
);
uint256 amountOut = tychoRouter.sequentialSwapPermit2{
value: amountIn
}(
uint256 amountOut = tychoRouter.sequentialSwapPermit2{value: amountIn}(
amountIn,
address(0),
USDC_ADDR,

View File

@@ -222,9 +222,7 @@ contract TychoRouterSingleSwapTest is TychoRouterTestSetup {
bytes memory swap =
encodeSingleSwap(address(usv2Executor), protocolData);
uint256 amountOut = tychoRouter.singleSwapPermit2{
value: amountIn
}(
uint256 amountOut = tychoRouter.singleSwapPermit2{value: amountIn}(
amountIn,
address(0),
DAI_ADDR,

View File

@@ -271,9 +271,7 @@ contract TychoRouterSplitSwapTest is TychoRouterTestSetup {
bytes[] memory swaps = new bytes[](1);
swaps[0] = swap;
uint256 amountOut = tychoRouter.splitSwapPermit2{
value: amountIn
}(
uint256 amountOut = tychoRouter.splitSwapPermit2{value: amountIn}(
amountIn,
address(0),
DAI_ADDR,

View File

@@ -281,6 +281,7 @@ contract UniswapV4ExecutorTestForEuler is Constants, TestUtils {
UniswapV4ExecutorExposed uniswapV4Exposed;
IERC20 USDT = IERC20(USDT_ADDR);
IERC20 USDC = IERC20(USDC_ADDR);
IERC20 RLUSD = IERC20(RLUSD_ADDR);
IERC20 WBTC = IERC20(WBTC_ADDR);
@@ -364,6 +365,49 @@ contract UniswapV4ExecutorTestForEuler is Constants, TestUtils {
assertTrue(WBTC.balanceOf(ALICE) == amountOut);
}
function testDoubleEulerSwapLowBalance() public {
// 10 USDC -(euler)-> RLUSD -(euler)-> USDT
// We use RLUSD pools because it doesn't have significant balance on the pool
// manager contract
uint256 amountIn = 10_000000;
deal(USDC_ADDR, address(uniswapV4Exposed), amountIn);
address eulerProxy = 0xe0a80d35bB6618CBA260120b279d357978c42BCE;
uint256 usdcEulerBalanceBefore = USDC.balanceOf(eulerProxy);
UniswapV4Executor.UniswapV4Pool[] memory pools =
new UniswapV4Executor.UniswapV4Pool[](2);
// USDC -> RLUSD
pools[0] = UniswapV4Executor.UniswapV4Pool({
intermediaryToken: RLUSD_ADDR,
fee: uint24(40),
tickSpacing: int24(1),
hook: address(0x8B0DAD43EA6E83B2A6a0de18c5985030ba0Da8A8),
hookData: bytes("")
});
// RLUSD -> USDT
pools[1] = UniswapV4Executor.UniswapV4Pool({
intermediaryToken: USDT_ADDR,
fee: uint24(50),
tickSpacing: int24(1),
hook: address(0xF87ACF8428F2f9403AAA0256A7272d6549ECa8A8),
hookData: bytes("")
});
bytes memory data = UniswapV4Utils.encodeExactInput(
USDC_ADDR,
USDT_ADDR,
true,
RestrictTransferFrom.TransferType.Transfer,
ALICE,
pools
);
uint256 amountOut = uniswapV4Exposed.swap(amountIn, data);
assertEq(USDC.balanceOf(eulerProxy), usdcEulerBalanceBefore + amountIn);
assertTrue(USDT.balanceOf(ALICE) == amountOut);
}
function testMultipleSwapLastSwapEuler() public {
// USDC -> RLUSD -(euler)- > USDT
// Sanity check to see if a grouped swap with Euler in the last hop works