Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
1ede9d4
swapper
mel0ndev Jan 28, 2026
f972274
fix output
mel0ndev Jan 28, 2026
3605d4e
add oracle pricing slippage checks
mel0ndev Jan 30, 2026
49738c0
pre test but compiling
mel0ndev Feb 10, 2026
d1ceff8
add basic tests
mel0ndev Feb 11, 2026
a7deed8
add tests
mel0ndev Feb 11, 2026
6e7752b
add restricted swapper
mel0ndev Feb 17, 2026
f8e86ec
cleanup shared code
mel0ndev Feb 19, 2026
dd7692d
cleanup
mel0ndev Feb 19, 2026
9898157
more tests
mel0ndev Feb 20, 2026
3d1b72f
updates
mel0ndev Feb 23, 2026
26643b5
update flow
mel0ndev Mar 4, 2026
2e7608c
poc uniswapv3 working
mel0ndev Mar 5, 2026
44cd6ac
oracle start
mel0ndev Mar 6, 2026
3580b38
oracle support
mel0ndev Mar 6, 2026
5a6ad7e
add limit orders
mel0ndev Mar 9, 2026
adacd7e
yes
mel0ndev Mar 10, 2026
0a5bbf6
eveyrhting broken after refactor
mel0ndev Mar 10, 2026
b5d6888
fix tests
mel0ndev Mar 10, 2026
4123a60
Merge branch 'dev/oct-2025' into feat/swapper
mel0ndev Mar 11, 2026
506bf53
updates
mel0ndev Mar 11, 2026
8b2960b
merge dev
mel0ndev Mar 11, 2026
4927c19
fix tests
mel0ndev Mar 11, 2026
b63751e
cleanup
mel0ndev Mar 11, 2026
a42f09e
unit tests for swapper
mel0ndev Mar 12, 2026
259658d
more coverage
mel0ndev Mar 12, 2026
b913e67
cleanup, make nice, add oneinch limit orders, //TODO test limit orders
mel0ndev Mar 13, 2026
3f09f80
generic rate provider with return data
mel0ndev Mar 16, 2026
4f18f12
deploy script
mel0ndev Mar 17, 2026
6c713b2
cowswap working, ensure hash is good now
mel0ndev Mar 18, 2026
d2a9fdf
cowswap good, oneinch kinda borked still
mel0ndev Mar 19, 2026
036f798
more checks
mel0ndev Mar 20, 2026
7050a9f
add oracles[] array
mel0ndev Mar 23, 2026
2b6420e
more tests, oracle rework
mel0ndev Mar 24, 2026
e5b5fa2
fix integration tests
mel0ndev Mar 24, 2026
777d4bf
workin on limit orders
mel0ndev Mar 25, 2026
640b517
oneinch still giving issues
mel0ndev Mar 26, 2026
0531eb9
working 1inch order
mel0ndev Mar 26, 2026
c368b57
regular swaps works
mel0ndev Mar 30, 2026
b543dcd
add replace order functionality
mel0ndev Mar 31, 2026
254897c
find tokenout for 1inch
mel0ndev Apr 2, 2026
e5ab509
fix clanker mess that was the oneinch adapter
mel0ndev Apr 6, 2026
c4267a1
fixup
mel0ndev Apr 7, 2026
ba8fe51
clank clank
mel0ndev Apr 7, 2026
eaa370f
refactor to remove uint8 protocol and simplify to address
mel0ndev Apr 7, 2026
582ff14
fix oneinch again, redeploy new test swapper
mel0ndev Apr 8, 2026
2a74747
add openocean swaps
mel0ndev Apr 9, 2026
8f630df
add fees
mel0ndev Apr 10, 2026
1d645f9
fee stuff
mel0ndev Apr 10, 2026
98ea565
open ocean limit orders
mel0ndev Apr 13, 2026
d4556fa
limit order fees
mel0ndev Apr 14, 2026
5c1e1d5
add lifi adapter
mel0ndev Apr 15, 2026
cd337ac
clanker cleanup
mel0ndev Apr 16, 2026
fbf1f76
clanker cleanup
mel0ndev Apr 16, 2026
f401148
docs, cleanup, and more
mel0ndev Apr 17, 2026
7136899
fixes
mel0ndev Apr 20, 2026
dad510c
fee check
mel0ndev Apr 20, 2026
ef8eae7
macro audit fixes
mel0ndev Apr 29, 2026
aac9c31
fix borked array pop
mel0ndev Apr 29, 2026
5c768d3
add cancel check
mel0ndev May 5, 2026
b370822
update root
mel0ndev May 6, 2026
79b9f56
script changes
mel0ndev May 8, 2026
7670d4e
fix fee delay
mel0ndev May 11, 2026
f782646
fix tests
mel0ndev May 12, 2026
9decfdf
fixes, versioning, and new fee limit order mappings
mel0ndev May 19, 2026
b801f69
registry fixes
mel0ndev May 20, 2026
5c110ef
refund principal only, general fixes
mel0ndev May 20, 2026
1e7cf87
oneinch and cowswap filledAmount() + tests
mel0ndev May 21, 2026
a87ccbd
all gas no brakes
mel0ndev May 22, 2026
b37d19d
all gas no brakes
mel0ndev May 22, 2026
49b0000
<your message>
mel0ndev May 25, 2026
ba008da
clean tests
mel0ndev May 25, 2026
99961ab
add initial m0 adapter (unfinished)
mel0ndev May 26, 2026
ffa595a
add initial m0 adapter (unfinished)
mel0ndev May 26, 2026
5bcdf8b
m0 adapter
mel0ndev May 27, 2026
d262c6c
test m0 adapter
mel0ndev May 28, 2026
dbac235
tests
mel0ndev May 29, 2026
ee6bace
fix partial fill test
mel0ndev May 29, 2026
fb7d2bb
add tests and hook on replace order
mel0ndev Jun 1, 2026
f580117
rename adapter
mel0ndev Jun 1, 2026
51a4a4e
add deployment update config
mel0ndev Jun 2, 2026
320cd72
script updates
mel0ndev Jun 4, 2026
03f6ed8
script updates
mel0ndev Jun 8, 2026
149deeb
add new oneinch adapter variations
mel0ndev Jun 8, 2026
24540fb
add new oneinch adapter variations
mel0ndev Jun 9, 2026
dc8256d
fix loop
mel0ndev Jun 9, 2026
ac89958
tenative 1inch fixes, regression tests pending
mel0ndev Jun 16, 2026
5b1f2d3
more fixes
mel0ndev Jun 23, 2026
a45ad24
test remaining fixes
mel0ndev Jun 24, 2026
8c08a52
move fee registry tests into own file
mel0ndev Jun 24, 2026
0a5999c
add m0 fix
mel0ndev Jun 24, 2026
d784eef
cowswap update, script changes
mel0ndev Jun 25, 2026
234af31
additional fixes to swapper adapters, add quote asset to oracle events
imrtlfarm Jul 3, 2026
f02edd7
update comments
imrtlfarm Jul 3, 2026
9a47ab3
add uniswapv3 check
mel0ndev Jul 6, 2026
bead973
add events, add 1inch fixes
mel0ndev Jul 6, 2026
019b93c
Merge pull request #749 from Veda-Labs/feat/swapper-fixes-2
mel0ndev Jul 6, 2026
b93d060
remove cow check
mel0ndev Jul 7, 2026
471b504
first draft of Tempo DEX integration/tests according to design doc
Zokunei Jul 9, 2026
bf14681
new deployment
mel0ndev Jul 9, 2026
ca4bc3f
merge dev
mel0ndev Jul 10, 2026
d8ce356
add audits
mel0ndev Jul 10, 2026
52e55cc
update roots
mel0ndev Jul 13, 2026
b61a23a
review changes: gated placeOrder + split market/limit adapters
Zokunei Jul 13, 2026
808066d
gitignore bin/
Zokunei Jul 13, 2026
df90945
Merge origin/feat/swapper into feat/swapper-tempo-dex
Zokunei Jul 13, 2026
3480159
update roots
mel0ndev Jul 13, 2026
3ba0e72
update root
mel0ndev Jul 14, 2026
f5d7e06
update decoder
mel0ndev Jul 14, 2026
bf20fc1
rely on T5 implicit approvals; pin T7-aware Foundry nightly for Tempo CI
Zokunei Jul 14, 2026
adcfad7
Merge remote-tracking branch 'origin/feat/swapper' into feat/swapper-…
Zokunei Jul 14, 2026
c72ba47
fix conflicts
mel0ndev Jul 14, 2026
1a46bac
forge fmt Tempo files (merged fmt config: line_length 160)
Zokunei Jul 14, 2026
708f1a2
change rescueStale function to address greptile concerns
Zokunei Jul 14, 2026
52ef251
silence visibility warnings
Zokunei Jul 14, 2026
1759135
update deploy script
mel0ndev Jul 22, 2026
68aae3c
test: stop WormholeIntegration littering the repo root
alcueca Jul 24, 2026
f1dbecb
test: redirect Wormhole leaf output to gitignored test/fixtures
alcueca Jul 24, 2026
2231236
remove swapExactAmountOut
Zokunei Jul 24, 2026
c4bc85d
separate test files for market/limit
Zokunei Jul 24, 2026
68694c5
update test.yml to use latest nightly for tempo
Zokunei Jul 24, 2026
11fd418
Merge pull request #757 from Veda-Labs/feat/swapper
imrtlfarm Jul 24, 2026
d7ee5bf
remove clutter
imrtlfarm Jul 24, 2026
ed06fa8
Merge pull request #764 from Veda-Labs/fix/wormhole-test-artifact
imrtlfarm Jul 24, 2026
156d03c
Merge pull request #766 from Veda-Labs/nit/remove-flat
imrtlfarm Jul 24, 2026
f307e04
add TempoAdapter audit
Zokunei Jul 28, 2026
73f01a3
Merge pull request #754 from Veda-Labs/feat/swapper-tempo-dex
Zokunei Jul 28, 2026
63a93a9
remove tempo limit order stuff
Zokunei Jul 29, 2026
84e8c59
Merge pull request #767 from Veda-Labs/feat/swapper
mel0ndev Jul 29, 2026
2ae2775
Merge pull request #768 from Veda-Labs/main
imrtlfarm Jul 29, 2026
e46201e
fix swapper tests
mel0ndev Jul 30, 2026
94b99b5
ci: adopt profile-based skip set + solc-memory swap from ci/boost-pow…
mel0ndev Jul 30, 2026
a8455dd
Merge pull request #770 from Veda-Labs/fix/swapper-tests
Zokunei Jul 30, 2026
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
4 changes: 4 additions & 0 deletions .claudeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.env
.env.*
*.key
*.pem
25 changes: 14 additions & 11 deletions .github/workflows/nightly-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,27 @@ jobs:
with:
version: stable

