delta-hq / l2-lxp-liquidity-reward

5 stars 85 forks source link

Interport - Issues #236

Closed 0xroll closed 4 months ago

0xroll commented 4 months ago

hi @astroKo

can you check , there shouldnt be any negative values

the amount should be the user's balance (aggregated)

astroKo commented 4 months ago

Hi @0xroll Could you share block number where user has negative balance, because I can't reproduce.

0xroll commented 4 months ago

oh it was the previous version.

now we have another issue, please look at the logs here.

(/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d3bff"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d40ad"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at Object.request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/rpc/http.js:45:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at fn (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:43:41)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:47:51)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at delay.count.count (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/buildRequest.js:24:30)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at attemptRetry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:15:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at retry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d40ad"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d455d"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at Object.request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/rpc/http.js:45:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at fn (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:43:41)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:47:51)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at delay.count.count (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/buildRequest.js:24:30)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at attemptRetry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:15:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at retry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d455d"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d4a0d"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2
astroKo commented 4 months ago

oh it was the previous version.

now we have another issue, please look at the logs here.

(/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d3bff"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d40ad"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at Object.request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/rpc/http.js:45:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at fn (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:43:41)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:47:51)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at delay.count.count (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/buildRequest.js:24:30)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at attemptRetry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:15:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at retry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d40ad"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d455d"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at Object.request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/rpc/http.js:45:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at fn (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:43:41)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at request (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/clients/transports/http.js:47:51)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at delay.count.count (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/buildRequest.js:24:30)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at attemptRetry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:15:36)
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     at retry (/project/tvl_adapters/adapters/interport/node_modules/viem/_cjs/utils/promise/withRetry.js:12:17) {
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   details: 'The request timed out.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   docsPath: undefined,
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   metaMessages: [
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'URL: https://linea.decubate.com',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]     'Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d455d"}]}'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   ],
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   shortMessage: 'The request took too long to respond.',
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283]   version: 'viem@2.16.2'
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] }
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] An error occurred for block [object Object]: TimeoutError: The request took too long to respond.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] URL: https://linea.decubate.com
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Request body: {"method":"eth_getLogs","params":[{"address":"0xEc8DDCb498b44C35EFaD7e5e43E0Caf6D16A66E8","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"],"fromBlock":"0x2e68bb","toBlock":"0x4d4a0d"}]}
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Details: The request timed out.
[2024-06-26, 16:48:18 UTC] {{ecs.py:225}} INFO - [2024-06-26 16:48:13,283] Version: viem@2.16.2

This issue appears to be related to the RPC, as I'm currently using a public one. I've noticed that most projects don't specify this. Could you try using your own RPC for this adapter? If that's not an option, I will work on optimizing the request. Thanks!

0xroll commented 4 months ago

@astroKo changed the rpc.

can you fix this. it should be underlying token address and balance amount

 Data is returned for underlying tokens only. Not for special tokens (lp/veTokens etc)
astroKo commented 4 months ago

@astroKo changed the rpc.

can you fix this. it should be underlying token address and balance amount

 Data is returned for underlying tokens only. Not for special tokens (lp/veTokens etc)

In our implementation, USDC and USDT are deposited into vaults used for cross-chain and bridge functionality. The iUSDC and iUSDT LP tokens are then deposited into the Stablecoin Farm.

The USDT/USDC balance may differ from the iUSDC/iUSDT balance because USDT/USDC migrate into or out of the chain during cross-chain swaps. However, the iUSDC/iUSDT balance remains the same, allowing us to accurately track the liquidity provided by each user.

This is the most convenient way to track provided liquidity. We also use this solution for both the zkLink and Blast points systems.

0xroll commented 4 months ago

@astroKo changed the rpc. can you fix this. it should be underlying token address and balance amount

 Data is returned for underlying tokens only. Not for special tokens (lp/veTokens etc)

In our implementation, USDC and USDT are deposited into vaults used for cross-chain and bridge functionality. The iUSDC and iUSDT LP tokens are then deposited into the Stablecoin Farm.

The USDT/USDC balance may differ from the iUSDC/iUSDT balance because USDT/USDC migrate into or out of the chain during cross-chain swaps. However, the iUSDC/iUSDT balance remains the same, allowing us to accurately track the liquidity provided by each user.

This is the most convenient way to track provided liquidity. We also use this solution for both the zkLink and Blast points systems.

isnt there a way to get the underlying balance? it should just be supplied amount * exchange rate

astroKo commented 4 months ago

@astroKo changed the rpc. can you fix this. it should be underlying token address and balance amount

 Data is returned for underlying tokens only. Not for special tokens (lp/veTokens etc)

In our implementation, USDC and USDT are deposited into vaults used for cross-chain and bridge functionality. The iUSDC and iUSDT LP tokens are then deposited into the Stablecoin Farm. The USDT/USDC balance may differ from the iUSDC/iUSDT balance because USDT/USDC migrate into or out of the chain during cross-chain swaps. However, the iUSDC/iUSDT balance remains the same, allowing us to accurately track the liquidity provided by each user. This is the most convenient way to track provided liquidity. We also use this solution for both the zkLink and Blast points systems.

isnt there a way to get the underlying balance? it should just be supplied amount * exchange rate

iUSDT/iUSDC have a 1:1 rate with USDT/USDC. We will provide data in a CSV file showing the underlying token balance.

astroKo commented 4 months ago

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

astroKo commented 4 months ago

@0xroll Could you please confirm that adapter works properly and we can proceed?