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
feat: primary pool downscale and upscale new logic #3
base: master
Are you sure you want to change the base?
Conversation
Hey @Mohzcrea8me , To run a specific test file in SOR, the test command is mentioned at the top of the specific file. |
@Mohzcrea8me |
okay, thanks testing it out now |
i will checkout the test cases and handle it, i changed the allBalanceScaled to bigint i think that's where it's coming from |
This worked thanks, can you review my PR @kallolborah @Parasgr7 |
@Mohzcrea8me from where have you taken this data added in file There is no scaling(decimal fixed with 18 or 6 digits) in balances present on the subgraph. I would like you to revisit your test cases and the [upscaling/downscaling]changes you have made in primary pool, I don't think those are correct. |
The data is from polygon subgraph I'm using for paraswap, exact tokens and balances for primaryissuepool. I don't understand what you meant by no decimal scaling on subgraph, I was using sor as reference while working on paraswap I have access to primary pool contract as well and I noticed the calculations are the same but the scaling and downscaling method differs. I will attach screenshots to further explain what I'm talking about |
I went through your code @Mohzcrea8me , few things l would like you to change
|
@Parasgr7
@Mohzcrea8me
|
Oh okay thanks, which of the _tokenInForExactTokenOut is incorrect? When currency is in or security is in?
I don't understand what define variable for address[currency/security] means Okay I will format the code and remove all unnecessary comments, the problem I have is that our calculations are the same but when I test yours and mine with same balances and amounts I get different answers I just want to be sure if I'm right before moving on @Parasgr7 |
Hi, i worked on paraswap integration with verified, and SOR repo was given to me as part of the resources to use along side with primary and secondary pool contracts by @kallolborah . SOR code was helpful in helping me understand how the pool works but i noticed slight difference in upscale and downscale logic used for primarypools i tried calculating manually it does not match up too.
I'm creating this PR so the developer can review the new logic i added to primary pool, i think it's in accordance with the primaryIssuepool contract. I may be wrong would love a feedback from the developer.
Note: i'm unable to run tests i tried the method from readme it exited with errors.The developer/reviewer should let me know how to run tests. Thanks