Skip to content
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

v1.0.0 deployed addresses #38

Merged
merged 3 commits into from
Aug 10, 2023
Merged

v1.0.0 deployed addresses #38

merged 3 commits into from
Aug 10, 2023

Conversation

fleupold
Copy link
Contributor

🎉

@fleupold fleupold requested review from anxolin and mfw78 August 10, 2023 09:43
mfw78
mfw78 previously approved these changes Aug 10, 2023
Copy link
Contributor

@mfw78 mfw78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, only a typo nit! 🛳️🛳️

README.md Outdated Show resolved Hide resolved
@mfw78 mfw78 merged commit ab3adda into main Aug 10, 2023
2 checks passed
@mfw78 mfw78 deleted the deployed_addresses branch August 10, 2023 10:30
@anxolin
Copy link
Contributor

anxolin commented Aug 10, 2023

I tried to test this and the WatchTower failed to index the order.

@fleupold / @mfw78 i'd love to debug this tomorrow with you, right now I have a strong suspicion the init param of TWAP points to the old ComposableCoW and not the new one. However, for some reason I tried to read the value with getStorageAt and I don't get anything (weird, tomorrow with fresh eyes i guess we will clear this thing)

Leaving the notes on my investigation.

Created a new order, in Goerli using the new contract 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 for the safe 0x8654d1136F2a760bA3E1C9e131Cb9Ad217921B52

The conditional order CTX is 0x4dfb4b2e42da20b6d59d6e63e0688a0110892f8f5a1d67bc9a1392b66df94ccf

Watchtower tried to index it:

[register:add] Adding conditional order 0x910d00a310f7Dc5B29FE73458F47f519be547D3d,0x000000000000000000000000000000000000000000000000000000189e043331,0x000000000000000000000000b4fbf271143f4fbf7b91a5ded31805e42b2208d600000000000000000000000091056d4a53e1faa1a84306d4deaec71085394bc80000000000000000000000008654d1136f2a760ba3e1c9e131cb9ad217921b52000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000da23abd5d14e2aec30000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000007080000000000000000000000000000000000000000000000000000000000000000506960793899dbd9225c61c44bd44927462151c82dec95315cf937f6b95ef21f to already existing contract 0x8654d1136F2a760b

However getTradeableOrderWithSignature failed!

I noticed it fails in the TWAP verification, basically because t0 is 0!! (it should be the block time)

This takes us to, the cabinet is returning 0!

Pasted Graphic

Confirmation in this Tenderly simulation: https://dashboard.tenderly.co/devcow/project/simulator/120bfe8b-4aeb-413a-ad20-dcff9f8554cf/debugger?trace=0.2.0

However, if i manually check the cabinet its value is correct!
Pasted Graphic 1

Whats the problem?

We check the value of the cabinet in the wrong place!

It checks in 0xf487887da5a4b4e3ec114fdad97dc0f785d72738 (which is the OLD ComposableCoW contract) and not in 0xfdaFc9d1902f4e0b84f65F49f244b32b31013b74 which is the new one.

Suspicion

TWAP checks the cabinet by using its hardcoded address to ComposableCoW

composableCow = _composableCow;

https://codesandbox.io/s/connect-metamask-forked-8fsjdv?file=/src/App.js

So I assume... it points to the old one?

Let me check the value!

I tried to check the value of the value of the TWAP contract, but of course is PRIVATE var so Etherscan won't let me.

I then tried to get it from the storage directly, but I get all zeros (🤔what am i missing??)
Attempt to read the storage: https://codesandbox.io/s/connect-metamask-forked-8fsjdv?file=/src/App.js

@anxolin
Copy link
Contributor

anxolin commented Aug 11, 2023

NVM! the issue was in the Web. It was using the new ComposableCow with the old TWAP contract 🙈
emarasing enough, i checked the PR and i thought all addresses were good, so then when i saw the code one matched the one seen by WatchTower, i though, OK twap is the right one but points to the old ComposableCoW!

It was the old TWAP old along.

Thx @mfw78 and @fleupold for the help

Proof
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants