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: Sobal DEX Volume & Fees #653

Merged
merged 5 commits into from
Jul 30, 2023
Merged

Add: Sobal DEX Volume & Fees #653

merged 5 commits into from
Jul 30, 2023

Conversation

joehquak
Copy link
Contributor

@joehquak joehquak commented Jul 23, 2023

Opening this draft as having issues with testing

Will update shortly

@llamatester
Copy link

The sobal adapter exports:


Dexs for 22/7/2023
_______________________________________

Version -> V2
---------
Done in 4.63s.

@llamatester
Copy link

The sobal.ts adapter exports:


Fees for 22/7/2023
_______________________________________

Version -> V2
---------
NEON 👇
Backfill start time: 17/7/2023
Timestamp: 1690070399
Total user fees: 0
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Daily user fees: 0
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Total fees: 0
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Daily fees: 0
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Total revenue: 0
└─ Methodology: Protocol revenue from all fees collected
Daily revenue: 0
└─ Methodology: Protocol revenue from all fees collected
Total protocol revenue: 0
└─ Methodology: Currently no protocol swap fee in place
Daily protocol revenue: 0
└─ Methodology: Currently no protocol swap fee in place
Total supply side revenue: 0
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.
Daily supply side revenue: 0
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.


Done in 4.56s.

@joehquak
Copy link
Contributor Author

joehquak commented Jul 23, 2023

@0xngmi could it be that the chain is unsupported? Would this prevent me pulling in DEX Volume data due to the function being unable to pick up the block number for the timestamp listed?

The subgraph itself is probably empty of volume amounts due to token pricing issues but I assume we should still see a summary?

@dtmkeng
Copy link
Contributor

dtmkeng commented Jul 23, 2023

@0xngmi could it be that the chain is unsupported? Would this prevent me pulling in DEX Volume data due to the function being unable to pick up the block number for the timestamp listed?

The subgraph itself is probably empty of volume amounts due to token pricing issues but I assume we should still see a summary?

probably volume it not change then prev-now it eq 0

@dtmkeng
Copy link
Contributor

dtmkeng commented Jul 23, 2023

seem the graph have five record, 0 all record

 { id: '2-19557', totalSwapFee: '0' },
    { id: '2-19558', totalSwapFee: '0' },
    { id: '2-19559', totalSwapFee: '0' },
    { id: '2-19560', totalSwapFee: '0' },
    { id: '2-19561', totalSwapFee: '0' }

@joehquak
Copy link
Contributor Author

seem the graph have five record, 0 all record

 { id: '2-19557', totalSwapFee: '0' },
    { id: '2-19558', totalSwapFee: '0' },
    { id: '2-19559', totalSwapFee: '0' },
    { id: '2-19560', totalSwapFee: '0' },
    { id: '2-19561', totalSwapFee: '0' }

Thanks for your reply and for checking @dtmkeng

I expected the fee data to be 0 as we have an issue with USD prices of token on the subtraph at the moment

The actual problem I have is with the Volume task which doesn’t load any data at all when testing (dexs/sobal/index.ts)

Would it be possible to check if for me?

Thanks!

@dtmkeng
Copy link
Contributor

dtmkeng commented Jul 23, 2023

yeah it like fees data is zero

@llamatester
Copy link

The sobal adapter exports:


Dexs for 27/7/2023
_______________________________________

Version -> V2
---------
NEON 👇
Backfill start time: 19/7/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1690502399
Block: 24968
Total volume: 0
Daily volume: 0


Done in 7.59s.

@llamatester
Copy link

The sobal.ts adapter exports:


Fees for 27/7/2023
_______________________________________

Version -> V2
---------
NEON 👇
Backfill start time: 17/7/2023
Timestamp: 1690502399
Total user fees: 15.77390878918373534338464149889029
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Daily user fees: 2.2897000915417259606278830838692
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Total fees: 15.77390878918373534338464149889029
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Daily fees: 2.2897000915417259606278830838692
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Total revenue: 15.77390878918373534338464149889029
└─ Methodology: Protocol revenue from all fees collected
Daily revenue: 2.2897000915417259606278830838692
└─ Methodology: Protocol revenue from all fees collected
Total protocol revenue: 15.77390878918373534338464149889029
└─ Methodology: Currently no protocol swap fee in place
Daily protocol revenue: 2.2897000915417259606278830838692
└─ Methodology: Currently no protocol swap fee in place
Total supply side revenue: 0
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.
Daily supply side revenue: 0
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.


Done in 4.88s.

@llamatester
Copy link

The sobal adapter exports:


Dexs for 27/7/2023
_______________________________________

Version -> V2
---------
NEON 👇
Backfill start time: 19/7/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1690502399
Block: 24968
Total volume: 0
Daily volume: 0


Done in 6.54s.

@llamatester
Copy link

The sobal.ts adapter exports:


Fees for 27/7/2023
_______________________________________

