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

Fix polynomial apy #1601

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix polynomial apy #1601

wants to merge 3 commits into from

Conversation

ArpitShukIa
Copy link

No description provided.

@llamatester
Copy link

Error while running polynomial-liquidity adapter:

Test Suites: 1 failed, 1 total
Tests: 4 failed, 20 passed, 24 total
Snapshots: 0 total
Time: 0.315 s
Ran all test suites.

Nb of pools: 4
 

Sample pools:
┌─────────┬────────────┬──────────────┬────────────────────────┬──────────┬────────────────────┬────────────────────┬────────────────────┬───────────────────────────────────────────────────┐
│ (index) │    pool    │    chain     │        project         │  symbol  │       tvlUsd       │      apyBase       │     apyReward      │                        url                        │
├─────────┼────────────┼──────────────┼────────────────────────┼──────────┼────────────────────┼────────────────────┼────────────────────┼───────────────────────────────────────────────────┤
│    0    │ '1-fxUSDC' │ 'polynomial' │ 'polynomial-liquidity' │  'USDC'  │   2511706.313047   │ 5.990473658662059  │ 26.710153696603438 │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    1    │ '1-sUSDe'  │ 'polynomial' │ 'polynomial-liquidity' │ 'sUSDe'  │ 213109.57215169567 │ 1.8991774523228435 │ 26.710153696603438 │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    2    │ '1-usd0++' │ 'polynomial' │ 'polynomial-liquidity' │ 'usd0++' │ 183349.85902731097 │ 8.181113527011163  │ 26.710153696603438 │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    3    │  '1-sDAI'  │ 'polynomial' │ 'polynomial-liquidity' │  'sDAI'  │ 67208.50546959642  │ 4.284468555897109  │ 26.710153696603438 │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
└─────────┴────────────┴──────────────┴────────────────────────┴──────────┴────────────────────┴────────────────────┴────────────────────┴───────────────────────────────────────────────────┘
}

@slasher125
Copy link
Collaborator

slasher125 commented Nov 13, 2024

@ArpitShukIa u need to add the rewardTokens array, see local test output

what is apyReward based on?

@llamatester
Copy link

The polynomial-liquidity adapter exports pools:

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

Nb of pools: 4
 

Sample pools:
┌─────────┬────────────┬──────────────┬────────────────────────┬──────────┬────────────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬───────────────────────────────────────────────────┐
│ (index) │    pool    │    chain     │        project         │  symbol  │       tvlUsd       │      apyBase       │     apyReward      │                   rewardTokens                   │                        url                        │
├─────────┼────────────┼──────────────┼────────────────────────┼──────────┼────────────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼───────────────────────────────────────────────────┤
│    0    │ '1-fxUSDC' │ 'polynomial' │ 'polynomial-liquidity' │  'USDC'  │   2511456.061884   │ 5.990473658662059  │ 27.047826502457756 │ [ '0x4200000000000000000000000000000000000042' ] │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    1    │ '1-sUSDe'  │ 'polynomial' │ 'polynomial-liquidity' │ 'sUSDe'  │ 213159.23483645997 │ 1.8991774523228435 │ 27.047826502457756 │ [ '0x4200000000000000000000000000000000000042' ] │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    2    │ '1-usd0++' │ 'polynomial' │ 'polynomial-liquidity' │ 'usd0++' │ 183355.00299912467 │ 8.181113527011163  │ 27.047826502457756 │ [ '0x4200000000000000000000000000000000000042' ] │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
│    3    │  '1-sDAI'  │ 'polynomial' │ 'polynomial-liquidity' │  'sDAI'  │ 67268.79916651594  │ 4.284468555897109  │ 27.047826502457756 │ [ '0x4200000000000000000000000000000000000042' ] │ 'https://polynomial.fi/en/mainnet/earn/liquidity' │
└─────────┴────────────┴──────────────┴────────────────────────┴──────────┴────────────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴───────────────────────────────────────────────────┘

@ArpitShukIa
Copy link
Author

@slasher125
Added the reward tokens.
Can you review again?

@slasher125
Copy link
Collaborator

how is apyReward generated? can you give me an invite code

@ArpitShukIa
Copy link
Author

ArpitShukIa commented Nov 13, 2024

You can join using SR0BEX invite code
We are giving 10k OP every week to stakers in the ratio of their contribution in the platform tvl. The rewards apr comes from that.

@slasher125
Copy link
Collaborator

hm the code seems to be invalid
shouldn't the reward apy be different based on the individual pool tvl?

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