# This job always builds cold (no compile cache), and full compiles peak
# >11 GB in a single solc pipeline — swap keeps the 16 GB runner alive.
- name: Add swap for solc memory peak
run: |
sudo fallocate -l 16G /mnt/swapfile2
sudo chmod 600 /mnt/swapfile2
sudo mkswap /mnt/swapfile2
sudo swapon /mnt/swapfile2

- name: Run Forge build
run: |
forge --version
forge build --skip script
forge build
id: build

- name: Run Forge tests
# Berachain, Corn and Scroll vaults are being deprecated (ETHFI-35),
# so their integration suites are skipped in CI.
# script/ and the deprecated Berachain/Scroll suites (ETHFI-35) are
# excluded via `skip` in [profile.nightly] (foundry.toml), so the build
# and test steps compile the exact same source set — no --skip flags.
run: |
forge test -vv \
--skip SymbioticVaultIntegration --skip CreateTimelockTx \
--skip GoldiVaultIntegration --skip BGTRewardVaultIntegration \
--skip KodiakIslandIntegration --skip KodiakSwappingIntegration \
--skip InfraredIntegration --skip HoneyIntegration \
--skip DolomiteFinanceIntegration --skip BerachainPOLIntegration \
--skip BeraborrowIntegration --skip BeraETHIntegration \
--skip ScrollBridgeIntegration
forge test -vv
id: test

