Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions projects/cronos-gangsters/index.js
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],
}),
},
Comment on lines +5 to +14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify the nature of the owner contracts and check for DEX-related contracts

echo "=== Checking owner contract addresses on Cronos blockchain ==="
echo "Owner 1: 0x2099ad49329909FDb620714D01F5A74D57CDeE0C"
echo "Owner 2: 0xe546C82f0CedE3341dC402626923A6D4b95234Ee"
echo ""
echo "Please verify via Cronos explorer (cronoscan.com):"
echo "1. Are these contracts staking/rewards contracts?"
echo "2. Do they hold GANG tokens for staking/farming purposes?"
echo "3. Are there additional contracts for DEX liquidity (trading pools, collateral vaults)?"
echo ""
echo "=== Searching codebase for similar leverage trading DEX patterns ==="
rg -l "leverage|perpetual|futures" --type=js -g 'projects/**/index.js' | head -20

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)

  • TVL (Total Value Locked): the USD value of assets locked in a protocol’s smart contracts that power the protocol’s core function (e.g., liquidity in AMMs, collateral in lending, margin/collateral vaults in trading protocols). (docs.llama.fi)
  • Staking (common usage in DeFi analytics): typically the value of governance/protocol tokens staked in the protocol’s staking system (often for rewards, fee share, vote power, or an insurance/backstop role). Many analytics sites track this separately because it can inflate “traction” without reflecting real usage of the core product. (defillama.com)

How leverage-trading DEXs (perps/margin DEXs) should categorize assets

A practical, analytics-friendly split is:

  1. 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)

  2. 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)

  3. 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.js

Repository: DefiLlama/DefiLlama-Adapters

Length of output: 536


🏁 Script executed:

# Check if there are related files or documentation
fd -i cronos-gangsters

Repository: DefiLlama/DefiLlama-Adapters

Length of output: 98


🏁 Script executed:

# Look at a similar leverage trading DEX adapter for comparison
cat projects/deri/index.js

Repository: DefiLlama/DefiLlama-Adapters

Length of output: 2727


Move staking/competition contract tracking to staking export.

The methodology explicitly states this counts "GANG tokens locked in Cronos Gangsters staking and competition contracts," but the export uses the tvl key. In DefiLlama conventions, TVL tracks assets locked in the protocol's core functionality (e.g., collateral in trading positions or liquidity in perpetual pools), while staking tracks governance tokens locked for rewards or voting.

Since the two owner addresses hold GANG tokens in staking and competition contracts, restructure as:

Suggested fix
module.exports = {
  cronos: {
    staking: sumTokensExport({
      owners: [
        '0x2099ad49329909FDb620714D01F5A74D57CDeE0C',
        '0xe546C82f0CedE3341dC402626923A6D4b95234Ee',
      ],
      tokens: [GANG_TOKEN],
    }),
  },
  methodology: 'Staking counts GANG tokens locked in Cronos Gangsters staking and competition contracts.',
};

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
Verify each finding against the current code and only fix it if needed.

In `@projects/cronos-gangsters/index.js` around lines 5 - 14, The export currently
assigns the two owner addresses and GANG_TOKEN to the cronos.tvl export; change
this to a cronos.staking export by replacing the tvl key with staking and
keeping the sumTokensExport({...}) call (referencing module.exports, cronos, tvl
-> staking, sumTokensExport, GANG_TOKEN and the two owner addresses
'0x2099...DeE0C' and '0xe546C8...234Ee'); also add a methodology string
clarifying that staking counts GANG tokens locked in Cronos Gangsters staking
and competition contracts.

methodology: 'TVL counts GANG tokens locked in Cronos Gangsters staking and competition contracts.',
};