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

[Gains Network] Include Trader Deposits #1007

Closed
wants to merge 1 commit into from

Conversation

0xCrumb
Copy link
Contributor

@0xCrumb 0xCrumb commented Sep 20, 2023

  • Adds DAI trader deposits (for open trades and limit orders)
  • Refactor data fetching to use utils

@llamatester
Copy link

The gains-network adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 0.489 s
Ran all test suites.

Nb of pools: 6
 

Sample pools:
┌─────────┬────────────┬─────────────────┬──────────────────────────────────────────────┬────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬───────────────────┐
│ (index) │   chain    │     project     │                     pool                     │ symbol │       tvlUsd       │      apyBase       │                 underlyingTokens                 │     poolMeta      │
├─────────┼────────────┼─────────────────┼──────────────────────────────────────────────┼────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼───────────────────┤
│    0    │ 'arbitrum' │ 'gains-network' │ '0x6B8D3C08072a020aC065c467ce922e3A36D3F9d6' │ 'GNS'  │ 54171293.35111909  │ 3.0695982974696223 │ [ '0x18c11FD286C5EC11c3b683Caa813B77f5163A122' ] │                   │
│    1    │ 'arbitrum' │ 'gains-network' │ '0xd85E038593d7A098614721EaE955EC2022B9B91B' │ 'DAI'  │ 22327746.70447182  │ 4.499733780429183  │ [ '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' ] │                   │
│    2    │ 'polygon'  │ 'gains-network' │ '0xFb06a737f549Eb2512Eb6082A808fc7F16C0819D' │ 'GNS'  │ 13015168.619295483 │ 4.659019010685395  │ [ '0xE5417Af564e4bFDA1c483642db72007871397896' ] │                   │
│    3    │ 'polygon'  │ 'gains-network' │ '0x91993f2101cc758D0dEB7279d41e880F7dEFe827' │ 'DAI'  │ 7389328.219938579  │ 4.3898491778298965 │ [ '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' ] │                   │
│    4    │ 'arbitrum' │ 'gains-network' │ '0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c' │ 'DAI'  │ 727796.9811705466  │         0          │ [ '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' ] │ 'Trader Deposits' │
│    5    │ 'polygon'  │ 'gains-network' │ '0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD' │ 'DAI'  │ 402381.82718761277 │         0          │ [ '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' ] │ 'Trader Deposits' │
└─────────┴────────────┴─────────────────┴──────────────────────────────────────────────┴────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴───────────────────┘

@llamatester
Copy link

The gains-network adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 40 passed, 40 total
Snapshots: 0 total
Time: 0.338 s
Ran all test suites.

Nb of pools: 6
 

Sample pools:
┌─────────┬────────────┬─────────────────┬──────────────────────────────────────────────┬────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬───────────────────┐
│ (index) │   chain    │     project     │                     pool                     │ symbol │       tvlUsd       │      apyBase       │                 underlyingTokens                 │     poolMeta      │
├─────────┼────────────┼─────────────────┼──────────────────────────────────────────────┼────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼───────────────────┤
│    0    │ 'arbitrum' │ 'gains-network' │ '0x6B8D3C08072a020aC065c467ce922e3A36D3F9d6' │ 'GNS'  │ 53585998.04754729  │ 2.3136567638864625 │ [ '0x18c11FD286C5EC11c3b683Caa813B77f5163A122' ] │                   │
│    1    │ 'arbitrum' │ 'gains-network' │ '0xd85E038593d7A098614721EaE955EC2022B9B91B' │ 'DAI'  │ 21830734.95102426  │ 3.7127025312891027 │ [ '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' ] │                   │
│    2    │ 'polygon'  │ 'gains-network' │ '0xFb06a737f549Eb2512Eb6082A808fc7F16C0819D' │ 'GNS'  │ 12922765.665746285 │ 3.561607684051471  │ [ '0xE5417Af564e4bFDA1c483642db72007871397896' ] │                   │
│    3    │ 'polygon'  │ 'gains-network' │ '0x91993f2101cc758D0dEB7279d41e880F7dEFe827' │ 'DAI'  │ 7307427.399958796  │ 3.5982157770464207 │ [ '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' ] │                   │
│    4    │ 'arbitrum' │ 'gains-network' │ '0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c' │ 'DAI'  │ 939180.2535584552  │         0          │ [ '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' ] │ 'Trader Deposits' │
│    5    │ 'polygon'  │ 'gains-network' │ '0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD' │ 'DAI'  │  447951.416238111  │         0          │ [ '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' ] │ 'Trader Deposits' │
└─────────┴────────────┴─────────────────┴──────────────────────────────────────────────┴────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴───────────────────┘

@slasher125
Copy link
Collaborator

hey, sry for late reply:
what is 'Trader Deposits', also, apyBase = 0?

@0xCrumb
Copy link
Contributor Author

0xCrumb commented Sep 27, 2023

hey, sry for late reply: what is 'Trader Deposits', also, apyBase = 0?

Hey! Mb, I had wrongly assumed this repo was for TVL so wanted to add user deposits so feel free to close. "Trader Deposits" refers to the collateral traders use (deposit/transfer to trading contract) when opening market/limit orders

@slasher125
Copy link
Collaborator

slasher125 commented Sep 27, 2023

got it, ty

@slasher125 slasher125 closed this Sep 27, 2023
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