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

create y2k-finance fees adapter #288

Merged
merged 7 commits into from
Jun 30, 2023
Merged

create y2k-finance fees adapter #288

merged 7 commits into from
Jun 30, 2023

Conversation

dtmkeng
Copy link
Contributor

@dtmkeng dtmkeng commented Mar 7, 2023

No description provided.

@llamatester
Copy link

The y2k-finance.ts adapter exports:


Fees for 6/3/2023
_______________________________________

ARBITRUM 👇
Backfill start time: 3/2/2023
NO METHODOLOGY SPECIFIED
Daily fees: 3436.2157147044236
Daily revenue: 3436.2157147044236
Timestamp: 1678147198




Done in 125.02s.

@crystalshay2es
Copy link

crystalshay2es commented Mar 7, 2023

The y2k-finance.ts adapter exports:


Fees for 6/3/2023
_______________________________________

ARBITRUM 👇
Backfill start time: 2/2/2023
NO METHODOLOGY SPECIFIED
Daily fees: 3436.2157147044236
Daily revenue: 3436.2157147044236
Timestamp: 1678147198




Done in 125.02s.

@llamatester
Copy link

The y2k-finance.ts adapter exports:


Fees for 6/6/2023
_______________________________________

ARBITRUM 👇
Backfill start time: 3/2/2023
NO METHODOLOGY SPECIFIED
Daily fees: 0
Daily revenue: 0
Timestamp: 1686095998




Done in 5.68s.

@llamatester
Copy link

The y2k-finance.ts adapter exports:


Fees for 6/6/2023
_______________________________________

ARBITRUM 👇
Backfill start time: 3/2/2023
NO METHODOLOGY SPECIFIED
Daily fees: 45.95762064160703
Daily revenue: 45.95762064160703
Timestamp: 1686095998




Done in 6.50s.

@llamatester
Copy link

The y2k-finance-v2.ts adapter exports:


Fees for 29/6/2023
_______________________________________

Flipside query 
    SELECT contract_address, raw_amount from arbitrum.core.fact_token_transfers
    WHERE contract_address in ('0x912ce59144191c1204e64559fe8253a0e49e6548', '0x82af49447d8a07e3bd95bd0d56f35241523fbab1')
    and to_address = '0x5c84cf4d91dc0acde638363ec804792bb2108258'
    and tx_hash in ()
    and BLOCK_NUMBER > 105936833 AND BLOCK_NUMBER < 106275972
   failed {
  jsonrpc: '2.0',
  id: 1,
  result: {
    queryRun: {
      id: 'cljigtvjy0414mv0ttq9z208k',
      sqlStatementId: 'cljigtvgw0413mv0t0mm0y4eg',
      state: 'QUERY_STATE_FAILED',
      path: '2023/06/30/11/cljigtvjy0414mv0ttq9z208k',
      fileCount: null,
      lastFileNumber: null,
      fileNames: null,
      errorName: 'OperationFailedError',
      errorMessage: 'SQL compilation error:\n' +
        "syntax error line 5 at position 20 unexpected ')'.",
      errorData: [Object],
      dataSourceQueryId: null,
      dataSourceSessionId: '17257398702661198',
      startedAt: '2023-06-30T11:02:50.000Z',
      queryRunningEndedAt: null,
      queryStreamingEndedAt: null,
      endedAt: '2023-06-30T11:02:56.000Z',
      rowCount: null,
      totalSize: null,
      tags: [Object],
      dataSourceId: 'clf90gwee0002jvbu63diaa8u',
      userId: 'clgzw6qmo0408n50tqrlctg33',
      createdAt: '2023-06-30T11:02:49.000Z',
      updatedAt: '2023-06-30T11:02:49.000Z',
      archivedAt: null
    },
    redirectedToQueryRun: null
  }
}
Failed to get value on arbitrum: Error: Query 
    SELECT contract_address, raw_amount from arbitrum.core.fact_token_transfers
    WHERE contract_address in ('0x912ce59144191c1204e64559fe8253a0e49e6548', '0x82af49447d8a07e3bd95bd0d56f35241523fbab1')
    and to_address = '0x5c84cf4d91dc0acde638363ec804792bb2108258'
    and tx_hash in ()
    and BLOCK_NUMBER > 105936833 AND BLOCK_NUMBER < 106275972
   failed, error {"jsonrpc":"2.0","id":1,"result":{"queryRun":{"id":"cljigtvjy0414mv0ttq9z208k","sqlStatementId":"cljigtvgw0413mv0t0mm0y4eg","state":"QUERY_STATE_FAILED","path":"2023/06/30/11/cljigtvjy0414mv0ttq9z208k","fileCount":null,"lastFileNumber":null,"fileNames":null,"errorName":"OperationFailedError","errorMessage":"SQL compilation error:\nsyntax error line 5 at position 20 unexpected ')'.","errorData":{"code":"001003","data":{"age":0,"pos":-1,"line":-1,"type":"COMPILATION","queryId":"01ad4fd6-0403-8561-3d4f-830135543bb3","sqlState":"42000","errorCode":"001003","internalError":false},"name":"OperationFailedError","message":"SQL compilation error:\nsyntax error line 5 at position 20 unexpected ')'.","sqlState":"42000"},"dataSourceQueryId":null,"dataSourceSessionId":"17257398702661198","startedAt":"2023-06-30T11:02:50.000Z","queryRunningEndedAt":null,"queryStreamingEndedAt":null,"endedAt":"2023-06-30T11:02:56.000Z","rowCount":null,"totalSize":null,"tags":{"source":"api"},"dataSourceId":"clf90gwee0002jvbu63diaa8u","userId":"clgzw6qmo0408n50tqrlctg33","createdAt":"2023-06-30T11:02:49.000Z","updatedAt":"2023-06-30T11:02:49.000Z","archivedAt":null},"redirectedToQueryRun":null}}
