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 Usualx #1689

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

Add Usualx #1689

wants to merge 2 commits into from

Conversation

dlgnbu
Copy link
Contributor

@dlgnbu dlgnbu commented Jan 15, 2025

@llamatester
Copy link

The usual adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬──────────────────────────────────────────────┬────────────┬─────────┬──────────┬────────────────────┬───────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                         │ chain      │ project │ symbol   │ tvlUsd             │ apyReward         │ rewardTokens                                     │ underlyingTokens                                 │ url                                                              │
├─────────┼──────────────────────────────────────────────┼────────────┼─────────┼──────────┼────────────────────┼───────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ 0       │ '0x35D8949372D46B7a3D5A56006AE77B215fc69bC0' │ 'Ethereum' │ 'usual' │ 'USD0++' │ 1328104153.8878584 │ 24.25521005218423 │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0x73A15FeD60Bf67631dC6cd7Bc5B6e8da8190aCF5' ] │                                                                  │
│ 1       │ '0x06B964d96f5dCF7Eae9d7C559B09EDCe244d4B8E' │ 'Ethereum' │ 'usual' │ 'USUALx' │ 115934267.10500598 │ 0                 │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ 'https://app.usual.money/swap?action=stake&from=USUAL&to=USUALx' │
│ 2       │ '0x2B65F9d2e4B84a2dF6ff0525741b75d1276a9C2F' │ 'Arbitrum' │ 'usual' │ 'USD0++' │ 113147.48331054255 │ 24.25521005218423 │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0x35f1C5cB7Fb977E669fD244C567Da99d8a3a6850' ] │                                                                  │
└─────────┴──────────────────────────────────────────────┴────────────┴─────────┴──────────┴────────────────────┴───────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────┘

@dlgnbu dlgnbu marked this pull request as ready for review January 15, 2025 10:43
@llamatester
Copy link

The usual adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬──────────────────────────────────────────────┬────────────┬─────────┬──────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                         │ chain      │ project │ symbol   │ tvlUsd             │ apyReward          │ rewardTokens                                     │ underlyingTokens                                 │ url                                                              │
├─────────┼──────────────────────────────────────────────┼────────────┼─────────┼──────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────┤
│ 0       │ '0x35D8949372D46B7a3D5A56006AE77B215fc69bC0' │ 'Ethereum' │ 'usual' │ 'USD0++' │ 1309490392.6096148 │ 23.52498462926178  │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0x73A15FeD60Bf67631dC6cd7Bc5B6e8da8190aCF5' ] │                                                                  │
│ 1       │ '0x06B964d96f5dCF7Eae9d7C559B09EDCe244d4B8E' │ 'Ethereum' │ 'usual' │ 'USUALx' │ 108454195.20587648 │ 181.70746852732123 │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ 'https://app.usual.money/swap?action=stake&from=USUAL&to=USUALx' │
│ 2       │ '0x2B65F9d2e4B84a2dF6ff0525741b75d1276a9C2F' │ 'Arbitrum' │ 'usual' │ 'USD0++' │ 112718.46353131952 │ 23.52498462926178  │ [ '0xC4441c2BE5d8fA8126822B9929CA0b81Ea0DE38E' ] │ [ '0x35f1C5cB7Fb977E669fD244C567Da99d8a3a6850' ] │                                                                  │
└─────────┴──────────────────────────────────────────────┴────────────┴─────────┴──────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────┘

const usualxSupply = await getTokenSupply('Ethereum', '0x06B964d96f5dCF7Eae9d7C559B09EDCe244d4B8E');
const usualxPrice = await getTokenPrice('Ethereum', '0x06B964d96f5dCF7Eae9d7C559B09EDCe244d4B8E');
const { data: usualxRewardData } = await axios.get('https://app.usual.money/api/rewards/rates/USUALx');
const usualxReward = usualxRewardData.rewards.find(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should fetch the rate from contract

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