-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not a bug but a question on the project? Or where’s the project that encompass the MetaggregationRouter source code in order to Open a ᴘʀ at the correct place ? #1101
Comments
Just copy the line here In some cases, the srcToken is collected in the Router (like swap from native, or swap as a meta but we don't support it anymore), then it calls Executor to swap. In these cases:
|
@manhlx3006 : Oh sorry, I meant https://arbiscan.io/address/0x6131b5fae19ea4f9d964eac0408e4408b66337b5#code#F1#L476. There’s no cases where the router’s balance of a token can decrease in this function. It should had been But of course, this isn’t the correct repo for this source code, so where is it? |
It's a private repo with Executor code, but Router is verified already
-> This is not true, as the function is used both both swap and swapGeneric functions. Example 1: User swaps from 10 ETH -> X, in both swap or swapGeneric flow:
Example 2: User swaps with swapGeneric function (which is unused now, but was used previously with whitelisted contracts), assume swapping 10 USDT -> ETH:
Example 3: User swaps with swap function, not from native token, it collects srcToken directly to Executor, so balance is unlikely to decrease. We don't use partial-fill, together with removing swapGeneric in the next update. |
@manhlx3006 : but swapgeneric was never ever configured to let calling a token directly… I’m seeing only third‑party exchanges. If it ever had allowed to call tokens directly, it would be a road to arbitrary |
Yes, it intends to config and swap with other exchanges, whitelisted only.
=> So we calculate In most cases, So the conditions are simple:
|
@manhlx3006 : except the balance of the router can only decrease in The only thing that can happen and which is treated like this, for dsttoken is that the whitelisted exchange or arbitrary calle returns some erc20 srctokens : a balance increase. |
The |
It's not correct, please check: _transferFromOrApproveTarget |
@manhlx3006 : you disabled the remaining of the whitelist this morning… Would it be possible to temporarily re‑enable them again? |
Not possible for now, since we don't use it anymore (from UI or API) we just initiated an operation to disable all whiteslited routers that we have enabled previously. |
@manhlx3006 : Ok, I was just investigating for potential vulnerabilities… As far I understand, you currently don’t pay anything found isn’t it? |
You can send any findings to my email at [email protected], potential bounty could be given for a valid unknown finding, depends on the severity and impact. If it is ok, will close this issue, you can also reach out to me at telegram: @manhlx3006 for further discussion |
@manhlx3006 : you just fixed what I previously found by closing the remainning of the whitelist (unless you forgot a chain). My investigation of |
@manhlx3006 : otherwise, e‑mail and Telegram sent : did you received them? |
Where to report bugs in the
MetaAggregationRouterV2
? I’m not seeingMetaAggregationRouterV2.sol
anywhere on GitHub…https://arbiscan.io/address/0x6131b5fae19ea4f9d964eac0408e4408b66337b5#code#F1#L477 seems to be a typo to me (the substraction is in the reverse order)…
The text was updated successfully, but these errors were encountered: