Skip to content

Conversation

@alphasec-dev
Copy link
Contributor

@alphasec-dev alphasec-dev commented Feb 7, 2026

Thanks for the initial listing of AlphaSec Bridge — much appreciated.

This PR updates the TVL adapter to track additional tokens locked in the bridge contracts.

Changes

  • Switched from owners + tokens to tokensAndOwners for precise contract-to-token mapping
    • Native KAIA locked in Bridge contract (0xF31CE581A8440f0f4850eDEb343a28372572a088)
    • ERC20 tokens locked in L1 ERC20 Gateway (0x483A9ed25747711F38778a69d4d99b7e5365e506)
  • Added KAIA native token tracking
  • Added IDRX token (0x18bc5bcc660cf2b9ce3cd51a404afe1a0cbd3c22)
  • Added methodology description

Test Results

--- klaytn ---
USD₮ 253.59 k
WETH 76.59 k
KLAY 37.34 k
IDRX 29.14 k
bora 8.62 k
Total: 405.29 k

Contract references: https://docs.alphasec.trade/for-developers/contract-addresses

If there's anything that should be changed, please don't hesitate to comment. We're happy to iterate on this.

Looking forward to your review — thanks again!

Summary by CodeRabbit

  • New Features

    • Expanded bridge gateway token tracking to include additional assets for improved TVL coverage.
  • Documentation

    • Added TVL methodology documentation explaining the approach to calculating total value locked in bridge contracts.

- Switch from owners+tokens to tokensAndOwners for precise contract mapping
- Add KAIA native token (locked in Bridge contract)
- Add IDRX token (locked in L1 ERC20 Gateway)
- Add methodology description
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

The AlphaSec bridge adapter is refactored to track multiple tokens (KAIA, USDT, WETH, BORA, IDRX) mapped to specific gateway contracts using a tokensAndOwners pattern, replacing separate owners/tokens arrays. A methodology description is added to module.exports.

Changes

Cohort / File(s) Summary
AlphaSec Bridge TVL Tracking
projects/alphasec-bridge/index.js
Introduced BRIDGE and L1_ERC20_GATEWAY constants; refactored sumTokens call to use tokensAndOwners array; added tracking for KAIA, USDT, WETH, BORA, and IDRX tokens; added methodology export describing TVL approach.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Citrea bridge tvl #17862: Both PRs modify bridge adapter modules to compute TVL using the tokensAndOwners pattern for bridging contracts.
  • Update HarborFi TVL adapter #17782: Both PRs refactor adapter TVL logic from separate owners/tokens arrays to a tokensAndOwners structure and update methodology exports.

Poem

🐰 A bridge across the chains so grand,
Now KAIA, USDT, WETH join hand in hand,
With IDRX and BORA in tow,
The gateway contracts brightly glow,
AlphaSec's TVL blooms like clover in the snow! 🌱

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: adding KAIA native and IDRX token tracking to the alphasec-bridge adapter.
Description check ✅ Passed The description is comprehensive and relevant to the PR changes, including specific changes, contract addresses, and test results, though it doesn't follow the repository's template structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@llamabutler
Copy link

The adapter at projects/alphasec-bridge exports TVL:

klaytn                    396.36 k

total                    396.36 k 

@g1nt0ki g1nt0ki merged commit 9e4bbdd into DefiLlama:main Feb 9, 2026
2 checks passed
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