# Scheduled runs notify no one by default, so ping Slack on failure.
Expand Down
57 changes: 46 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:

name: Foundry project
runs-on: ubuntu-latest
# Explicit ceiling (the default is 6h). Note: the historical ~30-min deaths
# were the runner OOMing during compilation (VM killed with "runner received
# a shutdown signal"), not a timeout — see the swap step below.
timeout-minutes: 90
env:
MAINNET_RPC_URL: https://eth-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
ARBITRUM_RPC_URL: https://arb-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
Expand All @@ -25,6 +29,7 @@ jobs:
LINEA_RPC_URL: https://linea-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
MANTLE_RPC_URL: https://mantle-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
HOLESKY_RPC_URL: https://eth-holesky.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
TEMPO_RPC_URL: https://tempo-mainnet.g.alchemy.com/v2/${{ secrets.ALCHEMY_API_KEY }}
BERA_CHAIN_RPC_URL: ${{ secrets.BERA_CHAIN_RPC_URL }}
BOB_RPC_URL: ${{ secrets.BOB_RPC_URL }}
DERIVE_RPC_URL: ${{ secrets.DERIVE_RPC_URL }}
Expand All @@ -49,6 +54,25 @@ jobs:
with:
version: stable

# [profile.ci] and [profile.nightly] in foundry.toml must skip the same
# sources so PR CI and nightly-fuzz test the same code — fail fast if the
# two lists drift apart.
- name: Check ci/nightly skip lists are in sync
run: |
diff <(forge config --json | jq '(.skip // []) | sort') \
<(FOUNDRY_PROFILE=nightly forge config --json | jq '(.skip // []) | sort')

