-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Cronos Gangsters - Leverage Trading DEX on Cronos #18711
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
Open
kingautomotive189a-spec
wants to merge
1
commit into
DefiLlama:main
Choose a base branch
from
kingautomotive189a-spec:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+16
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| const { sumTokensExport } = require('../helper/unwrapLPs'); | ||
|
|
||
| const GANG_TOKEN = '0x4cE15b52a34dE6F62448fDBAdDF1dB4811DDC3EF'; | ||
|
|
||
| module.exports = { | ||
| cronos: { | ||
| tvl: sumTokensExport({ | ||
| owners: [ | ||
| '0x2099ad49329909FDb620714D01F5A74D57CDeE0C', | ||
| '0xe546C82f0CedE3341dC402626923A6D4b95234Ee', | ||
| ], | ||
| tokens: [GANG_TOKEN], | ||
| }), | ||
| }, | ||
| methodology: 'TVL counts GANG tokens locked in Cronos Gangsters staking and competition contracts.', | ||
| }; | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: DefiLlama/DefiLlama-Adapters
Length of output: 1102
🌐 Web query:
What is the difference between TVL and staking in DeFi protocols, and how should leverage trading DEX protocols categorize locked collateral versus staked governance tokens?💡 Result:
TVL vs. staking (in DeFi)
How leverage-trading DEXs (perps/margin DEXs) should categorize assets
A practical, analytics-friendly split is:
Core TVL (Locked collateral / margin TVL)
Include user-posted trading collateral that is locked in protocol-controlled contracts to open/maintain leveraged positions (e.g., USDC/ETH margin in a vault). This collateral is integral to the protocol’s trading function, so it belongs in TVL. (docs.llama.fi)
Staked (Governance token staking) — separate from core TVL
Put staked governance tokens (e.g., protocol token staking for rewards/voting/fee share) in a separate “Staked” metric rather than core TVL, since it’s often independent of actual trading usage and can distort comparisons. (defillama.com)
Edge case (if governance tokens are required for trading risk/collateral)
If the governance token is actually used as margin/collateral for leveraged positions (or is otherwise required and locked to enable trading in a way that affects liquidation/risk), then it’s reasonable to count that portion under core TVL, but it should be broken out explicitly (e.g., “Margin TVL: stablecoins” vs “Margin TVL: governance-token collateral”) to avoid misleading aggregation.
In short: locked trading collateral → TVL; staked governance tokens → “Staked” (not core TVL), unless they are genuinely trading collateral—then include, but disclose as a separate component.
Citations:
🏁 Script executed:
# Read the complete file to see all exports and methodology cat projects/cronos-gangsters/index.jsRepository: DefiLlama/DefiLlama-Adapters
Length of output: 536
🏁 Script executed:
# Check if there are related files or documentation fd -i cronos-gangstersRepository: DefiLlama/DefiLlama-Adapters
Length of output: 98
🏁 Script executed:
# Look at a similar leverage trading DEX adapter for comparison cat projects/deri/index.jsRepository: DefiLlama/DefiLlama-Adapters
Length of output: 2727
Move staking/competition contract tracking to
stakingexport.The methodology explicitly states this counts "GANG tokens locked in Cronos Gangsters staking and competition contracts," but the export uses the
tvlkey. In DefiLlama conventions, TVL tracks assets locked in the protocol's core functionality (e.g., collateral in trading positions or liquidity in perpetual pools), whilestakingtracks governance tokens locked for rewards or voting.Since the two owner addresses hold GANG tokens in staking and competition contracts, restructure as:
Suggested fix
If this is a leverage trading DEX, also verify whether there is actual trading collateral (margin vaults, perpetual pools, etc.) that should be tracked separately under
tvl.🤖 Prompt for AI Agents