delta-hq / l2-lxp-liquidity-reward

6 stars 84 forks source link

Gammastrategies - Issue #287

Closed 0xroll closed 1 month ago

0xroll commented 1 month ago

hi @l0c4t0r

getting some issues from the adapter

[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899] 2024-08-13 14:13:09,899 WARNING root An error occurred for block 5218390: TypeError: Cannot read properties of undefined (reading 'accounts')
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at getAccountData (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:64:45)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async Promise.all (index 3)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async getUserTVLByBlock (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:144:26)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async /project/tvl_adapters/adapters/gammastrategies/dist/index.js:215:28
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899] An error occurred for block 5219590: TypeError: Cannot read properties of undefined (reading 'accounts')
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at getAccountData (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:64:45)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async Promise.all (index 1)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async getUserTVLByBlock (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:144:26)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async /project/tvl_adapters/adapters/gammastrategies/dist/index.js:215:28
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899] An error occurred for block 5220790: TypeError: Cannot read properties of undefined (reading 'accounts')
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at getAccountData (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:64:45)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async Promise.all (index 1)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async getUserTVLByBlock (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:144:26)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async /project/tvl_adapters/adapters/gammastrategies/dist/index.js:215:28
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899] An error occurred for block 5221990: TypeError: Cannot read properties of undefined (reading 'accounts')
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at getAccountData (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:64:45)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async Promise.all (index 1)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async getUserTVLByBlock (/project/tvl_adapters/adapters/gammastrategies/dist/index.js:144:26)
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899]     at async /project/tvl_adapters/adapters/gammastrategies/dist/index.js:215:28
[2024-08-13, 14:13:12 UTC] {{ecs.py:225}} INFO - [2024-08-13 14:13:09,899] 2024-08-13 14:13:09,899 INFO root 
l0c4t0r commented 1 month ago

Checking

l0c4t0r commented 1 month ago

I'm not completely sure at the moment what the issue is. For example I added block 5219590 (timestamp: 1715107199) in hourly_blocks.csv and tested this with no issue found. This is one of the blocks where its showing an error in the logs you shared above.

0xroll commented 1 month ago

@l0c4t0r hey now it seems okay.

now another issue is that lynex seems to have indexed gamma positions as well, so there are some matching user positions from what i see. can we discuss this on TG on the next steps? (probably gamma to remove lynex strats to not double count)

my tg is @jh_onchain