ARBITRUM 👇
Timestamp attempted: 28/6/2023
Error: Query 
    SELECT contract_address, raw_amount from arbitrum.core.fact_token_transfers
    WHERE contract_address in ('0x912ce59144191c1204e64559fe8253a0e49e6548', '0x82af49447d8a07e3bd95bd0d56f35241523fbab1')
    and to_address = '0x5c84cf4d91dc0acde638363ec804792bb2108258'
    and tx_hash in ()
    and BLOCK_NUMBER > 105936833 AND BLOCK_NUMBER < 106275972
   failed, error {"jsonrpc":"2.0","id":1,"result":{"queryRun":{"id":"cljigtvjy0414mv0ttq9z208k","sqlStatementId":"cljigtvgw0413mv0t0mm0y4eg","state":"QUERY_STATE_FAILED","path":"2023/06/30/11/cljigtvjy0414mv0ttq9z208k","fileCount":null,"lastFileNumber":null,"fileNames":null,"errorName":"OperationFailedError","errorMessage":"SQL compilation error:\nsyntax error line 5 at position 20 unexpected ')'.","errorData":{"code":"001003","data":{"age":0,"pos":-1,"line":-1,"type":"COMPILATION","queryId":"01ad4fd6-0403-8561-3d4f-830135543bb3","sqlState":"42000","errorCode":"001003","internalError":false},"name":"OperationFailedError","message":"SQL compilation error:\nsyntax error line 5 at position 20 unexpected ')'.","sqlState":"42000"},"dataSourceQueryId":null,"dataSourceSessionId":"17257398702661198","startedAt":"2023-06-30T11:02:50.000Z","queryRunningEndedAt":null,"queryStreamingEndedAt":null,"endedAt":"2023-06-30T11:02:56.000Z","rowCount":null,"totalSize":null,"tags":{"source":"api"},"dataSourceId":"clf90gwee0002jvbu63diaa8u","userId":"clgzw6qmo0408n50tqrlctg33","createdAt":"2023-06-30T11:02:49.000Z","updatedAt":"2023-06-30T11:02:49.000Z","archivedAt":null},"redirectedToQueryRun":null}}
    at retries (/home/runner/work/dimension-adapters/dimension-adapters/helpers/flipsidecrypto.ts:113:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async queryFlipside (/home/runner/work/dimension-adapters/dimension-adapters/helpers/flipsidecrypto.ts:10:10)
    at async fetch (/home/runner/work/dimension-adapters/dimension-adapters/fees/y2k-finance-v2.ts:43:34)
    at async /home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:32:52
    at async Promise.allSettled (index 0)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:52:23




Done in 20.29s.

@llamatester
Copy link

The y2k-finance.ts adapter exports:


Fees for 29/6/2023
_______________________________________

ARBITRUM 👇
Backfill start time: 3/2/2023
Daily fees: 513.1598568314258
└─ Methodology: 5% of Hedge Vault deposits, 5% of Risk Vault deposits upon a depeg event and withdraw fees
Daily revenue: 513.1598568314258
└─ Methodology: 5% of Hedge Vault deposits, 5% of Risk Vault deposits upon a depeg event and withdraw fees
Timestamp: 1688083198




Done in 33.70s.

@dtmkeng dtmkeng merged commit f11d0dd into master Jun 30, 2023
2 checks passed
@dtmkeng dtmkeng deleted the y2k-finance-fees branch June 30, 2023 11:04
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.

3 participants