# Full recompiles (any PR touching MerkleTreeHelper/ChainValues dirties
# ~all test compilation units) peak >11 GB in a single solc pipeline; the
# 16 GB runner OOMs and the VM is killed mid-build. Swap on /mnt (~60 GB
# free) absorbs the peak so the build completes instead of dying.
- name: Add swap for solc memory peak
run: |
sudo fallocate -l 16G /mnt/swapfile2
sudo chmod 600 /mnt/swapfile2
sudo mkswap /mnt/swapfile2
sudo swapon /mnt/swapfile2

# Cache forge's compilation output so same-branch pushes only recompile
# changed files. Restore + save are split (not the combined actions/cache)
# because the combined action only saves on job success, and this job
Expand All @@ -71,7 +95,7 @@ jobs:
- name: Run Forge build
run: |
forge --version
forge build --skip script
forge build
id: build

# Persist the compiled artifacts even though the test step below fails on
Expand All @@ -86,15 +110,26 @@ jobs:
key: ${{ steps.forge-cache.outputs.cache-primary-key }}

- name: Run Forge tests
# Berachain, Corn and Scroll vaults are being deprecated (ETHFI-35),
# so their integration suites are skipped in CI.
# script/ and the deprecated Berachain/Scroll suites (ETHFI-35) are
# excluded via `skip` in [profile.ci] (foundry.toml), so the build and
# test steps compile the exact same source set — no --skip flags here.
run: |
forge test -vv \
--skip SymbioticVaultIntegration --skip CreateTimelockTx \
--skip GoldiVaultIntegration --skip BGTRewardVaultIntegration \
--skip KodiakIslandIntegration --skip KodiakSwappingIntegration \
--skip InfraredIntegration --skip HoneyIntegration \
--skip DolomiteFinanceIntegration --skip BerachainPOLIntegration \
--skip BeraborrowIntegration --skip BeraETHIntegration \
--skip ScrollBridgeIntegration
forge test -vv
id: test