Version -> V2
---------
NEON 👇
Backfill start time: 17/7/2023
Timestamp: 1690502399
Total user fees: 15.77390878918373534338464149889029
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Daily user fees: 2.2897000915417259606278830838692
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Total fees: 15.77390878918373534338464149889029
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Daily fees: 2.2897000915417259606278830838692
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Total revenue: 7.886954394591867671692320749445145
└─ Methodology: Protocol revenue from all fees collected
Daily revenue: 1.1448500457708629803139415419346
└─ Methodology: Protocol revenue from all fees collected
Total protocol revenue: 7.886954394591867671692320749445145
└─ Methodology: Currently no protocol swap fee in place
Daily protocol revenue: 1.1448500457708629803139415419346
└─ Methodology: Currently no protocol swap fee in place
Total supply side revenue: 7.886954394591867671692320749445145
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.
Daily supply side revenue: 1.1448500457708629803139415419346
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.


Done in 4.22s.

@joehquak
Copy link
Contributor Author

@dtmkeng It's working now but the defillama block lookup URL seems to be passing back the incorrect block number

https://coins.llama.fi/block/neon/1690502399

@llamatester
Copy link

The sobal adapter exports:


Dexs for 27/7/2023
_______________________________________

Version -> V2
---------
NEON_EVM 👇
Backfill start time: 19/7/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1690502399
Block: 207909905
Total volume: 5257.969596394579
Daily volume: 763.2333638472419


Done in 7.22s.

@llamatester
Copy link

The sobal.ts adapter exports:


Fees for 27/7/2023
_______________________________________

Version -> V2
---------
NEON_EVM 👇
Backfill start time: 17/7/2023
Timestamp: 1690502399
Total user fees: 15.77390878918373534338464149889029
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Daily user fees: 2.2897000915417259606278830838692
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Total fees: 15.77390878918373534338464149889029
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Daily fees: 2.2897000915417259606278830838692
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Total revenue: 7.886954394591867671692320749445145
└─ Methodology: Protocol revenue from all fees collected
Daily revenue: 1.1448500457708629803139415419346
└─ Methodology: Protocol revenue from all fees collected
Total protocol revenue: 7.886954394591867671692320749445145
└─ Methodology: Currently no protocol swap fee in place
Daily protocol revenue: 1.1448500457708629803139415419346
└─ Methodology: Currently no protocol swap fee in place
Total supply side revenue: 7.886954394591867671692320749445145
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.
Daily supply side revenue: 1.1448500457708629803139415419346
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.


Done in 4.86s.

@joehquak
Copy link
Contributor Author

@dtmkeng It's working now but the defillama block lookup URL seems to be passing back the incorrect block number

https://coins.llama.fi/block/neon/1690502399

Ignore this, I worked out the network should be neon_evm.

All sorted and ready for testing & merge!

@joehquak joehquak marked this pull request as ready for review July 28, 2023 16:53
@dtmkeng
Copy link
Contributor

dtmkeng commented Jul 29, 2023

ok could you remove change from package.json and lock?

@joehquak joehquak changed the title [WIP] Add: Sobal DEX Volume & Fees Add: Sobal DEX Volume & Fees Jul 29, 2023
@llamatester
Copy link

The sobal adapter exports:


Dexs for 28/7/2023
_______________________________________

Version -> V2
---------
NEON_EVM 👇
Backfill start time: 19/7/2023
NO METHODOLOGY SPECIFIED
Timestamp: 1690588799
Block: 208107344
Total volume: 7621.967492642583
Daily volume: 2363.9978962480045


Done in 6.96s.

@joehquak
Copy link
Contributor Author

ok could you remove change from package.json and lock?

Done! Thank you for catching that 🙏

@llamatester
Copy link

The sobal.ts adapter exports:


Fees for 28/7/2023
_______________________________________

Version -> V2
---------
NEON_EVM 👇
Backfill start time: 17/7/2023
Timestamp: 1690588799
Total user fees: 22.86590247792774920887314232783105
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Daily user fees: 7.09199368874401386548850082894076
└─ Methodology: Trading fees paid by users, ranging from 0.0001% to 10%
Total fees: 22.86590247792774920887314232783105
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Daily fees: 7.09199368874401386548850082894076
└─ Methodology: All trading fees collected (doesn't include withdrawal and flash loan fees)
Total revenue: 11.432951238963874604436571163915525
└─ Methodology: Protocol revenue from all fees collected
Daily revenue: 3.54599684437200693274425041447038
└─ Methodology: Protocol revenue from all fees collected
Total protocol revenue: 11.432951238963874604436571163915525
└─ Methodology: Currently no protocol swap fee in place
Daily protocol revenue: 3.54599684437200693274425041447038
└─ Methodology: Currently no protocol swap fee in place
Total supply side revenue: 11.432951238963874604436571163915525
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.
Daily supply side revenue: 3.54599684437200693274425041447038
└─ Methodology: A small percentage of the trade paid by traders to pool LPs, set by the pool creator or managed by protocol.


Done in 3.58s.

@dtmkeng dtmkeng merged commit e0ced26 into DefiLlama:master Jul 30, 2023
2 checks passed
@joehquak joehquak deleted the add/sobal branch July 30, 2023 13:03
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