Skip to content

Conversation

Gloom0x0
Copy link

Introduces ShiftTvlFeed ABI, config for contract addresses, and an index.js adapter to calculate TVL for Shift Protocol vaults. TVL is aggregated from USDC deposits using the latest on-chain data.

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):
Shift Protocol

Twitter Link:
https://twitter.com/shiftprotocol_

List of audit links if any:
https://github.com/SHIFT-NebulaLabs/shift-contracts/blob/main/audits/shift-sbsecurity-audit-2025.pdf

Website Link:
https://shiftprotocol.xyz/

Logo (High resolution, will be shown with rounded borders):
https://raw.githubusercontent.com/SHIFT-NebulaLabs/resources/main/SHIFT-logo-dark.png

Current TVL:
$500,000

Treasury Addresses (if the protocol has treasury)

Chain:
Base

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):
Shift is a DeFi protocol offering a suite of yield products built on top of leading on-chain perpetual futures exchanges (Perp DEXs). Our mission is to make high-yield strategies available to anyone through transparent, on-chain vaults.

Token address and ticker if any:
Category (full list at https://defillama.com/categories) *Please choose only one:
Onchain Capital Allocator

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):
TVL is calculated as the aggregated amount of USDC deposited across all of Shift's vault, inclusive of losses or gains

Github org/user (Optional, if your code is open source, we can track activity):

Introduces ShiftTvlFeed ABI, config for contract addresses, and an index.js adapter to calculate TVL for Shift Protocol vaults. TVL is aggregated from USDC deposits using the latest on-chain data.
@llamabutler
Copy link

The adapter at projects/shift-protocol exports TVL:

base                      500.15 k

total                    500.15 k 

@Gloom0x0
Copy link
Author

Gloom0x0 commented Oct 16, 2025

For the Twitter account is actually: https://x.com/shiftprotocol_ the hyperlink is not considering the "_", please do when providing the link

let totalTvl = 0;

for (const address of contractsByChain[chain]) {
const contract = new Contract(address, abi, provider);
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we use our SDK here rather than ethers?

Copy link
Author

Choose a reason for hiding this comment

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

If the defillama sdk can create contract interfaces, there is no issue. Beware of the abi that is custom for our contracts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

please check the docs https://docs.llama.fi/list-your-project/submit-a-project and look at other adapters in the repo

Copy link
Author

Choose a reason for hiding this comment

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

Done

]);

const tvlValue = parseFloat(formatUnits(tvlData.value, decimals));
totalTvl += tvlValue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

please return token balances using api.add() or similar rather than exporting a USD amount

Copy link
Author

@Gloom0x0 Gloom0x0 Oct 17, 2025

Choose a reason for hiding this comment

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

This is not a token amout is the vault tvl trough our tvl oraclefeed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We need a way to count the tokens deposited to each vault

Copy link
Author

@Gloom0x0 Gloom0x0 Oct 17, 2025

Choose a reason for hiding this comment

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

Pivit to a different calculation for TVL with our share supply.

@@ -0,0 +1,266 @@
[
Copy link
Collaborator

Choose a reason for hiding this comment

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

please use string form ABI instead - try searching the repo for "function

Copy link
Author

@Gloom0x0 Gloom0x0 Oct 17, 2025

Choose a reason for hiding this comment

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

Noted

@waynebruce0x waynebruce0x self-assigned this Oct 17, 2025
Removed ShiftTvlFeed.json ABI and updated TVL logic in index.js to use standard ERC20 totalSupply and decimals, along with a custom getSharePrice() call. The config.js contract address was updated. TVL is now calculated as totalSupply * getSharePrice (formatted with 6 decimals) for each contract.
@llamabutler
Copy link

The adapter at projects/shift-protocol exports TVL:

base                      500.90 k

total                    500.90 k 

Revised the methodology field in the adapter to provide a clearer explanation of how TVL is calculated, emphasizing the aggregation of total supply and share price across contracts.
@llamabutler
Copy link

The adapter at projects/shift-protocol exports TVL:

base                      500.90 k

total                    500.90 k 

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