# Use nightly Foundry for Tempo tests because stable heavily lags network upgrades
# (stable's embedded Tempo precompiles are pre-T5; this nightly is T7-aware).
# We can't pin an exact nightly version because they are periodically deleted.
- name: Install Foundry (nightly, for Tempo precompiles)
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

# Tempo tests run against the native Tempo precompiles (network = "tempo", Foundry >= 1.7.0).
# The profiles partition the test set: default excludes test/**Tempo*, tempo runs only those.
- name: Run Forge tests (Tempo)
run: |
forge test -vv
env:
FOUNDRY_PROFILE: tempo
id: test-tempo
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
cache/
out/
broadcast/
# vscode-solidity extension compile output
bin/

# Ignores development broadcast logs
!/broadcast
Expand All @@ -22,6 +24,8 @@ dependencies/*
CLAUDE.md
.serena
flatten.sol
swapper_todos.txt
decoder_regen_todos.txt

tools/*

Expand Down
15 changes: 0 additions & 15 deletions WormholeBridgeWETHToMonad.json

This file was deleted.

Binary file added audit/0xmacro-veda-96.pdf
Binary file not shown.
Binary file added audit/certora-boring-swapper-0.pdf
Binary file not shown.
Binary file added audit/certora-boring-swapper-1.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions deployments/configurations/Mainnet/PlasmaUSD.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"setupTestUser": true,
"saveDeploymentDetails": true,
"testUserAddressOrName": {
"address": "0x1a0ADd6EC90fc571272D341439246036901B4E41",
"name": "dev1Address"
"address": "",
"name": ""
},
"deployerContractAddressOrName": {
"address": "0xbc90dbeB9e76Ff5577Bc502EBDebd0F6616ec434",
Expand Down Expand Up @@ -230,4 +230,4 @@
"secondsToMaturity": 3600
}
]
}
}
Empty file.
15 changes: 15 additions & 0 deletions deployments/skeletons/addresses/Mainnet/SwapperTestVault.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Drones": "",
"contractAddresses": {
"AccountantWithRateProviders": "0xb388b9A995f80AD454fD93A0C057Aaf297A35C4d",
"BoringOnChainQueue": "0x78a9673bD6e0d66FeEd3577f5E9Add81Ae8Cf3Bb",
"BoringVault": "0xC395ef909560FFAe6c3A6e5bf05827FDb1c34f9c",
"Lens": "0x69E236b8185917cFffFE61139b9A39D56cE08D49",
"ManagerWithMerkleVerification": "0xc69bd430B6C40Da716B6DABF4BBB48EeBBcCa2a1",
"Pauser": "0x4D3Ed5cf5d87be35372874Bfe9F4cc98fC838cD9",
"QueueSolver": "0x3B51944a9B5f92C04501CDDCca04E8f2dB850067",
"RolesAuthority": "0x73Bd4c88066C013912018E8E31BE73b48c051bb3",
"TellerWithLayerZero": "0x6781886C837C7f4CF1cF432661c8d9e1B886630d",
"Timelock": "0x0000000000000000000000000000000000000000"
}
}
133 changes: 133 additions & 0 deletions deployments/skeletons/configurations/Mainnet/SwapperTestVault.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"deploymentParameters": {
"logLevel": 4,
"useHardwareWallet": true,
"privateKeyEnvName": "BORING_DEVELOPER",
"chainName": "mainnet",
"evmVersion": "cancun",
"deployerContractAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "newDeployer"
},
"nativeWrapperAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "WETH"
},
"deploymentOwnerAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "newDeployer"
},
"deploymentFileName": "skeletons/addresses/Mainnet/SwapperTestVault.json"
},
"rolesAuthorityConfiguration": {
"rolesAuthorityDeploymentName": "Swapper Test Vault Roles Authority V0.1"
},
"lensConfiguration": {
"lensDeploymentName": "Arctic Architecture Lens V0.3"
},
"boringVaultConfiguration": {
"boringVaultDeploymentName": "Swapper Test Vault Boring Vault V0.1",
"boringVaultName": "Swapper Test Vault Vault ",
"boringVaultSymbol": "bigSwappaUSD",
"boringVaultDecimals": 6
},
"managerConfiguration": {
"managerDeploymentName": "Swapper Test Vault Manager V0.1",
"balancerVaultAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "balancerVault"
}
},
"accountantConfiguration": {
"accountantDeploymentName": "Swapper Test Vault Accountant V0.1",
"accountantParameters": {
"kind": {
"variableRate": true,
"fixedRate": false,
"yieldStreaming": false
},
"payoutConfiguration": {
"payoutTo": "0x0000000000000000000000000000000000000001",
"optionalPaymentSplitterName": "Swapper Test Vault Payment Splitter V0.1",
"splits": []
},
"accountantDeploymentParameters": {
"allowedExchangeRateChangeLower": 9950,
"allowedExchangeRateChangeUpper": 10050,
"base": {
"address": "0x0000000000000000000000000000000000000000",
"name": "USDC"
},
"minimumUpateDelayInSeconds": 21600,
"performanceFee": 1050,
"platformFee": 0,
"startingExchangeRate": 1000000
}
}
},
"tellerConfiguration": {
"tellerDeploymentName": "Swapper Test Vault Teller V0.1",
"tellerParameters": {
"kind": {
"teller": false,
"tellerWithRemediation": false,
"tellerWithCcip": false,
"tellerWithLayerZero": true,
"tellerWithYieldStreaming": false,
"tellerWithLayerZeroRateLimiting": false
},
"layerZero": {
"endpointAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "LayerZeroEndPoint"
},
"lzTokenAddressOrName": {
"address": "0x0000000000000000000000000000000000000001",
"name": "ZRO"
},
"lzChains": []
}
}
},
"boringQueueConfiguration": {
"boringQueueDeploymentName": "Swapper Test Vault Boring Queue V0.1",
"boringQueueSolverName": "Swapper Test Vault Boring Solver V0.1",
"excessToSolverNonSelfSolve": true,
"queueParameters": {
"kind": {
"boringQueue": true,
"boringQueueWithTracking": false
}
}
},
"droneConfiguration": {
"droneDeploymentBaseName": "Swapper Test Vault Drone V0.1",
"droneCount": 0,
"safeGasToForwardNative": 21000
},
"pauserConfiguration": {
"shouldDeploy": true,
"pauserDeploymentName": "Swapper Test Vault Pauser V0.1"
},
"timelockConfiguration": {
"shouldDeploy": false,
"timelockDeploymentName": "Swapper Test VaultTimelock V0.1",
"timelockParameters": {
"executors": ["0x0463E60C7cE10e57911AB7bD1667eaa21de3e79b"],
"minDelay": 0,
"proposers": ["0x0463E60C7cE10e57911AB7bD1667eaa21de3e79b"]
}
},
"aaveV3BufferHelperConfiguration": {
"shouldDeploy": false,
"aaveV3BufferHelperDeploymentName": "Swapper Test Vault AaveV3 Buffer Helper V0.1",
"aaveV3PoolAddressOrName": {
"address": "0x0000000000000000000000000000000000000000",
"name": "v3Pool"
}
},
"aaveV3BufferLensConfiguration": {
"shouldDeploy": false,
"aaveV3BufferLensDeploymentName": "AaveV3 Buffer Lens V0.1"
}
}
Loading
Loading