Skip to content

feat: add ScrubVault DepositVault TVL to scrub project (Kava + Arbitrum)#18679

Open
gaspare100 wants to merge 1 commit intoDefiLlama:mainfrom
gaspare100:feat/scrubvault-tvl
Open

feat: add ScrubVault DepositVault TVL to scrub project (Kava + Arbitrum)#18679
gaspare100 wants to merge 1 commit intoDefiLlama:mainfrom
gaspare100:feat/scrubvault-tvl

Conversation

@gaspare100
Copy link
Copy Markdown
Contributor

@gaspare100 gaspare100 commented Apr 7, 2026

Summary

Extends the existing Scrub project to include TVL from the ScrubVault DepositVault contracts on Kava and Arbitrum.

What is ScrubVault?

ScrubVault is a delta-neutral managed vault where users deposit USDt (Kava) or USDC (Arbitrum) and receive share tokens representing proportional ownership. The deposited capital is deployed off-chain across centralised and decentralised exchanges running a delta-neutral funding-rate and market-making strategy.

Why funds are not sitting in the contract

The vault contract acts as an on-chain accounting and settlement layer. Once a deposit batch is processed, the stablecoins are transferred to the strategy wallet and actively deployed on exchanges. The on-chain totalVaultValue variable is the authoritative AUM figure — updated by the strategy role via distributeRewards() each time PnL is settled back to the vault.

TVL reported here reflects assets under management, not tokens sitting in the contract (a balanceOf check would show near-zero).

Contracts tracked

Chain Contract Token
Kava 0x7BFf6c730dA681dF03364c955B165576186370Bc USDt
Arbitrum 0x439a923517C4DFD3F3d0ABb0C36E356D39CF3f9D USDC (native)

No double-counting

The DepositVault addresses are not referenced in the existing Scrub or ScrubInvest adapters. The vault holds ~$0 in actual token balance (funds are off-chain), so existing sumTokens sweeps cannot pick them up.

Summary by CodeRabbit

  • New Features
    • Added Total Value Locked (TVL) support for ScrubVault across Kava and Arbitrum networks.

Extends the existing scrub project to track TVL from the ScrubVault
DepositVault contracts on Kava and Arbitrum.

ScrubVault is a delta-neutral managed vault where users deposit USDt (Kava)
or USDC (Arbitrum) and receive share tokens. Capital is deployed off-chain
across CEXs and DEXs running a delta-neutral funding-rate strategy.

Because funds are actively managed off-chain, the vault contract holds only
unprocessed pending deposits. The authoritative AUM figure is the on-chain
totalVaultValue variable, updated by the strategy role via distributeRewards()
each time PnL is settled back to the vault. TVL here = assets under management.

Contracts:
- Kava    DepositVault 0x7BFf6c730dA681dF03364c955B165576186370Bc (USDt)
- Arbitrum DepositVault 0x439a923517C4DFD3F3d0ABb0C36E356D39CF3f9D (USDC)
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

This pull request adds TVL computation for ScrubVault smart contracts. It introduces DepositVault contract addresses and corresponding stablecoin assets for KAVA and ARB networks, then implements a scrubVaultTvl object that reads each vault's totalVaultValue on-chain and aggregates the results into the TVL output.

Changes

Cohort / File(s) Summary
ScrubVault TVL Implementation
projects/scrub/index.js
Added loading of coreAssets.json and introduced vault contract constants (KAVA_DEPOSIT_VAULT, ARB_DEPOSIT_VAULT) with mapped stablecoins (KAVA_USDT, ARB_USDC). Implemented scrubVaultTvl TVL calculator for kava and arbitrum networks that fetches vault totalVaultValue and aggregates to TVL output. Updated module exports to include new scrubVaultTvl alongside existing lionStaking.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

A scrubby vault grows tall and bright,
With vaults in Kava, gleaming bright,
And Arbitrum's coins flow deep,
TVL tallies we shall keep,
Two networks dance in dappled light! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding ScrubVault DepositVault TVL tracking to the scrub project for two networks.
Description check ✅ Passed The PR description provides comprehensive context including summary, vault mechanics, contract addresses, and clarification on double-counting prevention, though it doesn't follow the template's structure for new listings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
projects/scrub/index.js (1)

72-91: Consider adding methodology export for transparency.

Since the TVL is based on an admin-updatable totalVaultValue (AUM from off-chain strategies) rather than on-chain token balances, you may want to add a methodology field to document this for users browsing DefiLlama. This helps set expectations that TVL accuracy depends on timely admin updates.

// Example:
methodology: "ScrubVault TVL is calculated from the on-chain totalVaultValue variable, which represents assets under management deployed off-chain in delta-neutral strategies. This value is updated by the protocol when rewards are distributed."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/scrub/index.js` around lines 72 - 91, Add a public `methodology`
export describing that TVL uses the on-chain `totalVaultValue` AUM
(admin-updatable) rather than token balance snapshots; update the module that
defines `scrubVaultTvl` so it exports a `methodology` string (alongside the
existing `kava` and `arbitrum` tvl entries) that clearly states the TVL source,
that it represents off-chain/deployed assets in delta-neutral strategies, and
that accuracy depends on admin updates to `totalVaultValue` (reference
`scrubVaultTvl`, `totalVaultValue`, `KAVA_DEPOSIT_VAULT`, and
`ARB_DEPOSIT_VAULT` to locate the code).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@projects/scrub/index.js`:
- Around line 72-91: Add a public `methodology` export describing that TVL uses
the on-chain `totalVaultValue` AUM (admin-updatable) rather than token balance
snapshots; update the module that defines `scrubVaultTvl` so it exports a
`methodology` string (alongside the existing `kava` and `arbitrum` tvl entries)
that clearly states the TVL source, that it represents off-chain/deployed assets
in delta-neutral strategies, and that accuracy depends on admin updates to
`totalVaultValue` (reference `scrubVaultTvl`, `totalVaultValue`,
`KAVA_DEPOSIT_VAULT`, and `ARB_DEPOSIT_VAULT` to locate the code).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 987005a8-8161-4ec2-a8ea-db46a6cd98cd

📥 Commits

Reviewing files that changed from the base of the PR and between 6ca9469 and 0078b30.

📒 Files selected for processing (1)
  • projects/scrub/index.js

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.

1 participant