DefiLlama / yield-server

140 stars 779 forks source link

tvl and apy support for sceptre liquid sflr staking pool #1528

Closed hitchhooker closed 1 week ago

hitchhooker commented 2 weeks ago

this pr adds support for fetching tvl and apy data for sceptre liquid’s sflr staking pool on flare.

key points:

llamatester commented 2 weeks ago

The sceptre-liquid adapter exports pools:

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

Nb of pools: 1

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬──────────────────┬────────┬────────────────────┬───────────────────┬──────────────────────────────────────────────────┬─────────────────────┐
│ (index) │                     pool                     │  chain  │     project      │ symbol │       tvlUsd       │      apyBase      │                 underlyingTokens                 │      poolMeta       │
├─────────┼──────────────────────────────────────────────┼─────────┼──────────────────┼────────┼────────────────────┼───────────────────┼──────────────────────────────────────────────────┼─────────────────────┤
│    0    │ '0x12e605bc104e93b45e1ad99f9e555f659051c2bb' │ 'Flare' │ 'sceptre-liquid' │ 'sFLR' │ 13709999.645852847 │ 57.53714147322776 │ [ '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d' ] │ 'sFLR staking pool' │
└─────────┴──────────────────────────────────────────────┴─────────┴──────────────────┴────────┴────────────────────┴───────────────────┴──────────────────────────────────────────────────┴─────────────────────┘
slasher125 commented 2 weeks ago

hi, ty for adding. pls add poolMeta and set it to "14.5days unstaking cooldown"

llamatester commented 2 weeks ago

The sceptre-liquid adapter exports pools:

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

Nb of pools: 1

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬──────────────────┬────────┬────────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────┐
│ (index) │                     pool                     │  chain  │     project      │ symbol │       tvlUsd       │      apyBase      │                 underlyingTokens                 │            poolMeta            │
├─────────┼──────────────────────────────────────────────┼─────────┼──────────────────┼────────┼────────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────┤
│    0    │ '0x12e605bc104e93b45e1ad99f9e555f659051c2bb' │ 'Flare' │ 'sceptre-liquid' │ 'sFLR' │ 13681121.963579247 │ 57.53714147322776 │ [ '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d' ] │ 'Unstaking Cooldown: 14.5days' │
└─────────┴──────────────────────────────────────────────┴─────────┴──────────────────┴────────┴────────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────┘
slasher125 commented 2 weeks ago

@hitchhooker one other thing i overlooked, why is the api on ur ui lower (44.56)?

hitchhooker commented 1 week ago

oh boy, did not realize that i'm one of those midwits that end up calculating apy on apy. fixed algorithm for calculations to be correct in the API. 44.56 hardcoded value that product manager has come up with and we will deploy next week API to be used in productin frontends(pending codereview) as well. i will let you know here then.

hitchhooker commented 1 week ago

frontends fetch now apy data from the same api as in the PR https://app.sceptre.fi/flare/dashboard#stake https://flare.sceptre.fi/

llamatester commented 1 week ago

The sceptre-liquid adapter exports pools:

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

Nb of pools: 1

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬──────────────────┬────────┬────────────────────┬─────────────────┬──────────────────────────────────────────────────┬────────────────────────────────┐
│ (index) │                     pool                     │  chain  │     project      │ symbol │       tvlUsd       │     apyBase     │                 underlyingTokens                 │            poolMeta            │
├─────────┼──────────────────────────────────────────────┼─────────┼──────────────────┼────────┼────────────────────┼─────────────────┼──────────────────────────────────────────────────┼────────────────────────────────┤
│    0    │ '0x12e605bc104e93b45e1ad99f9e555f659051c2bb' │ 'Flare' │ 'sceptre-liquid' │ 'sFLR' │ 13999975.991036966 │ 47.426906855043 │ [ '0x1D80c49BbBCd1C0911346656B529DF9E5c2F783d' ] │ 'Unstaking Cooldown: 14.5days' │
└─────────┴──────────────────────────────────────────────┴─────────┴──────────────────┴────────┴────────────────────┴─────────────────┴──────────────────────────────────────────────────┴────────────────────────────────┘