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 Size Credit #1675

Merged
merged 9 commits into from
Jan 13, 2025
Merged

Add Size Credit #1675

merged 9 commits into from
Jan 13, 2025

Conversation

aviggiano
Copy link
Contributor

@aviggiano aviggiano commented Jan 2, 2025

  • Create Pool.d.ts typescript type definition file that can be reused by different projects and avoid code duplication.
  • Add @SizeCredit yield information

@aviggiano aviggiano changed the title Add types directory with Pool interface Add Size Credit Jan 3, 2025
@llamatester
Copy link

The aave-v3 adapter exports pools:

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

Nb of pools: 127
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────┬──────────┬────────────────────┬─────────────────────────┬──────────────────────────────────────────────────┬────────────────────┬──────────────────────┬────────────────┬──────────────────────┬────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────┬────────────┬───────────────┐
│ (index) │ pool                                                  │ chain      │ project   │ symbol   │ tvlUsd             │ apyBase                 │ underlyingTokens                                 │ totalSupplyUsd     │ totalBorrowUsd       │ debtCeilingUsd │ apyBaseBorrow        │ ltv    │ url                                                                                                                             │ borrowable │ mintedCoin │ poolMeta      │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────┼──────────┼────────────────────┼─────────────────────────┼──────────────────────────────────────────────────┼────────────────────┼──────────────────────┼────────────────┼──────────────────────┼────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────┼────────────┼───────────────┤
│ 0       │ '0xbdfa7b7893081b35fb54027489e2bc7a38275129-ethereum' │ 'ethereum' │ 'aave-v3' │ 'weETH'  │ 4477735164.263067  │ 0.003293877724679768    │ [ '0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee' ] │ 4501714602.357532  │ 23979438.094464302   │ null           │ 1.1242918124624306   │ 0.775  │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 1       │ '0x5ee5bf7ae06d1be5997a1a72006fe6c607ec6de8-ethereum' │ 'ethereum' │ 'aave-v3' │ 'WBTC'   │ 3262041074.609994  │ 0.015883867842519956    │ [ '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599' ] │ 3544574138.068059  │ 282533063.45806503   │ null           │ 0.3985457043115626   │ 0.73   │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0x2260fac5e5542a773aa44fbcfedf7c193bc2c599&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 2       │ '0x0b925ed163218f6662a35e0f0371ac234f9e9371-ethereum' │ 'ethereum' │ 'aave-v3' │ 'wstETH' │ 3082424736.69757   │ 0.14946167764309784     │ [ '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0' ] │ 4212006954.03624   │ 1129582217.3386703   │ null           │ 0.5866474058439609   │ 0.785  │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 3       │ '0x2d62109243b87c4ba3ee7ba1d91b0dd0a074d7b1-ethereum' │ 'ethereum' │ 'aave-v3' │ 'rsETH'  │ 1244427817.4635067 │ 0.000008386965552866598 │ [ '0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7' ] │ 1245419712.730426  │ 991895.2669193745    │ null           │ 0.012388985079266609 │ 0.72   │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xa1290d69c65a6fe4df752f95823fae25cb99e5a7&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 4       │ '0x4579a27af00a62c0eb156349f31b345c08386419-ethereum' │ 'ethereum' │ 'aave-v3' │ 'sUSDe'  │ 1115276776.806814  │ 0                       │ [ '0x9D39A5DE30e57443BfF2A8307A4256c8797A3497' ] │ 1115276776.7646372 │ -0.04217672348022461 │ null           │ 0                    │ 0.72   │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0x9d39a5de30e57443bff2a8307a4256c8797a3497&marketName=proto_mainnet_v3' │ false      │ null       │ null          │
│ 5       │ '0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8-ethereum' │ 'ethereum' │ 'aave-v3' │ 'WETH'   │ 892667385.733092   │ 1.8744994854726322      │ [ '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2' ] │ 6258917691.696478  │ 5366250305.963386    │ null           │ 2.5721354040878626   │ 0.805  │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 6       │ '0x23878914efe38d27c4d67ab83ed1b93a74d4086a-ethereum' │ 'ethereum' │ 'aave-v3' │ 'USDT'   │ 625834764.7836063  │ 7.861011314795961       │ [ '0xdAC17F958D2ee523a2206206994597C13D831ec7' ] │ 3157225657.1524687 │ 2531390892.368862    │ null           │ 10.893791246548144   │ 0.75   │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xdac17f958d2ee523a2206206994597c13d831ec7&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
│ 7       │ '0x74e5664394998f13b07af42446380acef637969f-lido'     │ 'ethereum' │ 'aave-v3' │ 'ezETH'  │ 494864446.91256696 │ 0                       │ [ '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110' ] │ 494864446.91256696 │ 0                    │ null           │ 0                    │ 0.0005 │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xbf5495efe5db9ce00f80364c8b423567e58d2110&marketName=proto_lido_v3'    │ false      │ null       │ 'lido-market' │
│ 8       │ '0xc035a7cf15375ce2706766804551791ad035e0c2-lido'     │ 'ethereum' │ 'aave-v3' │ 'wstETH' │ 414965890.381468   │ 0.43393395591606015     │ [ '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0' ] │ 805252659.0111089  │ 390286768.6296409    │ null           │ 0.9424271407475843   │ 0.8    │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0&marketName=proto_lido_v3'    │ true       │ null       │ 'lido-market' │
│ 9       │ '0x5c647ce0ae10658ec44fa4e11a51c96e94efd1dd-ethereum' │ 'ethereum' │ 'aave-v3' │ 'cbBTC'  │ 409799892.08248776 │ 0.015072692506257207    │ [ '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf' ] │ 429576975.8429662  │ 19777083.760478437   │ null           │ 0.40923631459174736  │ 0.73   │ 'https://app.aave.com/reserve-overview/?underlyingAsset=0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf&marketName=proto_mainnet_v3' │ true       │ null       │ null          │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────┴──────────┴────────────────────┴─────────────────────────┴──────────────────────────────────────────────────┴────────────────────┴──────────────────────┴────────────────┴──────────────────────┴────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────┴────────────┴───────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125
Copy link
Collaborator

