You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a possibly undesirable regression here, where on mount the recipient address is set by default to be same as the auto-selected address with the highest balance. This is expected.
Very interesting find @0xApotheosis. Unfortunately, this isn't a regression and is a current prod bug. Summarizing the findings below, but moving this to draft to tackle it as an underlying PR 🙏🏽
Current develop and prod, as well as this diff wrongly do cross-account as a default if you happened to have different highest asset accounts on the buy and sell side. The receive address isn't set to be the same as the send address, but rather, both automagically select highest receive address, which doesn't ensure synchronization.
Prod
Develop
This diff
The above screenshots are with the very default ETH-FOX trade route on mount, without inputting or changing anything. Highest balance on the sell-side is expected, but pretty sure that shouldn't automagically happen on the receive side as we don't want cross-account as a default, which could be the case, and is here.
The regression is that now that when the from account is changed, the recipient address does not update to match it, so the user ends up inadvertently quoting for, and potentially executing, a cross-account swap.
This unfortunately isn't happening on account change - account change will only change your account on a given side, but doesn't automagically synchronize accounts.
References and additional details
N/A
Acceptance Criteria
The base expected behavior here is the sell asset account should be the only one automagically set to be the highest balance account. The buy account should not do this as a default, and should initially synchronize to the same account as the sell account, to ensure no cross-account trade is happening as a default.
In other words, on mount, the active accounts are defined by the highest balance sell account, meaning the buy account will always be the same as the highest balance sell one on mount.
The second part (on account change) of the acceptation criteria would be a @shapeshift/product question, gm @reallybeard@twblack88. We have two options:
We can either initially set one to be the same as the other on account change (no matter whether it was the buy or sell account number which was changed), obviously with the option to then change it. This may get very very tricky to implement, as we would most likely end up in an infinite loop of e.g
account 1 highest on sell, meaning account 1 is both autoselected on the sell and buy side
I decide to change the buy account to be account 0, both become account 0, but I can still make the sell side account 1 if I wish to, to perform a cross-account trade
changing the sell side to account 1 would synchronize both to 1 again, so we would have to do some dodgy checks to see if the opposite account was just explicitly changed by the user, to let them change it again
Or, as a safer option that's realistic to implement, only synchronize accounts initially, but don't try to do any synchronization later on. In other words, as long as you start changing accounts, you explicitly expressed intent to manually choose your accounts, and we shouldn't try to hijack this and decide what you want as a user with some arbitrary heuristics.
There is probably some discussion that needs to be done on what constitutes a "by default" as well.
Is the default first mount of swapper only? What if I change pairs to same-chains pairs e.g ETH->FOX to CRV -> USDC, should that be considered a new default? What if I change pairs to be different chains one e.g DOGE -> ATOM ?
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered:
Overview
Spotted in #6072, pasted report below.
Very interesting find @0xApotheosis. Unfortunately, this isn't a regression and is a current prod bug. Summarizing the findings below, but moving this to draft to tackle it as an underlying PR 🙏🏽
Current develop and prod, as well as this diff wrongly do cross-account as a default if you happened to have different highest asset accounts on the buy and sell side. The receive address isn't set to be the same as the send address, but rather, both automagically select highest receive address, which doesn't ensure synchronization.
The above screenshots are with the very default ETH-FOX trade route on mount, without inputting or changing anything. Highest balance on the sell-side is expected, but pretty sure that shouldn't automagically happen on the receive side as we don't want cross-account as a default, which could be the case, and is here.
This unfortunately isn't happening on account change - account change will only change your account on a given side, but doesn't automagically synchronize accounts.
References and additional details
N/A
Acceptance Criteria
In other words, on mount, the active accounts are defined by the highest balance sell account, meaning the buy account will always be the same as the highest balance sell one on mount.
The second part (on account change) of the acceptation criteria would be a @shapeshift/product question, gm @reallybeard @twblack88. We have two options:
Is the default first mount of swapper only? What if I change pairs to same-chains pairs e.g ETH->FOX to CRV -> USDC, should that be considered a new default? What if I change pairs to be different chains one e.g DOGE -> ATOM ?
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered: