Commit Graph

1096 Commits

Author SHA1 Message Date
dianacarvalho1
ae4dfa5775 Merge pull request #155 from propeller-heads/encoding/dc/ENG-4332-mutiplex-strategy
feat: Refactor TychoEncoder into two: TychoRouterEncoder and TychoExecutorEncoder
2025-04-23 12:30:13 +01:00
Diana Carvalho
f5e712e0ff feat(tycho-router-encoder): Select strategy depending on the solution
- The tycho router address default is set at the EncoderBuilder level (not inside the strategies)
- Rename TychoCoreChain to TychoCommonChain
- Only take TychoCommonChain as an argument at the outermost level: EncoderBuilder. Everywhere else we use the execution Chain right away

--- don't change below this line ---
ENG-4332 Took 1 hour 10 minutes
2025-04-23 12:30:13 +01:00
Tamara
db89a99826 Merge branch 'main' into feature/gas-optimization 2025-04-23 12:30:13 +01:00
Diana Carvalho
6fd0ab54c1 docs: Improve doc
--- don't change below this line ---
ENG-4306 Took 4 minutes
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
56d3eee618 fix: No more EVMStrategyEncoder
bad merge
2025-04-23 12:30:13 +01:00
Diana Carvalho
8b4b79b353 feat: Refactor TychoEncoder
We have a trait TychoEncoder and then two implementations: TychoRouterEncoder and TychoExecutorEncoder.
This way we go a level above with the decision if it is a direct execution or if it should use the tycho router.

- Created two builders: one for each tycho encoder
- Delete ExecutorStrategyEncoder and move code straight into the TychoExecutorEncoder
- Add validate_solution to trait TychoEncoder
- Move group_swaps.rs a level up
- Update tests and usage cases

Doing this we get rid of all that weird stuff we were doing before

--- don't change below this line ---
ENG-4306 Took 2 hours 6 minutes


Took 12 seconds
2025-04-23 12:30:13 +01:00
Tamara
899f0efeff Merge pull request #154 from propeller-heads/encoding/dc/4318-single-strategy-integration-test
feat: Add SingleSwap integration test
2025-04-23 12:30:13 +01:00
Tamara
1d298a371d Merge pull request #132 from propeller-heads/encoding/tnl/ENG-4318-sequential-strategy
feat: SequentialSwapStrategyEncoder
2025-04-23 12:30:13 +01:00
Diana Carvalho
df1c05ea00 feat: Add SingleSwap integration test and fix bug in method signatures
--- don't change below this line ---
ENG-4306 Took 27 minutes


Took 15 seconds
2025-04-23 12:30:13 +01:00
dianacarvalho1
012b9f1508 Merge pull request #130 from propeller-heads/encoding/tnl/4318-single-strategy
feat: SingleSwapStrategyEncoder
2025-04-23 12:30:13 +01:00
Diana Carvalho
6e7bf3c019 feat: Add SequentialSwap integration test with regular approvals
Improve docstrings

--- don't change below this line ---
ENG-4306 Took 20 minutes
2025-04-23 12:30:13 +01:00
Diana Carvalho
6430c99d76 feat: Delete EVMStrategyEncoder (this is now unnecessary)
Moved ple_encode into utils.rs

--- don't change below this line ---
ENG-4306 Took 5 minutes
2025-04-23 12:30:13 +01:00
Diana Carvalho
2f81b167d4 fix: Fix executor address in test and remove duplicated test
--- don't change below this line ---
ENG-4306 Took 12 minutes


Took 18 seconds
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
f12bebcdfb test: Fix executor address in swap test 2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
e77a7bc3e1 test: Fix duplicate test 2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
fcedd39f30 fix: Remove router_address from Solution object
after merge
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
c67c9acac4 test: Sequential swap integration test
- And other small fixes after merge
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
11a05e4f18 feat: SingleSwapStrategyEncoder
- Had to take the implementation of the swap header encoding out of the main EVMStrategyEncoder trait, since it will now be difference for single and split swap strategies.
- Integration tests will be added in separate task/PR.


Took 7 seconds
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
0d8150e22f feat: sequential swap solution validation
- Basically reuse all methods of split swap validation, minus those specific to splits.
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
5d586c25e3 feat: SingleSwapStrategyEncoder
- Had to take the implementation of the swap header encoding out of the main EVMStrategyEncoder trait, since it will now be difference for single and split swap strategies.
- Integration tests will be added in separate task/PR.
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
a5f07a25ef feat: SingleSwapStrategyEncoder
- Had to take the implementation of the swap header encoding out of the main EVMStrategyEncoder trait, since it will now be difference for single and split swap strategies.
- Integration tests will be added in separate task/PR.
2025-04-23 12:30:13 +01:00
TAMARA LIPOWSKI
3f6bc5643e fix: Integration tests after merge
Took 50 seconds
2025-04-23 12:30:06 +01:00
TAMARA LIPOWSKI
3d01158bbb chore: merge main
Took 3 minutes
2025-04-23 12:29:36 +01:00
Tamara
6c74c674f0 Merge pull request #120 from propeller-heads/router/tnl/ENG-4317-sequential-in
feat: Add sequential swap methods
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
8f2346330a fix: fix slither CI action
- Need to manually install foundry and compile the project, or else it attempts to install the latest foundry version, which fails due to GLIBC not being found
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
c4455dcabb refactor: Separate test files for split/sequential/single
- Add more test cases for sequential swap and single swap to match those of split swap (fee, slippage), to catch errors more easily if someone makes a small code change to either the single or sequential methods
- Excluded USV3 and USV4 tests on sequential and single swap, since these tests were more to test USV3 and USV4 executor functionality than the high level sswap methods - they should already be sufficiently tested.
- Remove `testSplitSwapSimple` and `testSplitSwapSingleUSV3` since this is already tested by several other high-level methods (see single USV3 and single USV4 tests). We should prioritize integration-testing public methods over private methods.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
49e0c49828 chore: (single swap) remove unnecessary cycle check
- It's not possible to have a single cyclical swap.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
1dad4afb6b feat: Decode single and sequential swaps in LibSwap
- The old way was useful when we just had split swaps. Unfortunately, we now have split, sequential, and single swaps, which don't always require token indices or split percentages, so we need to decode differently for each case.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
64345663d0 feat: Single swap methods.
- Remove duplicate test case for single swp with permit2. This test came from the days when we could still have a 0 minimum amount.
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
3ae9d3ad67 feat: Add sequential swap methods
- Add some basic tests (will add more in next commits)
- Adapt sequential tests (which originally tested split swap)
- Adapt a forgotten single swap test

TODO:
- Fix encoding of single and sequential swaps to not expect the split sawp format every time (the split and the token indices are not necessary and consume unnecessary gas).
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
65178681e0 docs: Rename to splitSwap in helper method docs too
Took 4 minutes
2025-04-23 12:26:31 +01:00
TAMARA LIPOWSKI
7fc008a718 feat: Rename split swap interfaces
- In preparation for adding single and sequential swap methods.
2025-04-23 12:25:36 +01:00
semantic-release-bot
5e7c0721c5 chore(release): 0.81.0 [skip ci]
## [0.81.0](https://github.com/propeller-heads/tycho-execution/compare/0.80.0...0.81.0) (2025-04-18)

### Features

* update tycho-common version to 0.66.4 ([134c73e](134c73e82b))

### Bug Fixes

* add slither disable after slither actions update ([20573cb](20573cbaf3))
2025-04-18 12:52:51 +00:00
Louise Poole
e3f4dd04cf Merge pull request #167 from propeller-heads/lp/update-tycho-common
feat: update tycho-common version to 0.66.4
2025-04-18 14:51:01 +02:00
TAMARA LIPOWSKI
20573cbaf3 fix: add slither disable after slither actions update
- We have always been ok with risk here and ensured this won't happen for our use case, but slither  actions version was recently updated so this fails in CI.
2025-04-18 08:46:32 -04:00
Louise Poole
134c73e82b feat: update tycho-common version to 0.66.4 2025-04-18 12:08:15 +02:00
semantic-release-bot
fa3ca34480 chore(release): 0.80.0 [skip ci]
## [0.80.0](https://github.com/propeller-heads/tycho-execution/compare/0.79.0...0.80.0) (2025-04-14)

### Features

* Redeploy balancer with forceApprove fix for USDT ([a6b0f8d](a6b0f8d1f6))
2025-04-14 14:18:39 +00:00
dianacarvalho1
d71b22591c Merge pull request #161 from propeller-heads/router/dc/redeploy-balancer
feat: Redeploy balancer with forceApprove fix for USDT
2025-04-14 15:16:29 +01:00
Diana Carvalho
a6b0f8d1f6 feat: Redeploy balancer with forceApprove fix for USDT
--- don't change below this line ---
ENG-4307 Took 10 minutes
2025-04-14 09:49:39 +01:00
semantic-release-bot
4f3fe270e9 chore(release): 0.79.0 [skip ci]
## [0.79.0](https://github.com/propeller-heads/tycho-execution/compare/0.78.1...0.79.0) (2025-04-11)

### Features

* Add new CurveExecutor address ([916c2b7](916c2b7dba))
* Deploy Curve Executor ([5d4d6d1](5d4d6d1ff8))

### Bug Fixes

* Checksum curve pool addresses ([9e68ab8](9e68ab8b01))
* Support pools that hold ETH but the coin is WETH ([2e8392a](2e8392ab40))
* Use forceApprove instead of regular Approve ([c963f3b](c963f3b2f6))
2025-04-11 16:00:31 +00:00
dianacarvalho1
08158c3193 Merge pull request #159 from propeller-heads/router/dc/ENG-4307-deploy-curve
feat: Deploy Curve Executor
2025-04-11 16:58:43 +01:00
Diana Carvalho
2e8392ab40 fix: Support pools that hold ETH but the coin is WETH
--- don't change below this line ---
ENG-4307 Took 1 hour 46 minutes
2025-04-11 16:17:37 +01:00
zach
bab30e3958 fix: add maverick for build 2025-04-11 08:43:03 +08:00
zach
bd642d7b45 update 2025-04-11 08:30:48 +08:00
zach
4c938306bd fix: maverick test fork block 2025-04-11 08:30:48 +08:00
zach
d103ca9e33 fix: swap test 2025-04-11 08:30:48 +08:00
zach
72a651d453 feat: add swap encode 2025-04-11 08:30:45 +08:00
zach
0ac722d91f feat: add mav executor 2025-04-11 08:26:13 +08:00
Diana Carvalho
916c2b7dba feat: Add new CurveExecutor address
--- don't change below this line ---
ENG-4307 Took 5 minutes
2025-04-10 15:52:21 +01:00
Diana Carvalho
c963f3b2f6 fix: Use forceApprove instead of regular Approve
This is necessary for USDT (it was failing)

--- don't change below this line ---
ENG-4307 Took 29 minutes
2025-04-10 15:44:02 +01:00