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
Description of the Issue:
The current implementation performs price inversion twice within the cfg.Invert block, both of which happen after the ERC20 price scaling. The first inversion happens here:
Hello @zrbecker , sorry for leaving a comment here without respecting the team rules. As a blockchain developer, I think my tech stack is fit for the team project. So I want to prove my skills by solving some team issues and join the team as a full-time developer. Could you give me a test task?
Description of the Issue:
The current implementation performs price inversion twice within the cfg.Invert block, both of which happen after the ERC20 price scaling. The first inversion happens here:
connect/providers/apis/defi/uniswapv3/math.go
Lines 44 to 47 in e197035
The second reversal occurs get provider price:
connect/pkg/math/oracle/utils.go
Lines 32 to 34 in e197035
This results in a double inversion of the price when cfg.Invert is set to true, which could lead to incorrect calculations.
Suggested Fix:
Remove the first inversion and only perform the scaling operation on the ERC20 price.
The text was updated successfully, but these errors were encountered: