-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add Secta adapter #29
Conversation
if (currentTick < tickLow) { | ||
amount0 = BigInt(Math.floor(Number(liquidity) * ((sqrtRatioB - sqrtRatioA) / (sqrtRatioA * sqrtRatioB)))); | ||
} else if (currentTick >= tickHigh) { | ||
amount1 = BigInt(Math.floor(Number(liquidity) * (sqrtRatioB - sqrtRatioA))); | ||
} else if (currentTick >= tickLow && currentTick < tickHigh) { | ||
amount0 = BigInt(Math.floor(Number(liquidity) * ((sqrtRatioB - sqrtPrice) / (sqrtPrice * sqrtRatioB)))); | ||
amount1 = BigInt(Math.floor(Number(liquidity) * (sqrtPrice - sqrtRatioA))); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi, we are looking to remove inactive liquidity.
can you edit this part to not calculate any position that are out of range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed first and second if statements.
Hi @lijac thanks for the PR. for linea points calculation, we are only considering LP positions that are active (in range). can you make changes to the codes ? you can also refer to sushi's PR : https://github.com/delta-hq/l2-lxp-liquidity-reward/pull/37/files |
@0xroll I'm late, thanks for review. I've updated code. How can I see if this is working in action? Is there a dashboard on your side? From performance perspective, I see sushi's code is much simpler than ours. Is it a big deal? |
Secta Finance
DEX uniswap-style v2 & v3