diff --git a/.forge-snapshots/allowanceHolder_empty_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_empty_DAI-WETH.snap index a3b9cc532..6648708cf 100644 --- a/.forge-snapshots/allowanceHolder_empty_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_empty_DAI-WETH.snap @@ -1 +1 @@ -8649 \ No newline at end of file +8646 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_empty_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_empty_USDC-WETH.snap index a3b9cc532..6648708cf 100644 --- a/.forge-snapshots/allowanceHolder_empty_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_empty_USDC-WETH.snap @@ -1 +1 @@ -8649 \ No newline at end of file +8646 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_empty_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_empty_USDT-WETH.snap index a3b9cc532..6648708cf 100644 --- a/.forge-snapshots/allowanceHolder_empty_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_empty_USDT-WETH.snap @@ -1 +1 @@ -8649 \ No newline at end of file +8646 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_maverickV2_VIP_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_maverickV2_VIP_USDC-WETH.snap index bce4817b7..f4183d682 100644 --- a/.forge-snapshots/allowanceHolder_maverickV2_VIP_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_maverickV2_VIP_USDC-WETH.snap @@ -1 +1 @@ -123661 \ No newline at end of file +123658 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_DAI-WETH.snap index db26c171e..7df7442f9 100644 --- a/.forge-snapshots/allowanceHolder_rfq_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_DAI-WETH.snap @@ -1 +1 @@ -87031 \ No newline at end of file +87028 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_USDC-WETH.snap index c49bbe9b3..677988d8b 100644 --- a/.forge-snapshots/allowanceHolder_rfq_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_USDC-WETH.snap @@ -1 +1 @@ -106505 \ No newline at end of file +106502 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_USDT-WETH.snap index e2378d1cb..bbd2c2031 100644 --- a/.forge-snapshots/allowanceHolder_rfq_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_USDT-WETH.snap @@ -1 +1 @@ -98143 \ No newline at end of file +98140 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_DAI-WETH.snap index 7168eb3c4..a6238f1dd 100644 --- a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_DAI-WETH.snap @@ -1 +1 @@ -99130 \ No newline at end of file +99127 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDC-WETH.snap index d17bc79c3..d84cd0077 100644 --- a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDC-WETH.snap @@ -1 +1 @@ -122778 \ No newline at end of file +122775 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDT-WETH.snap index 800174f11..7796668f4 100644 --- a/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_fixedFee_sellToken_USDT-WETH.snap @@ -1 +1 @@ -111354 \ No newline at end of file +111351 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_DAI-WETH.snap index abac617d9..4acc97482 100644 --- a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_DAI-WETH.snap @@ -1 +1 @@ -126912 \ No newline at end of file +126873 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDC-WETH.snap index 73afe119b..bda7f204e 100644 --- a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDC-WETH.snap @@ -1 +1 @@ -154498 \ No newline at end of file +154459 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDT-WETH.snap index 0391d30de..e2cdbee0c 100644 --- a/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_rfq_proportionalFee_sellToken_USDT-WETH.snap @@ -1 +1 @@ -143656 \ No newline at end of file +143617 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_DAI-WETH.snap index 7e0273943..85a5501b4 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_DAI-WETH.snap @@ -1 +1 @@ -104266 \ No newline at end of file +104263 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDC-WETH.snap index 88eeca48f..9f402300f 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDC-WETH.snap @@ -1 +1 @@ -114364 \ No newline at end of file +114361 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDT-WETH.snap index 05531fefa..4463b72a2 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV2_single_chain_USDT-WETH.snap @@ -1 +1 @@ -105434 \ No newline at end of file +105431 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_DAI-WETH.snap index fa1881560..e0a891d12 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_DAI-WETH.snap @@ -1 +1 @@ -113262 \ No newline at end of file +113154 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDC-WETH.snap index 6b7ae9b05..9723c0497 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDC-WETH.snap @@ -1 +1 @@ -125828 \ No newline at end of file +125720 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDT-WETH.snap index 4ebdb44c1..d3f68dfa0 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_USDT-WETH.snap @@ -1 +1 @@ -116078 \ No newline at end of file +115970 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_DAI-WETH.snap index c6452b3b6..59bebe8f2 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_DAI-WETH.snap @@ -1 +1 @@ -113381 \ No newline at end of file +113273 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDC-WETH.snap index 85bd0e1fb..7020d6626 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDC-WETH.snap @@ -1 +1 @@ -125947 \ No newline at end of file +125839 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDT-WETH.snap index fd7f5d05a..d41546743 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3VIP_contract_USDT-WETH.snap @@ -1 +1 @@ -116197 \ No newline at end of file +116089 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3_DAI-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3_DAI-WETH.snap index 5773ffd91..ebf61e421 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3_DAI-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3_DAI-WETH.snap @@ -1 +1 @@ -140133 \ No newline at end of file +139883 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3_USDC-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3_USDC-WETH.snap index bad4f6237..cf7ba921b 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3_USDC-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3_USDC-WETH.snap @@ -1 +1 @@ -156755 \ No newline at end of file +156505 \ No newline at end of file diff --git a/.forge-snapshots/allowanceHolder_uniswapV3_USDT-WETH.snap b/.forge-snapshots/allowanceHolder_uniswapV3_USDT-WETH.snap index 65ced7c98..d2363a531 100644 --- a/.forge-snapshots/allowanceHolder_uniswapV3_USDT-WETH.snap +++ b/.forge-snapshots/allowanceHolder_uniswapV3_USDT-WETH.snap @@ -1 +1 @@ -146806 \ No newline at end of file +146556 \ No newline at end of file diff --git a/.forge-snapshots/settler_basic_curve_USDT-WETH.snap b/.forge-snapshots/settler_basic_curve_USDT-WETH.snap index efee85588..42c04b244 100644 --- a/.forge-snapshots/settler_basic_curve_USDT-WETH.snap +++ b/.forge-snapshots/settler_basic_curve_USDT-WETH.snap @@ -1 +1 @@ -422784 \ No newline at end of file +422739 \ No newline at end of file diff --git a/.forge-snapshots/settler_curveV2_fee_USDT-WETH.snap b/.forge-snapshots/settler_curveV2_fee_USDT-WETH.snap index 6addc4f3c..1b7c69fe3 100644 --- a/.forge-snapshots/settler_curveV2_fee_USDT-WETH.snap +++ b/.forge-snapshots/settler_curveV2_fee_USDT-WETH.snap @@ -1 +1 @@ -434131 \ No newline at end of file +434086 \ No newline at end of file diff --git a/.forge-snapshots/settler_dodoV1_USDC-WETH.snap b/.forge-snapshots/settler_dodoV1_USDC-WETH.snap index 95abb2345..d8bde7e24 100644 --- a/.forge-snapshots/settler_dodoV1_USDC-WETH.snap +++ b/.forge-snapshots/settler_dodoV1_USDC-WETH.snap @@ -1 +1 @@ -308678 \ No newline at end of file +308591 \ No newline at end of file diff --git a/.forge-snapshots/settler_dodov2_USDT-DAI.snap b/.forge-snapshots/settler_dodov2_USDT-DAI.snap index 8fb5c1de9..96ffb4d5e 100644 --- a/.forge-snapshots/settler_dodov2_USDT-DAI.snap +++ b/.forge-snapshots/settler_dodov2_USDT-DAI.snap @@ -1 +1 @@ -217904 \ No newline at end of file +217868 \ No newline at end of file diff --git a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_DAI-WETH.snap b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_DAI-WETH.snap index 2edaef5a5..a4a59405a 100644 --- a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_DAI-WETH.snap +++ b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_DAI-WETH.snap @@ -1 +1 @@ -129647 \ No newline at end of file +129381 \ No newline at end of file diff --git a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDC-WETH.snap b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDC-WETH.snap index bbd4c5e60..7e82ff187 100644 --- a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDC-WETH.snap +++ b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDC-WETH.snap @@ -1 +1 @@ -140638 \ No newline at end of file +140372 \ No newline at end of file diff --git a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDT-WETH.snap b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDT-WETH.snap index 868da7dba..46bc685eb 100644 --- a/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDT-WETH.snap +++ b/.forge-snapshots/settler_externalMoveExecute_uniswapV3_USDT-WETH.snap @@ -1 +1 @@ -136635 \ No newline at end of file +136369 \ No newline at end of file diff --git a/.forge-snapshots/settler_makerPsmLite_buyGem_DAI-USDC.snap b/.forge-snapshots/settler_makerPsmLite_buyGem_DAI-USDC.snap index ba3a0d4e0..76a688166 100644 --- a/.forge-snapshots/settler_makerPsmLite_buyGem_DAI-USDC.snap +++ b/.forge-snapshots/settler_makerPsmLite_buyGem_DAI-USDC.snap @@ -1 +1 @@ -176333 \ No newline at end of file +176309 \ No newline at end of file diff --git a/.forge-snapshots/settler_makerPsmLite_sellGem_USDC-DAI.snap b/.forge-snapshots/settler_makerPsmLite_sellGem_USDC-DAI.snap index 4163e3119..3f18b06b9 100644 --- a/.forge-snapshots/settler_makerPsmLite_sellGem_USDC-DAI.snap +++ b/.forge-snapshots/settler_makerPsmLite_sellGem_USDC-DAI.snap @@ -1 +1 @@ -180740 \ No newline at end of file +180729 \ No newline at end of file diff --git a/.forge-snapshots/settler_maverickV2_USDC-WETH.snap b/.forge-snapshots/settler_maverickV2_USDC-WETH.snap index 7ca2b3ad2..4fbd72215 100644 --- a/.forge-snapshots/settler_maverickV2_USDC-WETH.snap +++ b/.forge-snapshots/settler_maverickV2_USDC-WETH.snap @@ -1 +1 @@ -163954 \ No newline at end of file +163918 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_makerPsmLite_sellGem_USDC-DAI.snap b/.forge-snapshots/settler_metaTxn_makerPsmLite_sellGem_USDC-DAI.snap index 0f96cf27b..f982d19d5 100644 --- a/.forge-snapshots/settler_metaTxn_makerPsmLite_sellGem_USDC-DAI.snap +++ b/.forge-snapshots/settler_metaTxn_makerPsmLite_sellGem_USDC-DAI.snap @@ -1 +1 @@ -184637 \ No newline at end of file +184628 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_DAI-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_DAI-WETH.snap index 216b84648..14a19b57c 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_DAI-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_DAI-WETH.snap @@ -1 +1 @@ -127154 \ No newline at end of file +127049 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDC-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDC-WETH.snap index 7c98d9436..7a4f161b5 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDC-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDC-WETH.snap @@ -1 +1 @@ -139720 \ No newline at end of file +139615 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDT-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDT-WETH.snap index 167b89087..5d47f147c 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDT-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3VIP_USDT-WETH.snap @@ -1 +1 @@ -129964 \ No newline at end of file +129859 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3_DAI-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3_DAI-WETH.snap index 6a7a71914..551175e9d 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3_DAI-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3_DAI-WETH.snap @@ -1 +1 @@ -153839 \ No newline at end of file +153595 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3_USDC-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3_USDC-WETH.snap index 7938792fe..ec0ea6f0d 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3_USDC-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3_USDC-WETH.snap @@ -1 +1 @@ -170461 \ No newline at end of file +170217 \ No newline at end of file diff --git a/.forge-snapshots/settler_metaTxn_uniswapV3_USDT-WETH.snap b/.forge-snapshots/settler_metaTxn_uniswapV3_USDT-WETH.snap index bb325a196..6d6c20790 100644 --- a/.forge-snapshots/settler_metaTxn_uniswapV3_USDT-WETH.snap +++ b/.forge-snapshots/settler_metaTxn_uniswapV3_USDT-WETH.snap @@ -1 +1 @@ -160506 \ No newline at end of file +160262 \ No newline at end of file diff --git a/.forge-snapshots/settler_rfq_fee_full_custody_DAI-USDC.snap b/.forge-snapshots/settler_rfq_fee_full_custody_DAI-USDC.snap index 57a5ab280..39f63e5b8 100644 --- a/.forge-snapshots/settler_rfq_fee_full_custody_DAI-USDC.snap +++ b/.forge-snapshots/settler_rfq_fee_full_custody_DAI-USDC.snap @@ -1 +1 @@ -245559 \ No newline at end of file +245487 \ No newline at end of file diff --git a/.forge-snapshots/settler_rfq_fee_full_custody_DAI-WETH.snap b/.forge-snapshots/settler_rfq_fee_full_custody_DAI-WETH.snap index e8765af4f..ddaa45f04 100644 --- a/.forge-snapshots/settler_rfq_fee_full_custody_DAI-WETH.snap +++ b/.forge-snapshots/settler_rfq_fee_full_custody_DAI-WETH.snap @@ -1 +1 @@ -160803 \ No newline at end of file +160731 \ No newline at end of file diff --git a/.forge-snapshots/settler_rfq_fee_full_custody_USDC-DAI.snap b/.forge-snapshots/settler_rfq_fee_full_custody_USDC-DAI.snap index f93a7438f..9f5bf5ca0 100644 --- a/.forge-snapshots/settler_rfq_fee_full_custody_USDC-DAI.snap +++ b/.forge-snapshots/settler_rfq_fee_full_custody_USDC-DAI.snap @@ -1 +1 @@ -241503 \ No newline at end of file +241431 \ No newline at end of file diff --git a/.forge-snapshots/settler_rfq_fee_full_custody_USDC-WETH.snap b/.forge-snapshots/settler_rfq_fee_full_custody_USDC-WETH.snap index 2af2be17d..f32f29728 100644 --- a/.forge-snapshots/settler_rfq_fee_full_custody_USDC-WETH.snap +++ b/.forge-snapshots/settler_rfq_fee_full_custody_USDC-WETH.snap @@ -1 +1 @@ -184333 \ No newline at end of file +184261 \ No newline at end of file diff --git a/.forge-snapshots/settler_rfq_fee_full_custody_USDT-WETH.snap b/.forge-snapshots/settler_rfq_fee_full_custody_USDT-WETH.snap index 31ace86df..9b70202e1 100644 --- a/.forge-snapshots/settler_rfq_fee_full_custody_USDT-WETH.snap +++ b/.forge-snapshots/settler_rfq_fee_full_custody_USDT-WETH.snap @@ -1 +1 @@ -175771 \ No newline at end of file +175699 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3VIP_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3VIP_DAI-WETH.snap index a26d2db83..2baeabfcc 100644 --- a/.forge-snapshots/settler_uniswapV3VIP_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3VIP_DAI-WETH.snap @@ -1 +1 @@ -123776 \ No newline at end of file +123671 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3VIP_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3VIP_USDC-WETH.snap index 0da9845d2..59946e987 100644 --- a/.forge-snapshots/settler_uniswapV3VIP_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3VIP_USDC-WETH.snap @@ -1 +1 @@ -136342 \ No newline at end of file +136237 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3VIP_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3VIP_USDT-WETH.snap index 6631eaebf..541fecf16 100644 --- a/.forge-snapshots/settler_uniswapV3VIP_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3VIP_USDT-WETH.snap @@ -1 +1 @@ -126592 \ No newline at end of file +126487 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3_DAI-WETH.snap index 139ad043a..5f87c0797 100644 --- a/.forge-snapshots/settler_uniswapV3_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_DAI-WETH.snap @@ -1 +1 @@ -150497 \ No newline at end of file +150250 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3_USDC-WETH.snap index 0785b4611..4140e507e 100644 --- a/.forge-snapshots/settler_uniswapV3_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_USDC-WETH.snap @@ -1 +1 @@ -167119 \ No newline at end of file +166872 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3_USDT-WETH.snap index c39d9c8a3..c1eeb1bce 100644 --- a/.forge-snapshots/settler_uniswapV3_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_USDT-WETH.snap @@ -1 +1 @@ -157170 \ No newline at end of file +156923 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_DAI-WETH.snap index bddc07e98..75c4ac77b 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_DAI-WETH.snap @@ -1 +1 @@ -188427 \ No newline at end of file +188144 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDC-WETH.snap index cce5af358..521244d5f 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDC-WETH.snap @@ -1 +1 @@ -205049 \ No newline at end of file +204766 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDT-WETH.snap index 6bd08effc..9de69ce05 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_full_custody_USDT-WETH.snap @@ -1 +1 @@ -195100 \ No newline at end of file +194817 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_DAI-WETH.snap index 816026626..c36ce2657 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_DAI-WETH.snap @@ -1 +1 @@ -161704 \ No newline at end of file +161563 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDC-WETH.snap index 7cc7a34b5..dbb8f1cc0 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDC-WETH.snap @@ -1 +1 @@ -174270 \ No newline at end of file +174129 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDT-WETH.snap index c469db103..27d90712f 100644 --- a/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_buyToken_fee_single_custody_USDT-WETH.snap @@ -1 +1 @@ -164520 \ No newline at end of file +164379 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_multiplex2_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3_multiplex2_DAI-WETH.snap index 61b94b847..4b79d012a 100644 --- a/.forge-snapshots/settler_uniswapV3_multiplex2_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_multiplex2_DAI-WETH.snap @@ -1 +1 @@ -183640 \ No newline at end of file +183146 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_multiplex2_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3_multiplex2_USDC-WETH.snap index 82c770812..2e0063afe 100644 --- a/.forge-snapshots/settler_uniswapV3_multiplex2_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_multiplex2_USDC-WETH.snap @@ -1 +1 @@ -204092 \ No newline at end of file +203598 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_multiplex2_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3_multiplex2_USDT-WETH.snap index ffada1786..10a02d4e1 100644 --- a/.forge-snapshots/settler_uniswapV3_multiplex2_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_multiplex2_USDT-WETH.snap @@ -1 +1 @@ -192556 \ No newline at end of file +192062 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_DAI-WETH.snap b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_DAI-WETH.snap index 22f0e26b1..2227aba1a 100644 --- a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_DAI-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_DAI-WETH.snap @@ -1 +1 @@ -162137 \ No newline at end of file +161890 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDC-WETH.snap b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDC-WETH.snap index 885c579eb..bdfa0a7be 100644 --- a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDC-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDC-WETH.snap @@ -1 +1 @@ -182815 \ No newline at end of file +182568 \ No newline at end of file diff --git a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDT-WETH.snap b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDT-WETH.snap index 376ea43a7..a604f4b33 100644 --- a/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDT-WETH.snap +++ b/.forge-snapshots/settler_uniswapV3_sellToken_fee_full_custody_USDT-WETH.snap @@ -1 +1 @@ -170586 \ No newline at end of file +170339 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_DAI-WETH.snap b/.forge-snapshots/settler_zeroExOtc_DAI-WETH.snap index 01a644215..512512da3 100644 --- a/.forge-snapshots/settler_zeroExOtc_DAI-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_DAI-WETH.snap @@ -1 +1 @@ -176680 \ No newline at end of file +176635 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_USDC-WETH.snap b/.forge-snapshots/settler_zeroExOtc_USDC-WETH.snap index 13a200c39..e02dbc509 100644 --- a/.forge-snapshots/settler_zeroExOtc_USDC-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_USDC-WETH.snap @@ -1 +1 @@ -206590 \ No newline at end of file +206545 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_USDT-WETH.snap b/.forge-snapshots/settler_zeroExOtc_USDT-WETH.snap index 306aa9826..7e3a2abd5 100644 --- a/.forge-snapshots/settler_zeroExOtc_USDT-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_USDT-WETH.snap @@ -1 +1 @@ -192012 \ No newline at end of file +191967 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_partialFill_DAI-WETH.snap b/.forge-snapshots/settler_zeroExOtc_partialFill_DAI-WETH.snap index e7a5ee6f1..144f77c55 100644 --- a/.forge-snapshots/settler_zeroExOtc_partialFill_DAI-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_partialFill_DAI-WETH.snap @@ -1 +1 @@ -183889 \ No newline at end of file +183844 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_partialFill_USDC-WETH.snap b/.forge-snapshots/settler_zeroExOtc_partialFill_USDC-WETH.snap index ddf9f1bd6..1f6fa43f8 100644 --- a/.forge-snapshots/settler_zeroExOtc_partialFill_USDC-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_partialFill_USDC-WETH.snap @@ -1 +1 @@ -215855 \ No newline at end of file +215810 \ No newline at end of file diff --git a/.forge-snapshots/settler_zeroExOtc_partialFill_USDT-WETH.snap b/.forge-snapshots/settler_zeroExOtc_partialFill_USDT-WETH.snap index 726fd7068..3aee09ff5 100644 --- a/.forge-snapshots/settler_zeroExOtc_partialFill_USDT-WETH.snap +++ b/.forge-snapshots/settler_zeroExOtc_partialFill_USDT-WETH.snap @@ -1 +1 @@ -200997 \ No newline at end of file +200952 \ No newline at end of file diff --git a/.forge-snapshots/wethDeposit.snap b/.forge-snapshots/wethDeposit.snap index 9861aaaaf..af340218e 100644 --- a/.forge-snapshots/wethDeposit.snap +++ b/.forge-snapshots/wethDeposit.snap @@ -1 +1 @@ -85566 \ No newline at end of file +85524 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad2e72737..d8acddf8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,9 @@ jobs: - name: Build UniswapV4 run: forge build lib/v4-core/src/PoolManager.sol + - name: Build contracts + run: forge build --skip UniswapV4UnitTest.t.sol + - name: Run tests run: forge test env: diff --git a/README.md b/README.md index ed9102ec9..3f8255edb 100644 --- a/README.md +++ b/README.md @@ -559,66 +559,66 @@ comparison. | ------------------- | ---------- | --------- | ------ | ------ | | 0x V4 VIP | Uniswap V3 | USDC/WETH | 124669 | 0.00% | | 0x V4 Multiplex | Uniswap V3 | USDC/WETH | 138525 | 11.11% | -| Settler VIP (warm) | Uniswap V3 | USDC/WETH | 136342 | 9.36% | -| AllowanceHolder VIP | Uniswap V3 | USDC/WETH | 125828 | 0.93% | +| Settler VIP (warm) | Uniswap V3 | USDC/WETH | 136237 | 9.28% | +| AllowanceHolder VIP | Uniswap V3 | USDC/WETH | 125720 | 0.84% | | UniswapRouter V3 | Uniswap V3 | USDC/WETH | 120978 | -2.96% | | | | | | | | 0x V4 VIP | Uniswap V3 | DAI/WETH | 112103 | 0.00% | | 0x V4 Multiplex | Uniswap V3 | DAI/WETH | 125959 | 12.36% | -| Settler VIP (warm) | Uniswap V3 | DAI/WETH | 123776 | 10.41% | -| AllowanceHolder VIP | Uniswap V3 | DAI/WETH | 113262 | 1.03% | +| Settler VIP (warm) | Uniswap V3 | DAI/WETH | 123671 | 10.32% | +| AllowanceHolder VIP | Uniswap V3 | DAI/WETH | 113154 | 0.94% | | UniswapRouter V3 | Uniswap V3 | DAI/WETH | 108412 | -3.29% | | | | | | | | 0x V4 VIP | Uniswap V3 | USDT/WETH | 114910 | 0.00% | | 0x V4 Multiplex | Uniswap V3 | USDT/WETH | 128766 | 12.06% | -| Settler VIP (warm) | Uniswap V3 | USDT/WETH | 126592 | 10.17% | -| AllowanceHolder VIP | Uniswap V3 | USDT/WETH | 116078 | 1.02% | +| Settler VIP (warm) | Uniswap V3 | USDT/WETH | 126487 | 10.07% | +| AllowanceHolder VIP | Uniswap V3 | USDT/WETH | 115970 | 0.92% | | UniswapRouter V3 | Uniswap V3 | USDT/WETH | 111091 | -3.32% | | | | | | | | Custody | DEX | Pair | Gas | % | | -------------------- | ---------- | --------- | ------ | ------- | | 0x V4 TransformERC20 | Uniswap V3 | USDC/WETH | 244603 | 0.00% | -| Settler | Uniswap V3 | USDC/WETH | 167119 | -31.68% | -| AllowanceHolder | Uniswap V3 | USDC/WETH | 156755 | -35.91% | +| Settler | Uniswap V3 | USDC/WETH | 166872 | -31.78% | +| AllowanceHolder | Uniswap V3 | USDC/WETH | 156505 | -36.02% | | | | | | | | 0x V4 TransformERC20 | Uniswap V3 | DAI/WETH | 221601 | 0.00% | -| Settler | Uniswap V3 | DAI/WETH | 150497 | -32.09% | -| AllowanceHolder | Uniswap V3 | DAI/WETH | 140133 | -36.76% | +| Settler | Uniswap V3 | DAI/WETH | 150250 | -32.20% | +| AllowanceHolder | Uniswap V3 | DAI/WETH | 139883 | -36.88% | | | | | | | | 0x V4 TransformERC20 | Uniswap V3 | USDT/WETH | 228500 | 0.00% | -| Settler | Uniswap V3 | USDT/WETH | 157170 | -31.22% | -| AllowanceHolder | Uniswap V3 | USDT/WETH | 146806 | -35.75% | +| Settler | Uniswap V3 | USDT/WETH | 156923 | -31.32% | +| AllowanceHolder | Uniswap V3 | USDT/WETH | 146556 | -35.86% | | | | | | | | MetaTransactions | DEX | Pair | Gas | % | | ---------------- | ---------- | --------- | ------ | ------- | | 0x V4 Multiplex | Uniswap V3 | USDC/WETH | 208118 | 0.00% | -| Settler | Uniswap V3 | USDC/WETH | 170464 | -18.09% | +| Settler | Uniswap V3 | USDC/WETH | 170217 | -18.21% | | | | | | | | 0x V4 Multiplex | Uniswap V3 | DAI/WETH | 195552 | 0.00% | -| Settler | Uniswap V3 | DAI/WETH | 153842 | -21.33% | +| Settler | Uniswap V3 | DAI/WETH | 153595 | -21.46% | | | | | | | | 0x V4 Multiplex | Uniswap V3 | USDT/WETH | 198359 | 0.00% | -| Settler | Uniswap V3 | USDT/WETH | 160509 | -19.08% | +| Settler | Uniswap V3 | USDT/WETH | 160262 | -19.21% | | | | | | | | RFQ | DEX | Pair | Gas | % | | --------------- | ------- | --------- | ------ | ------- | | 0x V4 | 0x V4 | USDC/WETH | 97972 | 0.00% | | Settler | Settler | USDC/WETH | 114370 | 16.74% | -| Settler | 0x V4 | USDC/WETH | 206590 | 110.87% | -| AllowanceHolder | Settler | USDC/WETH | 106505 | 8.71% | +| Settler | 0x V4 | USDC/WETH | 206545 | 110.82% | +| AllowanceHolder | Settler | USDC/WETH | 106502 | 8.71% | | | | | | | | 0x V4 | 0x V4 | DAI/WETH | 78498 | 0.00% | | Settler | Settler | DAI/WETH | 94896 | 20.89% | -| Settler | 0x V4 | DAI/WETH | 176680 | 125.08% | -| AllowanceHolder | Settler | DAI/WETH | 87031 | 10.87% | +| Settler | 0x V4 | DAI/WETH | 176635 | 125.02% | +| AllowanceHolder | Settler | DAI/WETH | 87028 | 10.87% | | | | | | | | 0x V4 | 0x V4 | USDT/WETH | 89610 | 0.00% | | Settler | Settler | USDT/WETH | 106008 | 18.30% | -| Settler | 0x V4 | USDT/WETH | 192012 | 114.28% | -| AllowanceHolder | Settler | USDT/WETH | 98143 | 9.52% | +| Settler | 0x V4 | USDT/WETH | 191967 | 114.22% | +| AllowanceHolder | Settler | USDT/WETH | 98140 | 9.52% | | | | | | | | Curve | DEX | Pair | Gas | % | @@ -627,7 +627,7 @@ comparison. | | | | | | | | | | | | | 0x V4 | Curve | USDT/WETH | 452672 | 0.00% | -| Settler | Curve | USDT/WETH | 422784 | -6.60% | +| Settler | Curve | USDT/WETH | 422739 | -6.61% | | Settler | CurveV2 Tricrypto VIP | USDT/WETH | 243783 | -46.15% | | Curve | Curve | USDT/WETH | 341799 | -24.49% | | Curve Swap Router | Curve | USDT/WETH | 412038 | -8.98% | @@ -635,58 +635,58 @@ comparison. | DODO V1 | DEX | Pair | Gas | % | | ------- | ------- | --------- | ------ | ----- | -| Settler | DODO V1 | USDC/WETH | 308678 | 0.00% | +| Settler | DODO V1 | USDC/WETH | 308591 | 0.00% | | | | | | | | | | | | | | | | | | | | Buy token fee | DEX | Pair | Gas | % | | ----------------- | ---------- | --------- | ------ | ----- | -| Settler - custody | Uniswap V3 | USDC/WETH | 174270 | 0.00% | +| Settler - custody | Uniswap V3 | USDC/WETH | 174129 | 0.00% | | | | | | | -| Settler - custody | Uniswap V3 | DAI/WETH | 161704 | 0.00% | +| Settler - custody | Uniswap V3 | DAI/WETH | 161563 | 0.00% | | | | | | | -| Settler - custody | Uniswap V3 | USDT/WETH | 164520 | 0.00% | +| Settler - custody | Uniswap V3 | USDT/WETH | 164379 | 0.00% | | | | | | | | Sell token fee | DEX | Pair | Gas | % | | -------------- | ---------- | --------- | ------ | ------- | -| Settler | Uniswap V3 | USDC/WETH | 182815 | 0.00% | +| Settler | Uniswap V3 | USDC/WETH | 182568 | 0.00% | | | | | | | -| Settler | Uniswap V3 | DAI/WETH | 162137 | 0.00% | +| Settler | Uniswap V3 | DAI/WETH | 161890 | 0.00% | | | | | | | -| Settler | Uniswap V3 | USDT/WETH | 170586 | 0.00% | -| Settler | Curve | USDT/WETH | 434131 | 154.49% | +| Settler | Uniswap V3 | USDT/WETH | 170339 | 0.00% | +| Settler | Curve | USDT/WETH | 434086 | 154.84% | | | | | | | | AllowanceHolder | DEX | Pair | Gas | % | | ------------------------------------ | -------------- | --------- | ------ | ------- | -| execute | Uniswap V3 VIP | USDC/WETH | 125828 | 0.00% | -| Settler - external move then execute | Uniswap V3 | USDC/WETH | 140638 | 11.77% | -| execute | RFQ | USDC/WETH | 106505 | -15.36% | +| execute | Uniswap V3 VIP | USDC/WETH | 125720 | 0.00% | +| Settler - external move then execute | Uniswap V3 | USDC/WETH | 140372 | 11.65% | +| execute | RFQ | USDC/WETH | 106502 | -15.29% | | | | | | | -| execute | Uniswap V3 VIP | DAI/WETH | 113262 | 0.00% | -| Settler - external move then execute | Uniswap V3 | DAI/WETH | 129647 | 14.47% | -| execute | RFQ | DAI/WETH | 87031 | -23.16% | +| execute | Uniswap V3 VIP | DAI/WETH | 113154 | 0.00% | +| Settler - external move then execute | Uniswap V3 | DAI/WETH | 129381 | 14.34% | +| execute | RFQ | DAI/WETH | 87028 | -23.09% | | | | | | | -| execute | Uniswap V3 VIP | USDT/WETH | 116078 | 0.00% | -| Settler - external move then execute | Uniswap V3 | USDT/WETH | 136635 | 17.71% | -| execute | RFQ | USDT/WETH | 98143 | -15.45% | +| execute | Uniswap V3 VIP | USDT/WETH | 115970 | 0.00% | +| Settler - external move then execute | Uniswap V3 | USDT/WETH | 136369 | 17.59% | +| execute | RFQ | USDT/WETH | 98140 | -15.37% | | | | | | | | AllowanceHolder sell token fees | DEX | Pair | Gas | % | | ------------------------------- | --- | --------- | ------ | ------ | -| no fee | RFQ | USDC/WETH | 106505 | 0.00% | -| proportional fee | RFQ | USDC/WETH | 154498 | 45.06% | -| fixed fee | RFQ | USDC/WETH | 122778 | 15.28% | +| no fee | RFQ | USDC/WETH | 106502 | 0.00% | +| proportional fee | RFQ | USDC/WETH | 154459 | 45.03% | +| fixed fee | RFQ | USDC/WETH | 122775 | 15.28% | | | | | | | -| no fee | RFQ | DAI/WETH | 87031 | 0.00% | -| proportional fee | RFQ | DAI/WETH | 126912 | 45.82% | -| fixed fee | RFQ | DAI/WETH | 99130 | 13.90% | +| no fee | RFQ | DAI/WETH | 87028 | 0.00% | +| proportional fee | RFQ | DAI/WETH | 126873 | 45.78% | +| fixed fee | RFQ | DAI/WETH | 99127 | 13.90% | | | | | | | -| no fee | RFQ | USDT/WETH | 98143 | 0.00% | -| proportional fee | RFQ | USDT/WETH | 143656 | 46.37% | -| fixed fee | RFQ | USDT/WETH | 111354 | 13.46% | +| no fee | RFQ | USDT/WETH | 98140 | 0.00% | +| proportional fee | RFQ | USDT/WETH | 143617 | 46.34% | +| fixed fee | RFQ | USDT/WETH | 111351 | 13.46% | | | | | | | [//]: # "END TABLES" diff --git a/src/allowanceholder/AllowanceHolderBase.sol b/src/allowanceholder/AllowanceHolderBase.sol index b0fd5790d..b90fe7584 100644 --- a/src/allowanceholder/AllowanceHolderBase.sol +++ b/src/allowanceholder/AllowanceHolderBase.sol @@ -3,7 +3,7 @@ pragma solidity ^0.8.25; import {IAllowanceHolder} from "./IAllowanceHolder.sol"; import {IERC20} from "@forge-std/interfaces/IERC20.sol"; -import {SafeTransferLib} from "../vendor/SafeTransferLib.sol"; +import {SafeTransferLib} from "../vendor/SafeTransferLib_Solmate.sol"; import {CheckCall} from "../utils/CheckCall.sol"; import {FreeMemory} from "../utils/FreeMemory.sol"; import {TransientStorageLayout} from "./TransientStorageLayout.sol"; diff --git a/src/core/UniswapV3Fork.sol b/src/core/UniswapV3Fork.sol index 2ea935661..9179b2ade 100644 --- a/src/core/UniswapV3Fork.sol +++ b/src/core/UniswapV3Fork.sol @@ -334,15 +334,26 @@ abstract contract UniswapV3Fork is SettlerAbstract { /// @param amount1Delta Token1 amount owed. /// @param data Arbitrary data forwarded from swap() caller. A packed encoding of: payer, sellToken, (optionally: permit[0x20:], isForwarded, sig) function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata data) private { - address payer = address(uint160(bytes20(data))); - data = data[0x14:]; + address payer; + assembly ("memory-safe") { + payer := shr(0x60, calldataload(data.offset)) + data.length := sub(data.length, 0x14) + data.offset := add(0x14, data.offset) + // We don't check for underflow/array-out-of-bounds here because the trusted inithash + // ensures that `data` was passed unmodified from `_updateSwapCallbackData`. Therefore, + // it is at least 40 bytes long. + } uint256 sellAmount = amount0Delta > 0 ? uint256(amount0Delta) : uint256(amount1Delta); _pay(payer, sellAmount, data); } function _pay(address payer, uint256 amount, bytes calldata permit2Data) private { if (payer == address(this)) { - IERC20(address(uint160(bytes20(permit2Data)))).safeTransfer(msg.sender, amount); + IERC20 token; + assembly ("memory-safe") { + token := shr(0x60, calldataload(permit2Data.offset)) + } + token.safeTransfer(msg.sender, amount); } else { assert(payer == address(0)); ISignatureTransfer.PermitTransferFrom calldata permit; diff --git a/src/core/UniswapV4.sol b/src/core/UniswapV4.sol index 6a7777bd8..73536bba6 100644 --- a/src/core/UniswapV4.sol +++ b/src/core/UniswapV4.sol @@ -316,7 +316,7 @@ abstract contract UniswapV4 is SettlerAbstract { uint256 hashMod, bytes memory fills, uint256 amountOutMin - ) internal returns (uint256) { + ) internal returns (uint256 buyAmount) { if (amountOutMin > uint128(type(int128).max)) { Panic.panic(Panic.ARITHMETIC_OVERFLOW); } @@ -355,15 +355,16 @@ abstract contract UniswapV4 is SettlerAbstract { mstore(0x40, add(data, add(0xd3, pathLen))) } - return abi.decode( - abi.decode( - _setOperatorAndCall( - address(POOL_MANAGER), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback - ), - (bytes) - ), - (uint256) + bytes memory encodedBuyAmount = _setOperatorAndCall( + address(POOL_MANAGER), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback ); + // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256)); + assembly ("memory-safe") { + // We can skip all the checks performed by `abi.decode` because we know that this is the + // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy + // amount correctly. + buyAmount := mload(add(0x60, encodedBuyAmount)) + } } function sellToUniswapV4VIP( @@ -375,7 +376,7 @@ abstract contract UniswapV4 is SettlerAbstract { ISignatureTransfer.PermitTransferFrom memory permit, bytes memory sig, uint256 amountOutMin - ) internal returns (uint256) { + ) internal returns (uint256 buyAmount) { if (amountOutMin > uint128(type(int128).max)) { Panic.panic(Panic.ARITHMETIC_OVERFLOW); } @@ -429,15 +430,16 @@ abstract contract UniswapV4 is SettlerAbstract { mstore8(add(0xa8, data), feeOnTransfer) } - return abi.decode( - abi.decode( - _setOperatorAndCall( - address(POOL_MANAGER), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback - ), - (bytes) - ), - (uint256) + bytes memory encodedBuyAmount = _setOperatorAndCall( + address(POOL_MANAGER), data, uint32(IUnlockCallback.unlockCallback.selector), _uniV4Callback ); + // buyAmount = abi.decode(abi.decode(encodedBuyAmount, (bytes)), (uint256)); + assembly ("memory-safe") { + // We can skip all the checks performed by `abi.decode` because we know that this is the + // verbatim result from `unlockCallback` and that `unlockCallback` encoded the buy + // amount correctly. + buyAmount := mload(add(0x60, encodedBuyAmount)) + } } function _uniV4Callback(bytes calldata data) private returns (bytes memory) { diff --git a/src/vendor/SafeTransferLib.sol b/src/vendor/SafeTransferLib.sol index 6aebad031..61d3c5a70 100644 --- a/src/vendor/SafeTransferLib.sol +++ b/src/vendor/SafeTransferLib.sol @@ -1,28 +1,24 @@ -// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-License-Identifier: MIT pragma solidity >=0.8.25; import {IERC20} from "@forge-std/interfaces/IERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. -/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) -/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. +/// @author Modified from Solady (https://github.com/vectorized/solady/blob/main/src/utils/SafeTransferLib.sol) +/// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { - uint32 private constant _TRANSFER_FROM_FAILED_SELECTOR = 0x7939f424; // bytes4(keccak256("TransferFromFailed()")) - uint32 private constant _TRANSFER_FAILED_SELECTOR = 0x90b8ec18; // bytes4(keccak256("TransferFailed()")) - uint32 private constant _APPROVE_FAILED_SELECTOR = 0x3e3f8f73; // bytes4(keccak256("ApproveFailed()")) - /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address payable to, uint256 amount) internal { assembly ("memory-safe") { - // Transfer the ETH and store if it succeeded or not. - if iszero(call(gas(), to, amount, 0, 0, 0, 0)) { - let freeMemoryPointer := mload(0x40) - returndatacopy(freeMemoryPointer, 0, returndatasize()) - revert(freeMemoryPointer, returndatasize()) + // Transfer the ETH and revert if it fails. + if iszero(call(gas(), to, amount, 0x00, 0x00, 0x00, 0x00)) { + let ptr := mload(0x40) + returndatacopy(ptr, 0x00, returndatasize()) + revert(ptr, returndatasize()) } } } @@ -33,77 +29,82 @@ library SafeTransferLib { function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal { assembly ("memory-safe") { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) + let ptr := mload(0x40) // Cache the free memory pointer. - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. - mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. - mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + mstore(0x60, amount) // Store the `amount` argument. + mstore(0x40, to) // Store the `to` argument. + mstore(0x2c, shl(0x60, from)) // Store the `from` argument. (Clears `to`'s padding.) + mstore(0x0c, 0x23b872dd000000000000000000000000) // Selector for `transferFrom(address,address,uint256)`, with `from`'s padding. - // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - if iszero(call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)) { - returndatacopy(freeMemoryPointer, 0, returndatasize()) - revert(freeMemoryPointer, returndatasize()) + // Calldata starts at offset 28 and is 100 bytes long (3 * 32 + 4). + // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory. + if iszero(call(gas(), token, 0x00, 0x1c, 0x64, 0x00, 0x20)) { + returndatacopy(ptr, 0x00, returndatasize()) + revert(ptr, returndatasize()) } - // We check that the call either returned exactly 1 (can't just be non-zero data), or had no - // return data. - if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { - mstore(0, _TRANSFER_FROM_FAILED_SELECTOR) + // We check that the call either returned exactly 1 [true] (can't just be non-zero + // data), or had no return data. + if iszero(or(and(eq(mload(0x00), 0x01), gt(returndatasize(), 0x1f)), iszero(returndatasize()))) { + mstore(0x00, 0x7939f424) // Selector for `TransferFromFailed()` revert(0x1c, 0x04) } + + mstore(0x60, 0x00) // Restore the zero slot to zero. + mstore(0x40, ptr) // Restore the free memory pointer. } } function safeTransfer(IERC20 token, address to, uint256 amount) internal { assembly ("memory-safe") { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) - - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. - mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + mstore(0x14, to) // Store the `to` argument. + mstore(0x34, amount) // Store the `amount` argument. + // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits + // can never be set without running into an OOG, so it's safe. We'll restore them to + // zero at the end. + mstore(0x00, 0xa9059cbb000000000000000000000000) // Selector for `transfer(address,uint256)`, with `to`'s padding. - // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) { - returndatacopy(freeMemoryPointer, 0, returndatasize()) - revert(freeMemoryPointer, returndatasize()) + // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4). + // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory. + if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) { + let ptr := mload(0x40) + returndatacopy(ptr, 0x00, returndatasize()) + revert(ptr, returndatasize()) } - // We check that the call either returned exactly 1 (can't just be non-zero data), or had no - // return data. - if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { - mstore(0, _TRANSFER_FAILED_SELECTOR) + // We check that the call either returned exactly 1 [true] (can't just be non-zero + // data), or had no return data. + if iszero(or(and(eq(mload(0x00), 0x01), gt(returndatasize(), 0x1f)), iszero(returndatasize()))) { + mstore(0x00, 0x90b8ec18) // Selector for `TransferFailed()` revert(0x1c, 0x04) } + + mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten. } } function safeApprove(IERC20 token, address to, uint256 amount) internal { assembly ("memory-safe") { - // Get a pointer to some free memory. - let freeMemoryPointer := mload(0x40) - - // Write the abi-encoded calldata into memory, beginning with the function selector. - mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) - mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. - mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + mstore(0x14, to) // Store the `to` argument. + mstore(0x34, amount) // Store the `amount` argument. + // Storing `amount` clobbers the upper bits of the free memory pointer, but those bits + // can never be set without running into an OOG, so it's safe. We'll restore them to + // zero at the end. + mstore(0x00, 0x095ea7b3000000000000000000000000) // Selector for `approve(address,uint256)`, with `to`'s padding. - // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. - // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. - if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) { - returndatacopy(freeMemoryPointer, 0, returndatasize()) - revert(freeMemoryPointer, returndatasize()) + // Calldata starts at offset 16 and is 68 bytes long (2 * 32 + 4). + // If there is returndata (optional) we copy the first 32 bytes into the first slot of memory. + if iszero(call(gas(), token, 0x00, 0x10, 0x44, 0x00, 0x20)) { + let ptr := mload(0x40) + returndatacopy(ptr, 0x00, returndatasize()) + revert(ptr, returndatasize()) } - // We check that the call either returned exactly 1 (can't just be non-zero data), or had no - // return data. - if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { - mstore(0, _APPROVE_FAILED_SELECTOR) + // We check that the call either returned exactly 1 [true] (can't just be non-zero + // data), or had no return data. + if iszero(or(and(eq(mload(0x00), 0x01), gt(returndatasize(), 0x1f)), iszero(returndatasize()))) { + mstore(0x00, 0x3e3f8f73) // Selector for `ApproveFailed()` revert(0x1c, 0x04) } + + mstore(0x34, 0x00) // Restore the part of the free memory pointer that was overwritten. } } diff --git a/src/vendor/SafeTransferLib_Solmate.sol b/src/vendor/SafeTransferLib_Solmate.sol new file mode 100644 index 000000000..6aebad031 --- /dev/null +++ b/src/vendor/SafeTransferLib_Solmate.sol @@ -0,0 +1,119 @@ +// SPDX-License-Identifier: AGPL-3.0-only +pragma solidity >=0.8.25; + +import {IERC20} from "@forge-std/interfaces/IERC20.sol"; + +/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. +/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) +/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. +/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. +library SafeTransferLib { + uint32 private constant _TRANSFER_FROM_FAILED_SELECTOR = 0x7939f424; // bytes4(keccak256("TransferFromFailed()")) + uint32 private constant _TRANSFER_FAILED_SELECTOR = 0x90b8ec18; // bytes4(keccak256("TransferFailed()")) + uint32 private constant _APPROVE_FAILED_SELECTOR = 0x3e3f8f73; // bytes4(keccak256("ApproveFailed()")) + + /*////////////////////////////////////////////////////////////// + ETH OPERATIONS + //////////////////////////////////////////////////////////////*/ + + function safeTransferETH(address payable to, uint256 amount) internal { + assembly ("memory-safe") { + // Transfer the ETH and store if it succeeded or not. + if iszero(call(gas(), to, amount, 0, 0, 0, 0)) { + let freeMemoryPointer := mload(0x40) + returndatacopy(freeMemoryPointer, 0, returndatasize()) + revert(freeMemoryPointer, returndatasize()) + } + } + } + + /*////////////////////////////////////////////////////////////// + ERC20 OPERATIONS + //////////////////////////////////////////////////////////////*/ + + function safeTransferFrom(IERC20 token, address from, address to, uint256 amount) internal { + assembly ("memory-safe") { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. + mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. + mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + + // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + if iszero(call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)) { + returndatacopy(freeMemoryPointer, 0, returndatasize()) + revert(freeMemoryPointer, returndatasize()) + } + // We check that the call either returned exactly 1 (can't just be non-zero data), or had no + // return data. + if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { + mstore(0, _TRANSFER_FROM_FAILED_SELECTOR) + revert(0x1c, 0x04) + } + } + } + + function safeTransfer(IERC20 token, address to, uint256 amount) internal { + assembly ("memory-safe") { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. + mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + + // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) { + returndatacopy(freeMemoryPointer, 0, returndatasize()) + revert(freeMemoryPointer, returndatasize()) + } + // We check that the call either returned exactly 1 (can't just be non-zero data), or had no + // return data. + if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { + mstore(0, _TRANSFER_FAILED_SELECTOR) + revert(0x1c, 0x04) + } + } + } + + function safeApprove(IERC20 token, address to, uint256 amount) internal { + assembly ("memory-safe") { + // Get a pointer to some free memory. + let freeMemoryPointer := mload(0x40) + + // Write the abi-encoded calldata into memory, beginning with the function selector. + mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) + mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. + mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. + + // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. + // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. + if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)) { + returndatacopy(freeMemoryPointer, 0, returndatasize()) + revert(freeMemoryPointer, returndatasize()) + } + // We check that the call either returned exactly 1 (can't just be non-zero data), or had no + // return data. + if iszero(or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize()))) { + mstore(0, _APPROVE_FAILED_SELECTOR) + revert(0x1c, 0x04) + } + } + } + + function safeApproveIfBelow(IERC20 token, address spender, uint256 amount) internal { + uint256 allowance = token.allowance(address(this), spender); + if (allowance < amount) { + if (allowance != 0) { + safeApprove(token, spender, 0); + } + safeApprove(token, spender, type(uint256).max); + } + } +}