Skip to content

Pinto Yield Adapter#1711

Merged
slasher125 merged 4 commits intoDefiLlama:masterfrom
PintoPirate:pinto
Feb 12, 2025
Merged

Pinto Yield Adapter#1711
slasher125 merged 4 commits intoDefiLlama:masterfrom
PintoPirate:pinto

Conversation

@PintoPirate
Copy link
Contributor

Adapter for getting current yields on whitelisted Pinto assets

@llamatester
Copy link

The pinto adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────┬────────┬─────────┬───────────────┬─────────┬─────────┬───────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────┐
│ (index) │ pool                                              │ chain  │ project │ symbol        │ tvlUsd  │ apyBase │ apyReward │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta     │
├─────────┼───────────────────────────────────────────────────┼────────┼─────────┼───────────────┼─────────┼─────────┼───────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────┤
│ 0       │ '0x3e11226fe3d85142b734abce6e58918d5828d1b4-base' │ 'Base' │ 'pinto' │ 'PINTO-cbBTC' │ 2513708 │ 0       │ 8.17      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf' ] │ 'Pinto Silo' │
│ 1       │ '0x3e1133ac082716ddc3114bbefeed8b1731ea9cb1-base' │ 'Base' │ 'pinto' │ 'PINTO-USDC'  │ 2396031 │ 0       │ 9.94      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' ] │ 'Pinto Silo' │
│ 2       │ '0x3e11444c7650234c748d743d8d374fce2ee5e6c9-base' │ 'Base' │ 'pinto' │ 'PINTO-WSOL'  │ 2112183 │ 0       │ 8.84      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x1c61629598e4a901136a81bc138e5828dc150d67' ] │ 'Pinto Silo' │
│ 3       │ '0x3e111115a82df6190e36adf0d552880663a4dbf1-base' │ 'Base' │ 'pinto' │ 'PINTO-cbETH' │ 1104201 │ 0       │ 9.96      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22' ] │ 'Pinto Silo' │
│ 4       │ '0x3e11001cfbb6de5737327c59e10afab47b82b5d3-base' │ 'Base' │ 'pinto' │ 'PINTO-WETH'  │ 1035439 │ 0       │ 7.99      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x4200000000000000000000000000000000000006' ] │ 'Pinto Silo' │
└─────────┴───────────────────────────────────────────────────┴────────┴─────────┴───────────────┴─────────┴─────────┴───────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┘

@slasher125
Copy link
Collaborator

gm,

  • can remove apyBase if its always 0

@PintoPirate
Copy link
Contributor Author

gm @slasher125 , I have just removed it

@llamatester
Copy link

The pinto adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────┬────────┬─────────┬───────────────┬─────────┬───────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────┐
│ (index) │ pool                                              │ chain  │ project │ symbol        │ tvlUsd  │ apyReward │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta     │
├─────────┼───────────────────────────────────────────────────┼────────┼─────────┼───────────────┼─────────┼───────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────┤
│ 0       │ '0x3e11226fe3d85142b734abce6e58918d5828d1b4-base' │ 'Base' │ 'pinto' │ 'PINTO-cbBTC' │ 2512088 │ 6.79      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf' ] │ 'Pinto Silo' │
│ 1       │ '0x3e1133ac082716ddc3114bbefeed8b1731ea9cb1-base' │ 'Base' │ 'pinto' │ 'PINTO-USDC'  │ 2405598 │ 8.24      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' ] │ 'Pinto Silo' │
│ 2       │ '0x3e11444c7650234c748d743d8d374fce2ee5e6c9-base' │ 'Base' │ 'pinto' │ 'PINTO-WSOL'  │ 2167269 │ 7.34      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x1c61629598e4a901136a81bc138e5828dc150d67' ] │ 'Pinto Silo' │
│ 3       │ '0x3e111115a82df6190e36adf0d552880663a4dbf1-base' │ 'Base' │ 'pinto' │ 'PINTO-cbETH' │ 1113779 │ 8.31      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22' ] │ 'Pinto Silo' │
│ 4       │ '0x3e11001cfbb6de5737327c59e10afab47b82b5d3-base' │ 'Base' │ 'pinto' │ 'PINTO-WETH'  │ 1070993 │ 6.56      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x4200000000000000000000000000000000000006' ] │ 'Pinto Silo' │
└─────────┴───────────────────────────────────────────────────┴────────┴─────────┴───────────────┴─────────┴───────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┘

for (const bean of poolData.beans) {

// Get apy info
const apy = await axios.post(API, {
Copy link
Collaborator

Choose a reason for hiding this comment

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

whats the reason not fetching from the chain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinto displays a variable apy based on a forward-looking simulation with various inputs of past 30d performance. These values are not stored or computed on chain (it would consume too much gas).

My understanding was that external calls are acceptable for yield-server

@llamatester
Copy link

The pinto adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────┬────────┬─────────┬───────────────┬─────────┬───────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────┐
│ (index) │ pool                                              │ chain  │ project │ symbol        │ tvlUsd  │ apyReward │ rewardTokens                                     │ underlyingTokens                                                                               │ poolMeta     │
├─────────┼───────────────────────────────────────────────────┼────────┼─────────┼───────────────┼─────────┼───────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────┤
│ 0       │ '0x3e11226fe3d85142b734abce6e58918d5828d1b4-base' │ 'Base' │ 'pinto' │ 'PINTO-cbBTC' │ 2453789 │ 6.07      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf' ] │ 'Pinto Silo' │
│ 1       │ '0x3e1133ac082716ddc3114bbefeed8b1731ea9cb1-base' │ 'Base' │ 'pinto' │ 'PINTO-USDC'  │ 2347897 │ 7.42      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913' ] │ 'Pinto Silo' │
│ 2       │ '0x3e11444c7650234c748d743d8d374fce2ee5e6c9-base' │ 'Base' │ 'pinto' │ 'PINTO-WSOL'  │ 2069814 │ 6.63      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x1c61629598e4a901136a81bc138e5828dc150d67' ] │ 'Pinto Silo' │
│ 3       │ '0x3e111115a82df6190e36adf0d552880663a4dbf1-base' │ 'Base' │ 'pinto' │ 'PINTO-cbETH' │ 1103481 │ 7.4       │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x2ae3f1ec7f1f5012cfeab0185bfc7aa3cf0dec22' ] │ 'Pinto Silo' │
│ 4       │ '0x3e11001cfbb6de5737327c59e10afab47b82b5d3-base' │ 'Base' │ 'pinto' │ 'PINTO-WETH'  │ 1020606 │ 5.93      │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8' ] │ [ '0xb170000aeefa790fa61d6e837d1035906839a3c8', '0x4200000000000000000000000000000000000006' ] │ 'Pinto Silo' │
└─────────┴───────────────────────────────────────────────────┴────────┴─────────┴───────────────┴─────────┴───────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────┘

@slasher125 slasher125 merged commit 850c34b into DefiLlama:master Feb 12, 2025
1 check passed
Carl-Takara pushed a commit to Carl-Takara/yield-server that referenced this pull request Feb 13, 2025
* Pinto Silo yields

* Update subgraph query

* Remove apyBase 0
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