gm @aviggiano
pls remove the export from aave-v3 and just copy paste that provider object, otherwise i can't see the test output here from your adapter

@aviggiano
Copy link
Contributor Author

@slasher125 I think the tests don't work for typescript adapters. Do you have any recommendations?

@slasher125
Copy link
Collaborator

@slasher125 I think the tests don't work for typescript adapters. Do you have any recommendations?

we have other typescript adapters for which the tests work fine, best to resolve this locally, u can test with run test --adapter=size-credit

@llamatester
Copy link

The size-credit adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────────┬────────┬────────────────────┬───────────────────┬───────────┬──────────────────────────────────────────────────┬──────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬─────────────────┬────────────────────┬────────────────┬───────────────────┐
│ (index) │ pool                                                  │ chain      │ project       │ symbol │ tvlUsd             │ apyBase           │ apyReward │ underlyingTokens                                 │ rewardTokens │ url                                                                                                                    │ apyBaseBorrow      │ apyRewardBorrow │ totalSupplyUsd     │ totalBorrowUsd │ ltv               │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────────┼────────┼────────────────────┼───────────────────┼───────────┼──────────────────────────────────────────────────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼─────────────────┼────────────────────┼────────────────┼───────────────────┤
│ 0       │ 'base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 333075.7195849196  │ 4.838461538461538 │ 0         │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ []           │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 3.0565517241379316 │ 0               │ 285597.50806716946 │ undefined      │ 83.33333333333333 │
│ 1       │ 'base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 310557.67185057513 │ 4.733333333333333 │ 0         │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ []           │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 5                  │ 0               │ 285597.50806716946 │ undefined      │ 83.33333333333333 │
│ 2       │ 'base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 287046.046190041   │ 8.230264410078789 │ 0         │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ []           │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 5.033333333333333  │ 0               │ 285597.50808116834 │ undefined      │ 83.33333333333333 │
│ 3       │ 'base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 85613.22124883784  │ 8.230264410078789 │ 0         │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ []           │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 8.666666666666668  │ 0               │ 76441.84713557725  │ undefined      │ 66.66666666666667 │
│ 4       │ 'ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 'Ethereum' │ 'size-credit' │ 'USDC' │ 0                  │ 8.340415119160406 │ 0         │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ []           │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ undefined          │ 0               │ 0                  │ undefined      │ 90.9090909090909  │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────────┴────────┴────────────────────┴───────────────────┴───────────┴──────────────────────────────────────────────────┴──────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴─────────────────┴────────────────────┴────────────────┴───────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@aviggiano
Copy link
Contributor Author

Fixed

@slasher125
Copy link
Collaborator

slasher125 commented Jan 10, 2025

@aviggiano a few things:

  • ltv should be scaled to be btw 0-1
  • lets remove fields with any hardcoded 0, empty values (eg apyRewardBorrow, rewardsTokens etc)
  • the current adapter assumes which maturity date? best to add that to poolMeta
  • for lending protocols we use tvlUsd = available borrow liquidity
  • totalBorrowUsd is undefined?
  • totalSupplyUsd < tvlUsd ?

@llamatester
Copy link

