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

add horizon adapter #45

Closed
wants to merge 2 commits into from
Closed

add horizon adapter #45

wants to merge 2 commits into from

Conversation

HorizonDex
Copy link
Contributor

No description provided.

Comment on lines +150 to +151
token_symbol: `${positionSnapshot.pool.token0.symbol}/${positionSnapshot.pool.token1.symbol} HZN NFT`,
token_balance: positionSnapshot.liquidity,
Copy link
Contributor

Choose a reason for hiding this comment

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

we are looking at the underlying token balance of the lp position

Comment on lines +135 to +137
} : findClosestTokenSnapshot(tokenPricingSnapshots.get(positionSnapshot.pool.token1.id), positionSnapshot.timestamp)
const token0Amount = parseFloat(positionSnapshot.depositedToken0) - parseFloat(positionSnapshot.withdrawnToken0);
const token1Amount = parseFloat(positionSnapshot.depositedToken1) - parseFloat(positionSnapshot.withdrawnToken1);
Copy link
Contributor

Choose a reason for hiding this comment

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

this wont be accurate, token balances are affected by swaps as well.

i see that you guys are CLMM dex, can you refer to sushi's code as reference?

we only want to track active positions (position that are in range)

https://github.com/delta-hq/l2-lxp-liquidity-reward/pull/37/files

@0xroll
Copy link
Contributor

0xroll commented May 7, 2024

@HorizonDex hi thanks for the pr, please check the comments.

also can you provide your github repo link too

@HorizonDex HorizonDex closed this by deleting the head repository May 30, 2024
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.

2 participants