Skip to content

Conversation

@saurabh-7797
Copy link
Contributor

  • Add TVL calculation for Surf Liquid protocol on Base chain

NOTE

Please enable "Allow edits by maintainers" while putting up the PR.


  • If you would like to add a volume/fees/revenue adapter please submit the PR here.
  • If you would like to add a liquidations adapter, please refer to this readme document for details.
  1. Once your adapter has been merged, it takes time to show on the UI. If more than 24 hours have passed, please let us know in Discord.
  2. Sorry, We no longer accept fetch adapter for new projects, we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you.
  3. Please fill the form below only if the PR is for listing a new protocol else it can be ignored/replaced with reason/details about the PR
  4. For updating listing info It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR
  5. Do not edit/push package-lock.json file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI
  6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap

Name (to be shown on DefiLlama):
Twitter Link:
List of audit links if any:
Website Link:
Logo (High resolution, will be shown with rounded borders):
Current TVL:
Treasury Addresses (if the protocol has treasury)
Chain:
Coingecko ID (so your TVL can appear on Coingecko, leave empty if not listed): (https://api.coingecko.com/api/v3/coins/list)
Coinmarketcap ID (so your TVL can appear on Coinmarketcap, leave empty if not listed): (https://api.coinmarketcap.com/data-api/v3/map/all?listing_status=active,inactive,untracked&start=1&limit=10000)
Short Description (to be shown on DefiLlama):
Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
Oracle Provider(s): Specify the oracle(s) used (e.g., Chainlink, Band, API3, TWAP, etc.):
Implementation Details: Briefly describe how the oracle is integrated into your project:
Documentation/Proof: Provide links to documentation or any other resources that verify the oracle's usage:
forkedFrom (Does your project originate from another project):
methodology (what is being counted as tvl, how is tvl being calculated):
Github org/user (Optional, if your code is open source, we can track activity):

- Add TVL calculation for Surf Liquid protocol on Base chain
@llamabutler
Copy link

The adapter at projects/surf-liquid exports TVL:

base-staking              20.07 k
base                      20.07 k
staking                   20.07 k

total                    20.07 k 

@saurabh-7797
Copy link
Contributor Author

Add Surf Liquid Adapter

This PR adds a new adapter for Surf Liquid protocol on Base chain.

Changes:

  • Added projects/surf-liquid/index.js adapter
  • Tracks TVL for HYCSUSDC tokens in the Surf liquid vault contract
  • Supports both tvl and staking categories
  • Contract address: 0x663585f2464b673efbe6f46af2c0e2514a6f199a
  • Tokens tracked: 3 HYCSUSDC tokens on Base chain

Testing:

  • Adapter has been tested and returns correct TVL data
  • Test command: node test.js projects/surf-liquid/index.js
  • Current TVL: ~20.07k

@waynebruce0x
Copy link
Collaborator

please fill out the pr desc with metadata

@waynebruce0x waynebruce0x self-assigned this Sep 24, 2025
@saurabh-7797
Copy link
Contributor Author

every user has their own vault contract where they deposit USDC and receive LP tokens through Morpho vaults. Every 12 hours, the user’s funds are moved into new vaults, and they receive new LP tokens...

Add Surf Liquid Adapter

This PR adds a new adapter for Surf Liquid protocol on Base chain.

Changes:

  • Added projects/surf-liquid/index.js adapter
  • Tracks TVL for HYCSUSDC tokens in the Surf liquid vault contract
  • Supports both tvl and staking categories
  • Contract address: 0x663585f2464b673efbe6f46af2c0e2514a6f199a
  • Tokens tracked: 3 HYCSUSDC tokens on Base chain

Testing:

  • Adapter has been tested and returns correct TVL data
  • Test command: node test.js projects/surf-liquid/index.js
  • Current TVL: ~20.07k (can fluctuate based on user deposits)

Protocol Information:

  • Name: Surf Liquid
  • Chain: Base
  • Category: Liquid Staking
  • Website: [https://surfliquid.com/]
  • Twitter: [Add your Twitter handle if available]
  • Description: Liquid staking protocol on Base chain

Methodology:

Counts the balances of the listed tokens in the Surf liquid vault contract on Base chain.

Start Date:

  • Start: 1734192000 (December 15, 2024)

@waynebruce0x waynebruce0x merged commit 1bb6a7f into DefiLlama:main Sep 24, 2025
1 check passed
@saurabh-7797
Copy link
Contributor Author

I want to communicate with your team regarding my project. How can I contact your team for this?

@waynebruce0x
Copy link
Collaborator

Here or discord

@saurabh-7797
Copy link
Contributor Author

So far this setup worked for one vault which in our use case is just one user. Every use in surfliquid.com deploys their own vault which can be tracked by this - factory contract -0x1D283b668F947E03E8ac8ce8DA5505020434ea0E

You can check this on basecan and you will see all the user vaults, each vault has funds depostited which is part of total tvl but they get staked to new vaults every 12 hrs so our lp tokens keep changing. How should I approach setting this up?

@saurabh-7797
Copy link
Contributor Author

I am still waiting for your response.

So far this setup worked for one vault which in our use case is just one user. Every use in surfliquid.com deploys their own vault which can be tracked by this - factory contract -0x1D283b668F947E03E8ac8ce8DA5505020434ea0E

You can check this on basecan and you will see all the user vaults, each vault has funds depostited which is part of total tvl but they get staked to new vaults every 12 hrs so our lp tokens keep changing. How should I approach setting this up?

@saurabh-7797
Copy link
Contributor Author

So far this setup worked for one vault which in our use case is just one user. Every use in surfliquid.com deploys their own vault which can be tracked by this - factory contract -0x1D283b668F947E03E8ac8ce8DA5505020434ea0E

You can check this on basecan and you will see all the user vaults, each vault has funds depostited which is part of total tvl but they get staked to new vaults every 12 hrs so our lp tokens keep changing. How should I approach setting this up?

@waynebruce0x
Copy link
Collaborator

Please verify the contract at 0x1D283b668F947E03E8ac8ce8DA5505020434ea0E on basescan https://basescan.org/address/0x1D283b668F947E03E8ac8ce8DA5505020434ea0E

@waynebruce0x
Copy link
Collaborator

and try to be patient - no need to make the same comment 3 times

@saurabh-7797
Copy link
Contributor Author

Hello, DefiLlama team can you remove surfliquid listing for now as it is showing 0 tvl. We were just testing earlier, and we’re currently verifying the factory contract.
Also, need some guidance for how to provide you guys are apy backend to show our platform apy, data calculation is dependent from data stored in our database.

@waynebruce0x
Copy link
Collaborator

We cant remove the project but we can mark it as dead. When was surfliquid deprecated?

@saurabh-7797
Copy link
Contributor Author

Hello DefiLlama team,
https://base.blockscout.com/address/0x1D283b668F947E03E8ac8ce8DA5505020434ea0E?tab=contract
This is our factory contract on base- url. Each deployed vault through this is our user, and each vault has funds deposited which are staked in morpho vaults where we rebalance through a bot every 12 hrs so lp tokens keep on changing. Number of users part is easy, can you guys calculate total tvl through here?

Also, our APY calculation is done in backend where our database is involved, how can we provide code for this? We need to show SurLiquid platform apy.

@saurabh-7797
Copy link
Contributor Author

Hello DefiLlama team,
I am still waiting for your response.

@waynebruce0x
Copy link
Collaborator

How to get a list of deployed vaults? How to know which morpho vaults they deposit to?

Yield info should be in this repo https://github.com/DefiLlama/yield-server

@saurabh-7797
Copy link
Contributor Author

We rebalance every 12 hours in the base Morpho vaults, focusing on those with the highest APR and at least $1M in liquidity. We’re currently working on integrating more platforms from different chains, but that will come later.

@saurabh-7797
Copy link
Contributor Author

Hello DefiLlama team,
I am still waiting for your response.

@waynebruce0x
Copy link
Collaborator

How to get a list of deployed vaults? How to know which morpho vaults they deposit to? Using on chain functions

@waynebruce0x
Copy link
Collaborator

I'm trying to work out how to write an adapter for you

@saurabh-7797
Copy link
Contributor Author

method- 1

🔹 Step 1: Get all deployed vaults for a user

Use your factory contract’s read function:

function getOwnerVaults(address owner) external view returns (address[] memory);
📘 What it does:
Returns all vault addresses (UserVault contracts) created by that specific owner.

🔹 Step 2: For each vault, find its currently active Morpho vault

Each UserVault contract exposes:

function currentVault() external view returns (address);
📘 What it does:
Returns the current Morpho vault address (or yield vault) that the UserVault is depositing into.

🔹 Step 3 (optional): Get all vaults the UserVault can deposit into

Each UserVault also has:

function getAllowedVaults() external view returns (address[] memory);
📘 What it does:
Lists all whitelisted Morpho vaults that the UserVault could deposit to (not necessarily the current one).

method 2

🔹 Step 1: Get the total number of vaults

The factory keeps a counter for how many vaults it has deployed.

function getTotalVaults() external view returns (uint256);

🔹 Step 2: Loop through each vault index to fetch info
call the function GetVaultinfo uint256 and in response you will get this struct
struct UserVaultFactory.VaultInfo {

vaultAddress (address) :

owner (address) :

admin (address) :

chainId (uint256) :

salt (bytes32) :

deployedAt (uint256) :

}

🔹 Step 3: For each vault, find its currently active Morpho vault

Each UserVault contract exposes:

function currentVault() external view returns (address);
📘 What it does:
Returns the current Morpho vault address (or yield vault) that the UserVault is depositing into.

@waynebruce0x waynebruce0x mentioned this pull request Oct 6, 2025
@waynebruce0x
Copy link
Collaborator

Does this look right? About 41k$ #16569

@saurabh-7797
Copy link
Contributor Author

verified contract of random user Vault contract- https://basescan.org/address/0xa733cb0ad802b92703bcf676e8feae46c28fce39#code

And for factory contract please refer to the blocksout verified contract - https://base.blockscout.com/address/0x1D283b668F947E03E8ac8ce8DA5505020434ea0E?tab=contract_abi

@saurabh-7797
Copy link
Contributor Author

Yes, the TVL looks correct. From our factory contract, you can fetch the total number of users — each deployed vault counts as one user.

We also need to display the total managed volume. This can be derived from the keyless bot admin account, which rebalances funds every 12 hours. Its address is:

this is our admin address 0xEeEE7d713aDf6f408dd3637987191B35E3A872b0
from this address we are rebalancing all user's funds to get them in highest possible morpho vault that supports USDC
you can get transaction volume from all rebalancing transactions of this address get event REBALANCED
from this value function below is abi
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "fromVault",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "toVault",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Rebalanced",
"type": "event"
},

@waynebruce0x
Copy link
Collaborator

volume should be added here https://github.com/DefiLlama/dimension-adapters

@saurabh-7797
Copy link
Contributor Author

where should I need to add the volume?

@saurabh-7797
Copy link
Contributor Author

i am waiting your response

@waynebruce0x
Copy link
Collaborator

I sent the link in the comment above

@saurabh-7797
Copy link
Contributor Author

in which folder i add the volume

@saurabh-7797
Copy link
Contributor Author

WhatsApp Image 2025-10-08 at 5 52 22 PM

"Protocol Information: SurfLiquid is an AI-powered DeFi platform designed to automate and optimise yield generation across the most profitable opportunities in decentralised finance.

Category: AI Agent, Yield "

Soon we are going to launch in other chains in partnership with other platforms like Silo, Euler on chains like Avalanche and Arbitrum, so this description will be a better representation of surfliquid

@saurabh-7797
Copy link
Contributor Author

i am waiting your response

@waynebruce0x
Copy link
Collaborator

This will be updated today

@saurabh-7797
Copy link
Contributor Author

I am sending you volume script. Also we would like to show our platform APR listed here. We have 3 tiers here depending on the money user has deposited. We have Standard tier which gives 10%, Advanced tier which gives 14% and Pro tier gives 18% APR.

Whatever returns we get from Morpho vaults, in the form of native USDC APY + reward tokens, if it does not reach the threshold APR we have set for that tier then we transfer the equivalent usdc amount of surf tokens.

Our backend code is dependent on data we store in database, do tell us best way to verify these and display it on our defillama page.

@waynebruce0x
Copy link
Collaborator

please make a PR to https://github.com/DefiLlama/dimension-adapters

@saurabh-7797
Copy link
Contributor Author

DefiLlama/dimension-adapters#4410
The total volume is added on a daily basis, and it also includes the total volume from the contract deployment date to the present date . Additionally, I want to display the total number of users on the dashboard.

@saurabh-7797
Copy link
Contributor Author

i am waiting your response

@saurabh-7797
Copy link
Contributor Author

hello defilama team .I still waiting your response from your side .. and i also want to display the total number of users on the your dashboard

@waynebruce0x
Copy link
Collaborator

Be patient please

@saurabh-7797
Copy link
Contributor Author

okay sir

@saurabh-7797
Copy link
Contributor Author

Hello DeFiLlama team, is there any update regarding my concern?

@waynebruce0x
Copy link
Collaborator

Not yet!!!!!!

@saurabh-7797
Copy link
Contributor Author

Hello DeFiLlama team, is there any update regarding my concern?

@saurabh-7797
Copy link
Contributor Author

Hello DefiLlama team, I have submitted the total volume and total user vaults, but I haven’t received any update from your side yet. Could you please let me know by when it will be updated on your side?

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