The size-credit adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────────┬────────┬───────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬───────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project       │ symbol │ tvlUsd            │ apyBase           │ underlyingTokens                                 │ url                                                                                                                    │ apyBaseBorrow      │ totalSupplyUsd     │ totalBorrowUsd     │ ltv                │ poolMeta                      │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────────┼────────┼───────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼───────────────────────────────┤
│ 0       │ 'base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 275038.5908025789 │ 4.838461538461538 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 3.0565517241379316 │ 285810.66910123546 │ 19724.405125232213 │ 0.8333333333333334 │ '{"depth":10,"tenor":259200}' │
│ 1       │ 'base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 274294.9312283277 │ 4.733333333333333 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 5                  │ 285810.66910123546 │ 2340.5753186656457 │ 0.8333333333333334 │ '{"depth":10,"tenor":259200}' │
│ 2       │ 'base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 253601.2002586785 │ 8.449696110439325 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 5.033333333333333  │ 285810.6691092349  │ 0                  │ 0.8333333333333334 │ '{"depth":10,"tenor":259200}' │
│ 3       │ 'base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 47593.79183309559 │ 8.449696110439325 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 8.666666666666668  │ 76664.69115011112  │ 5107.615331017535  │ 0.6666666666666666 │ '{"depth":10,"tenor":259200}' │
│ 4       │ 'ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 'Ethereum' │ 'size-credit' │ 'USDC' │ 999.901183981784  │ 7.985189048691313 │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 10                 │ 1019.899202981883  │ 0                  │ 0.9090909090909091 │ '{"depth":10,"tenor":259200}' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────────┴────────┴───────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴───────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@aviggiano
Copy link
Contributor Author

@slasher125 thank you for your feedback
I had some issues with definitions of each variable, now they should be fixed

@aviggiano
Copy link
Contributor Author

  • the current adapter assumes which maturity date? best to add that to poolMeta

3 days and $10 borrowed (the minimum amount)

@slasher125
Copy link
Collaborator

  • the current adapter assumes which maturity date? best to add that to poolMeta

3 days and $10 borrowed (the minimum amount)

best to just add this in plain text inside poolMeta, we render poolMeta as is on the ui

@llamatester
Copy link

The size-credit adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────────┬────────┬───────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project       │ symbol │ tvlUsd            │ apyBase           │ underlyingTokens                                 │ url                                                                                                                    │ apyBaseBorrow      │ totalSupplyUsd     │ totalBorrowUsd     │ ltv                │ poolMeta                                                                                                    │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────────┼────────┼───────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ 'base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 277402.3784916044 │ 4.838461538461538 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 3.0565517241379316 │ 288174.4568002603  │ 19318.628349253268 │ 0.8333333333333334 │ 'APR information based on a 3-day maturity, 10 USDC fixed-rate loan using WETH as collateral on Base.'      │
│ 1       │ 'base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 276658.7189173532 │ 4.733333333333333 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 5                  │ 288174.4568002603  │ 2340.5753186656457 │ 0.8333333333333334 │ 'APR information based on a 3-day maturity, 10 USDC fixed-rate loan using cbBTC as collateral on Base.'     │
│ 2       │ 'base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 255713.2942635977 │ 7.813267114718705 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 5.033333333333333  │ 288174.45680825977 │ 0                  │ 0.8333333333333334 │ 'APR information based on a 3-day maturity, 10 USDC fixed-rate loan using cbETH as collateral on Base.'     │
│ 3       │ 'base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 48293.85450234024 │ 7.813267114718705 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 8.666666666666668  │ 79028.17263609813  │ 3194.8480862526117 │ 0.6666666666666666 │ 'APR information based on a 3-day maturity, 10 USDC fixed-rate loan using VIRTUAL as collateral on Base.'   │
│ 4       │ 'ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 'Ethereum' │ 'size-credit' │ 'USDC' │ 999.8981839812319 │ 7.97256755954107  │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 10                 │ 1019.8961429813339 │ 0                  │ 0.9090909090909091 │ 'APR information based on a 3-day maturity, 10 USDC fixed-rate loan using sUSDe as collateral on Ethereum.' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────────┴────────┴───────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@llamatester
Copy link

