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

Fluid-Lending Updated #1674

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

Fluid-Lending Updated #1674

wants to merge 18 commits into from

Conversation

0xprinc
Copy link
Contributor

@0xprinc 0xprinc commented Jan 1, 2025

No description provided.

@llamatester
Copy link

The fluid-lending adapter exports pools:

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

Nb of pools: 98
 

Sample pools:
┌─────────┬─────────────────┬───────────────────────────────────────────────────────┬────────────────────┬────────────────────┬────────────────────┬─────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬────────────┬──────┬─────────┬───────────┬───────────────┬─────────────────┐
│ (index) │     project     │                         pool                          │       tvlUsd       │   totalSupplyUsd   │   totalBorrowUsd   │     symbol      │                                        underlyingTokens                                        │                                          rewardTokens                                          │   chain    │ ltv  │ apyBase │ apyReward │ apyBaseBorrow │ apyRewardBorrow │
├─────────┼─────────────────┼───────────────────────────────────────────────────────┼────────────────────┼────────────────────┼────────────────────┼─────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼────────────┼──────┼─────────┼───────────┼───────────────┼─────────────────┤
│    0    │ 'fluid-lending' │ 'ethereum_0x9Fb7b4477576Fe5B32be4C1843aFB1e55F251B33' │  175778674.151262  │  175778674.151262  │         0          │     'USDC'      │                        [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ]                        │                        [ '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48' ]                        │ 'ethereum' │  0   │  9.87   │   3.46    │               │                 │
│    1    │ 'fluid-lending' │ 'ethereum_0x82B27fA821419F5689381b565a8B0786aA2548De' │ 160273428.1448757  │ 160273428.1448757  │ 146342882.97871143 │  'wstETH/ETH'   │ [ '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', '0x0000000000000000000000000000000000000000' ] │ [ '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', '0x0000000000000000000000000000000000000000' ] │ 'ethereum' │ 0.95 │  0.32   │     0     │     2.91      │        0        │
│    2    │ 'fluid-lending' │ 'ethereum_0x5C20B550819128074FD538Edf79791733ccEdd18' │ 155274297.29785046 │ 155274297.29785046 │         0          │     'USDT'      │                        [ '0xdAC17F958D2ee523a2206206994597C13D831ec7' ]                        │                        [ '0xdAC17F958D2ee523a2206206994597C13D831ec7' ]                        │ 'ethereum' │  0   │  8.11   │   3.91    │               │                 │
│    3    │ 'fluid-lending' │ 'ethereum_0xE16A6f5359ABB1f61cE71e25dD0932e3E00B00eB' │ 67123394.15568365  │ 67123394.15568365  │ 44368294.881966785 │   'ETH/USDT'    │ [ '0x0000000000000000000000000000000000000000', '0xdac17f958d2ee523a2206206994597c13d831ec7' ] │ [ '0x0000000000000000000000000000000000000000', '0xdac17f958d2ee523a2206206994597c13d831ec7' ] │ 'ethereum' │ 0.87 │  2.18   │     0     │     11.28     │        0        │
│    4    │ 'fluid-lending' │ 'ethereum_0x1c6068eC051f0Ac1688cA1FE76810FA9c8644278' │ 66048954.26038804  │ 66048954.26038804  │ 38648710.943095855 │ 'weETHs/wstETH' │ [ '0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88', '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0' ] │ [ '0x917cee801a67f933f2e6b33fc0cd1ed2d5909d88', '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0' ] │ 'ethereum' │ 0.91 │    0    │     0     │     0.78      │        0        │
│    5    │ 'fluid-lending' │ 'ethereum_0x0C8C77B7FF4c2aF7F6CEBbe67350A490E3DD6cB3' │ 61230999.36519762  │ 61230999.36519762  │  37274809.462116   │   'ETH/USDC'    │ [ '0x0000000000000000000000000000000000000000', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ [ '0x0000000000000000000000000000000000000000', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ 'ethereum' │ 0.87 │  2.18   │     0     │     12.64     │        0        │
│    6    │ 'fluid-lending' │ 'ethereum_0xeAEf563015634a9d0EE6CF1357A3b205C35e028D' │  53673933.872969   │  53673933.872969   │ 46924168.28717332  │ 'weETH/wstETH'  │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0' ] │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0' ] │ 'ethereum' │ 0.94 │    0    │     0     │     0.78      │        0        │
│    7    │ 'fluid-lending' │ 'ethereum_0x6F72895Cf6904489Bcd862c941c3D02a3eE4f03e' │  44579910.7625211  │  44579910.7625211  │  26604724.275847   │   'wbtc/USDC'   │ [ '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ [ '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ 'ethereum' │ 0.85 │  0.38   │     0     │     12.64     │        0        │
│    8    │ 'fluid-lending' │ 'ethereum_0xF2c8F54447cbd591C396b0Dd7ac15FAF552d0FA4' │ 33075647.575034324 │ 33075647.575034324 │  16624855.730058   │  'weETH/USDC'   │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48' ] │ 'ethereum' │ 0.77 │    0    │     0     │     12.64     │        0        │
│    9    │ 'fluid-lending' │ 'ethereum_0x92643E964CA4b2c165a95CA919b0A819acA6D5F1' │ 28206755.290387414 │ 28206755.290387414 │ 15486874.75124565  │  'weETH/USDT'   │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0xdac17f958d2ee523a2206206994597c13d831ec7' ] │ [ '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee', '0xdac17f958d2ee523a2206206994597c13d831ec7' ] │ 'ethereum' │ 0.77 │    0    │     0     │     11.28     │        0        │
└─────────┴─────────────────┴───────────────────────────────────────────────────────┴────────────────────┴────────────────────┴────────────────────┴─────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴────────────┴──────┴─────────┴───────────┴───────────────┴─────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@0xprinc
Copy link
Contributor Author

0xprinc commented Jan 1, 2025

Hey @slasher125,

I have a couple of queries:
1. In the fluid-lending-adaptor, we have two Fluid protocols: Lending and Vaults. The Lending protocol doesn’t support borrow functionality, so fields like apyBorrowBase and apyRewardsBorrow are returned as zero. On the other hand, the Vaults protocol supports borrowing, so it returns non-zero borrow APYs. Would it be possible to hide the Lending protocol pools by removing the borrow-related fields from its output?
2. Additionally, several pools are currently mapped to debt tokens in the UI, but they aren’t intended to lend that token. Just like this ETH-USDT pool can not lend USDC token.

Screenshot 2025-01-02 at 12 12 15

Let me know your thoughts!

@0xprinc
Copy link
Contributor Author

0xprinc commented Jan 7, 2025

Hey @slasher125
I’d like to follow up on my previous message where I included some queries. Could you help address them?

@slasher125
Copy link
Collaborator

@0xprinc checking now, sry for delay

@slasher125
Copy link
Collaborator

@0xprinc i pushed a fix for the first part by removing the borrow fields for the lending pools. given these where set to 0, they were not useful anyways for the ui + they resulted in the wrong construction of borrow routes in the borrow aggregator.

we still need to fix the vaults though. pls confirm: the vaults are all isolated from each other right, so here for example
v
we can only supply wsteth, and only borrow eth against it?

if so we need to modify the adapter for the vaults, by using our mintedCoin field. i'll wait for ur confirmation before i update the adapter

@0xprinc
Copy link
Contributor Author

0xprinc commented Jan 7, 2025

Hey @slasher125
Right, one vault can only lend single token. Where the borrowAPY is the apyBorrowBase of that vault.

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.

4 participants