The size-credit adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────────┬────────┬───────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬───────────────────┬────────────────────┬────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ (index) │ pool                                                  │ chain      │ project       │ symbol │ tvlUsd            │ apyBase           │ underlyingTokens                                 │ url                                                                                                                    │ apyBaseBorrow      │ totalSupplyUsd    │ totalBorrowUsd     │ ltv                │ poolMeta                                                                                                    │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────────┼────────┼───────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼───────────────────┼────────────────────┼────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0       │ 'base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 277452.8615351567 │ 4.838461538461538 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 3.0565517241379316 │ 288224.9398448125 │ 19318.628349253268 │ 0.8333333333333334 │ 'APY information based on a 3-day maturity, 10 USDC fixed-rate loan using WETH as collateral on Base.'      │
│ 1       │ 'base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 276709.2019609055 │ 4.733333333333333 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 5                  │ 288224.9398448125 │ 2340.5753186656457 │ 0.8333333333333334 │ 'APY information based on a 3-day maturity, 10 USDC fixed-rate loan using cbBTC as collateral on Base.'     │
│ 2       │ 'base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 255713.2942635977 │ 7.862934537308444 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 5.033333333333333  │ 288224.939852812  │ 0                  │ 0.8333333333333334 │ 'APY information based on a 3-day maturity, 10 USDC fixed-rate loan using cbETH as collateral on Base.'     │
│ 3       │ 'base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 'Base'     │ 'size-credit' │ 'USDC' │ 48344.33591871051 │ 7.862934537308444 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 8.666666666666668  │ 79078.65405346829 │ 3144.370939446804  │ 0.6666666666666666 │ 'APY information based on a 3-day maturity, 10 USDC fixed-rate loan using VIRTUAL as collateral on Base.'   │
│ 4       │ 'ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 'Ethereum' │ 'size-credit' │ 'USDC' │ 999.87018397608   │ 7.972554192439049 │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 10                 │ 1019.86758297621  │ 0                  │ 0.9090909090909091 │ 'APY information based on a 3-day maturity, 10 USDC fixed-rate loan using sUSDe as collateral on Ethereum.' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────────┴────────┴───────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴───────────────────┴────────────────────┴────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125
Copy link
Collaborator

  • poolMeta should be short, see other examples on our UI (its displayed right after symbol)
  • symbol = collateral

@llamatester
Copy link

The size-credit adapter exports pools:

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

Nb of pools: 5
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬───────────────┬───────────┬────────────────────┬───────────────────┬──────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬──────────────────┐
│ (index) │ pool                                                  │ chain      │ project       │ symbol    │ tvlUsd             │ apyBase           │ underlyingTokens                                 │ url                                                                                                                    │ apyBaseBorrow      │ totalSupplyUsd     │ totalBorrowUsd     │ ltv                │ poolMeta         │
├─────────┼───────────────────────────────────────────────────────┼────────────┼───────────────┼───────────┼────────────────────┼───────────────────┼──────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼──────────────────┤
│ 0       │ 'base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 'Base'     │ 'size-credit' │ 'WETH'    │ 278336.61094031873 │ 4.838461538461538 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940'     │ 3.0565517241379316 │ 289108.78103548544 │ 19318.79295545138  │ 0.8333333333333334 │ '3-day maturity' │
│ 1       │ 'base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 'Base'     │ 'size-credit' │ 'cbBTC'   │ 277592.94502964587 │ 4.733333333333333 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0xB21Bbe052F5cE9ae681c59725f0A313765Fd016c'     │ 5                  │ 289108.78103548544 │ 2340.59526175879   │ 0.8333333333333334 │ '3-day maturity' │
│ 2       │ 'base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 'Base'     │ 'size-credit' │ 'cbETH'   │ 255715.4730928817  │ 8.227760063714253 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x0728522FBe416B9dBB0c12E9e84870AA8E17Ad11'     │ 5.033333333333333  │ 289108.7810774829  │ 0                  │ 0.8333333333333334 │ '3-day maturity' │
│ 3       │ 'base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 'Base'     │ 'size-credit' │ 'VIRTUAL' │ 49225.09460741249  │ 8.227760063714253 │ [ '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=base-0x2a7168C467f97A4C56958b0DDE1144E450a60a36'     │ 8.666666666666668  │ 79959.0438937299   │ 2263.0128091262923 │ 0.6666666666666666 │ '3-day maturity' │
│ 4       │ 'ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 'Ethereum' │ 'size-credit' │ 'sUSDe'   │ 999.886183979024   │ 8.058701065745586 │ [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ] │ 'https://app.size.credit/borrow?action=market&type=lend&market_id=ethereum-0x65767ab18A2854895D5287Ac689A18B54A17DFb1' │ 10                 │ 1019.883902979138  │ 0                  │ 0.9090909090909091 │ '3-day maturity' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴───────────────┴───────────┴────────────────────┴───────────────────┴──────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴──────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125 slasher125 merged commit c133e57 into DefiLlama:master Jan 13, 2025
1 check passed
@aviggiano
Copy link
Contributor Author

@slasher125

Thank you for your patience in getting this merged.

Can I ask why the protocol still does not show up on some lending-related pages from DefiLlama?

For example, here

https://defillama.com/borrow?collateral=USDC&borrow=VIRTUAL
https://defillama.com/borrow/advanced?borrow=USDC&lend=WETH&farmProtocol=&lendingProtocol=All
https://swap.defillama.com/?tab=borrow&lendToken=CBBTC&borrowToken=USDC

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