Skip to content

[VPD-954] XVS Vault reward and prime reward adjustment#691

Merged
fred-venus merged 3 commits intomainfrom
feat/VPD-954
Apr 3, 2026
Merged

[VPD-954] XVS Vault reward and prime reward adjustment#691
fred-venus merged 3 commits intomainfrom
feat/VPD-954

Conversation

@Debugger022
Copy link
Copy Markdown
Contributor

@Debugger022 Debugger022 commented Apr 2, 2026

VIP-607: Apr Prime Allocation, Q2 XVS Vault Rewards & THE Token Withdrawal

Summary

This VIP bundles three protocol actions on BNB Chain:

  1. Adjust Prime Rewards allocation for April 2026, distributing $29.6K in rewards exclusively to USDT suppliers.
  2. Redistribute Q1 2026 XVS Buybacks to XVS Vault stakers by transferring 110,382 XVS to the XVS Store and updating the reward speed to 1,846.6 XVS/day.
  3. Withdraw all THE tokens (~2.43M THE) from five protocol contracts and transfer to the Finance Team for OTC liquidation.

1. [BNB Chain] Prime Rewards Allocation — April 2026

Context

In March 2026, Venus generated $164.3K in reserves revenue on BNB Chain. Of this, $32.9K (20%) is allocated to Prime and will be distributed as rewards in April 2026. This allocation is retroactive, redistributing revenue generated through March 2026.

Proposed Allocation

  • Allocate $29.6K in Prime rewards, while maintaining a 10% buffer for market price fluctuations and to avoid full depletion.
  • Rewards directed exclusively to the USDT stablecoin supply side, with speeds adjusted to allocate the full $29.6K to USDT suppliers.
  • Starting May, we are considering introducing U as a second Prime reward market, with a tentative 50/50 split between USDT and U supply. The final split will be reviewed based on U market performance and reserve contribution at that time.
  • Focusing rewards on the supply side helps strengthen liquidity and create conditions for lower borrow rates. In contrast, rewarding both sides tends to create arbitrage opportunities, artificially inflating activity and driving up borrow rates for other users.

Analysis

  • Overall USDT supply declined from $260.8M to $232.5M (-10.9%), and borrowing declined from $150.8M to $125.8M (-16.6%), reflecting broader market contraction in March.
  • Prime user supply remained resilient at $56.5M (-0.6%), outperforming the overall market by ~10 percentage points.
  • USDT reserve revenue decreased from $44.0K to $38.0K (-13.7%), reflecting lower borrow activity. The market remains the primary revenue contributor and continues to justify its dominant share of Prime rewards.

2. [BNB Chain] Q2 XVS Buyback & Vault Reward Adjustment

Context

This action redistributes Q1 2026 XVS Buybacks to XVS stakers, in accordance with Tokenomics V4.1, by transferring the buybacks to the XVS Store and adjusting the reward speed on BNB Chain.

Per VIP-585, Prime Rewards and XVS Vault Rewards are only distributed on chains that generate at least $50K in average monthly revenue over a rolling 6-month period. Currently, only BNB Chain meets this threshold.

Q1 2026 Protocol Fees (BNB Chain)

  • Reserves: $583,709
  • Liquidation Fees: $1,772,149
  • Total: $2,355,858

Tokenomics Allocations

  • XVS Buybacks: $471,172 (110,382 XVS converted)
  • Venus Prime: $116,742
  • Treasury: $1,296,773
  • Risk Fund: $471,172

Q2 2026 XVS Vault Rewards

The XVS available for Vault Rewards will come from:

  1. XVS Buybacks accumulated throughout Q1 in the XVS Vault Treasury.
  2. Any spare XVS remaining in the XVS Store (assuming 06-Apr-26 execution date).
  3. A fixed Base Reward allocation of 308.7 XVS/day on BNB Chain only.

Any Buyback allocation in the XVS Converter that has not yet been converted to XVS ($4,813 remaining) will not be taken into account in the Rewards distribution this quarter.

Actions

  • Transfer 110,382 XVS from the XVS Vault Treasury to the XVS Store.
  • Set the new XVS Vault reward speed to 1,846.606 XVS/day (0.00962 XVS/block), which includes Q1 buybacks + 308.7 XVS/day Base Rewards.

3. [BNB Chain] Withdraw THE from Protocol Contracts

Context

Following the THE market incident, on-chain liquidity for THE has deteriorated significantly. The token converters are unable to swap THE into useful assets at reasonable rates, and the situation is unlikely to improve. Leaving these tokens idle in the contracts means their value will continue to erode over time.

THE Balances (queried 2026-04-02)

Contract Address THE Balance
Treasury 0xf322942f644a996a617bd29c16bd7d231d9f35e9 1,553,573.82
RiskFundConverter 0xA5622D276CcbB8d9BBE3D1ffd1BB11a0032E53F0 493,362.81
XVSVaultConverter 0xd5b9AE835F4C59272032B3B954417179573331E0 377,544.57
ProtocolShareReserve 0xCa01D5A9A248a830E9D93231e791B1afFed7c446 5,809.84
USDTPrimeConverter 0xD9f101AA67F3D72662609a2703387242452078C3 2,972.98
Total 2,433,264.02

Actions

  • Withdraw THE from Treasury, RiskFundConverter, XVSVaultConverter, ProtocolShareReserve, and USDTPrimeConverter
  • Transfer all THE to the Finance Team for OTC liquidation on a best-effort basis
  • Proceeds will be allocated toward protocol operational expenses

References

Summary by CodeRabbit

  • New Features

    • Added VIP-607 governance proposal for BSC mainnet including token withdrawal and transfer operations
    • THE token withdrawal from treasury and converter contracts with transfer to OTC wallet
    • XVS vault reward speed update for BSC
    • Prime Liquidity Provider token distribution speed configuration for USDT
  • Tests

    • Added integration test suite to verify VIP-607 proposal behavior and token balance updates

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 2, 2026

📝 Walkthrough

Walkthrough

This pull request introduces VIP-607, a governance proposal that adds contract interface definitions (ABIs) for PrimeLiquidityProvider, XVS, and XVSVault, along with a proposal module and integration tests. The VIP executes THE token withdrawals from treasury and converter contracts, adjusts XVS vault reward distributions, and updates Prime token distribution speeds on BNB Chain.

Changes

Cohort / File(s) Summary
Contract ABI Definitions
simulations/vip-607/abi/PrimeLiquidityProvider.json, simulations/vip-607/abi/XVS.json, simulations/vip-607/abi/XVSVault.json, simulations/vip-607/abi/erc20.json
Added four ABI schema files defining contract interfaces: PrimeLiquidityProvider (token distribution and admin functions), XVS (ERC20 with pausing and blacklist controls), XVSVault (staking/rewards with delegation), and generic ERC20 (with role-based access and meta-transactions).
Governance Proposal Implementation
vips/vip-607/bscmainnet.ts
Defined VIP-607 proposal that executes three ordered actions: withdrawing THE tokens from treasury and converter contracts to OTC wallet, funding XVS vault treasury and updating XVS emission speed, and adjusting Prime distribution speed for USDT via PrimeLiquidityProvider. Exported contract addresses and precomputed token amounts.
Integration Test Suite
simulations/vip-607/bscmainnet.ts
Added fork-based integration tests verifying post-VIP behavior: THE token sweeps, XVS treasury transfers, XVSVault reward speed updates, and PrimeLiquidityProvider token distribution speed adjustments. Captures and validates pre-VIP balances against expected post-VIP state.

Sequence Diagram

sequenceDiagram
    participant Gov as Governance<br/>(Proposal)
    participant Treas as Treasury &<br/>Converters
    participant OTC as OTC Wallet
    participant XVSVault as XVS Vault
    participant Store as XVS Store
    participant Prime as Prime<br/>Liquidity Provider

    Gov->>Treas: Withdraw THE tokens
    Treas-->>Gov: Transfer THE
    Gov->>OTC: Sweep THE to wallet
    OTC-->>Gov: Confirm receipt

    Gov->>Treas: Transfer XVS from<br/>vault treasury
    Treas-->>Store: XVS moved
    Store-->>Gov: Confirm transfer

    Gov->>XVSVault: Update XVS<br/>emission speed
    XVSVault-->>Gov: Speed updated

    Gov->>Prime: Set USDT token<br/>distribution speed
    Prime-->>Gov: Speed configured
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Through contracts stacked like burrows deep,
The VIP hops where tokens sweep,
THE to wallets, XVS flows,
Prime speeds quicken as it goes!
A governance thump, a proposal's cheer, 🎉
VIP-607 bounces here!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main changes: adjusting XVS Vault rewards and Prime rewards allocation, which are the two primary governance actions in this VIP-607 changeset.
Description check ✅ Passed The PR description is comprehensive and well-structured, providing detailed context, analysis, and justification for all three major actions (Prime rewards allocation, XVS Vault rewards redistribution, and THE token withdrawal), exceeding the minimal template requirements.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/VPD-954

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.

@Debugger022 Debugger022 marked this pull request as ready for review April 2, 2026 14:01
Copy link
Copy Markdown

@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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
vips/vip-900/bscmainnet.ts (1)

12-12: Consider using checksummed address for OTC_WALLET.

The address is all lowercase (0x5e7bb1f600e42bc227755527895a282f782555ec), which bypasses EIP-55 checksum validation. Using the checksummed version would help catch typos.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vips/vip-900/bscmainnet.ts` at line 12, The OTC_WALLET constant is using a
lowercase address which bypasses EIP-55 checksum; update the OTC_WALLET value to
the EIP-55 checksummed version by computing the checksum (for example with
ethers.utils.getAddress or web3.utils.toChecksumAddress) and replace the current
string in the OTC_WALLET export with that checksummed address so the module uses
a checksummed Ethereum address.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vips/vip-900/bscmainnet.ts`:
- Around line 17-20: The hardcoded THE token amounts (THE_AMOUNT_TREASURY,
THE_AMOUNT_RISK_FUND_CONVERTER, THE_AMOUNT_XVS_VAULT_CONVERTER,
THE_AMOUNT_USDT_PRIME_CONVERTER) may be stale and cause withdrawTreasuryBEP20 /
sweepToken calls to revert; change the flow to read the actual on‑chain token
balances at execution time instead of using fixed constants (e.g., call the
token contract's balanceOf for the treasury/converter/vault addresses) and pass
those runtime balances into withdrawTreasuryBEP20 or use a sweep-all mechanism
that withdraws the full available balance, ensuring functions like
withdrawTreasuryBEP20 and sweepToken receive live balances rather than snapshot
constants.

---

Nitpick comments:
In `@vips/vip-900/bscmainnet.ts`:
- Line 12: The OTC_WALLET constant is using a lowercase address which bypasses
EIP-55 checksum; update the OTC_WALLET value to the EIP-55 checksummed version
by computing the checksum (for example with ethers.utils.getAddress or
web3.utils.toChecksumAddress) and replace the current string in the OTC_WALLET
export with that checksummed address so the module uses a checksummed Ethereum
address.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b0229620-589d-46cf-be49-3dc2707c1108

📥 Commits

Reviewing files that changed from the base of the PR and between 0f14d26 and bb21bd4.

📒 Files selected for processing (6)
  • simulations/vip-900/abi/PrimeLiquidityProvider.json
  • simulations/vip-900/abi/XVS.json
  • simulations/vip-900/abi/XVSVault.json
  • simulations/vip-900/abi/erc20.json
  • simulations/vip-900/bscmainnet.ts
  • vips/vip-900/bscmainnet.ts

Comment on lines +17 to +20
export const THE_AMOUNT_TREASURY = parseUnits("1555897.757296354509715841", 18);
export const THE_AMOUNT_RISK_FUND_CONVERTER = parseUnits("494524.778581486569340203", 18);
export const THE_AMOUNT_XVS_VAULT_CONVERTER = parseUnits("378706.534208351568523680", 18);
export const THE_AMOUNT_USDT_PRIME_CONVERTER = parseUnits("4134.951547843396807519", 18);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify THE token balances at the specified contracts match the VIP amounts

THE="0xF4C8E32EaDEC4BFe97E0F595AdD0f4450a863a11"
TREASURY="0xF322942f644A996A617BD29c16bd7d231d9F35E9"
RISK_FUND_CONVERTER="0xA5622D276CcbB8d9BBE3D1ffd1BB11a0032E53F0"
XVS_VAULT_CONVERTER="0xd5b9AE835F4C59272032B3B954417179573331E0"
USDT_PRIME_CONVERTER="0xD9f101AA67F3D72662609a2703387242452078C3"

# Check if amounts in VIP match expected (this is a placeholder - actual verification needs on-chain query)
echo "VIP amounts to verify:"
echo "Treasury: 1555897.757296354509715841 THE"
echo "RiskFundConverter: 494524.778581486569340203 THE"
echo "XVSVaultConverter: 378706.534208351568523680 THE"
echo "USDTPrimeConverter: 4134.951547843396807519 THE"
echo ""
echo "Note: These amounts must match the exact on-chain balances at execution time."
echo "If balances accrue or change between snapshot and execution, the sweepToken calls may fail."

Repository: VenusProtocol/vips

Length of output: 442


🏁 Script executed:

# Explore VIP-900 structure
find . -path "*vip-900*" -type f | head -20

Repository: VenusProtocol/vips

Length of output: 292


🏁 Script executed:

# Read the bscmainnet.ts file to see the actual code and context
cat -n vips/vip-900/bscmainnet.ts | head -50

Repository: VenusProtocol/vips

Length of output: 3307


🏁 Script executed:

# Check if there's an amounts.ts or similar documentation file for VIP-900
find . -path "*vip-900*" -name "*amount*" -o -path "*vip-900*" -name "*.md"

Repository: VenusProtocol/vips

Length of output: 44


🏁 Script executed:

# Search for THE token references in the VIP-900 directory
rg "THE_AMOUNT|0xF4C8E32EaDEC4BFe97E0F595AdD0f4450a863a11" vips/vip-900/ -A 2 -B 2

Repository: VenusProtocol/vips

Length of output: 2545


🏁 Script executed:

# Check simulation files for VIP-900
ls -la simulations/vip-900/

Repository: VenusProtocol/vips

Length of output: 296


🏁 Script executed:

# Look for any documentation or test that references these amounts
rg "1555897|494524|378706|4134\.95" simulations/ --type ts --type js

Repository: VenusProtocol/vips

Length of output: 44


🏁 Script executed:

# Check if there's a PR description or discussion about these amounts
git log --oneline --all | grep -i "vip-900\|THE.*withdrawal" | head -10

Repository: VenusProtocol/vips

Length of output: 457


🏁 Script executed:

# Look at the full vips/vip-900/bscmainnet.ts file to understand the complete context
cat -n vips/vip-900/bscmainnet.ts | tail -100

Repository: VenusProtocol/vips

Length of output: 5664


Confirm THE token amounts match the most recent on-chain balance snapshot.

The exact amounts specified (with 18 decimal precision) suggest a prior balance snapshot was taken, but verify that contract balances have not accrued or changed between that snapshot and VIP execution time. If the snapshot is stale, the withdrawTreasuryBEP20 and sweepToken calls will revert. Consider taking a final on-chain balance check immediately before execution, or use a mechanism to sweep the full available balance if the intent is to recover all THE holdings.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vips/vip-900/bscmainnet.ts` around lines 17 - 20, The hardcoded THE token
amounts (THE_AMOUNT_TREASURY, THE_AMOUNT_RISK_FUND_CONVERTER,
THE_AMOUNT_XVS_VAULT_CONVERTER, THE_AMOUNT_USDT_PRIME_CONVERTER) may be stale
and cause withdrawTreasuryBEP20 / sweepToken calls to revert; change the flow to
read the actual on‑chain token balances at execution time instead of using fixed
constants (e.g., call the token contract's balanceOf for the
treasury/converter/vault addresses) and pass those runtime balances into
withdrawTreasuryBEP20 or use a sweep-all mechanism that withdraws the full
available balance, ensuring functions like withdrawTreasuryBEP20 and sweepToken
receive live balances rather than snapshot constants.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
vips/vip-607/bscmainnet.ts (1)

11-12: Consider using checksummed address format for consistency.

OTC_WALLET uses lowercase hex (0x5e7bb1f600e42bc227755527895a282f782555ec) while other addresses in the file use mixed-case checksums. While both are valid, using checksummed addresses consistently provides an additional layer of validation against typos.

🔧 Suggested fix
-export const OTC_WALLET = "0x5e7bb1f600e42bc227755527895a282f782555ec";
+export const OTC_WALLET = "0x5e7Bb1F600e42Bc227755527895A282f782555Ec";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vips/vip-607/bscmainnet.ts` around lines 11 - 12, OTC_WALLET is stored in
all-lowercase while other constants like THE use EIP-55 checksummed mixed-case;
update the OTC_WALLET constant to its checksummed address (replace the lowercase
0x5e7bb1f600e42bc227755527895a282f782555ec with the EIP-55 checksummed variant)
so all exported addresses in this module use a consistent checksummed format and
reduce typo risk.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vips/vip-607/bscmainnet.ts`:
- Around line 125-126: Update the proposal description to remove the incorrect
mention of ProtocolShareReserve/PSR from the "Withdraw THE from..." list or
explicitly note PSR was already released; change the sentence referencing
"Withdraw THE from Treasury, RiskFundConverter, XVSVaultConverter,
ProtocolShareReserve, and USDTPrimeConverter" to accurately list only the four
contracts (Treasury, RiskFundConverter, XVSVaultConverter, and
USDTPrimeConverter) or append "(PSR THE already released to the other
contracts)" so the description matches the actual actions in this file
(references: ProtocolShareReserve / PSR and the four sweep targets).

---

Nitpick comments:
In `@vips/vip-607/bscmainnet.ts`:
- Around line 11-12: OTC_WALLET is stored in all-lowercase while other constants
like THE use EIP-55 checksummed mixed-case; update the OTC_WALLET constant to
its checksummed address (replace the lowercase
0x5e7bb1f600e42bc227755527895a282f782555ec with the EIP-55 checksummed variant)
so all exported addresses in this module use a consistent checksummed format and
reduce typo risk.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c324a45e-7990-4bf3-86a2-bcd11721c6b8

📥 Commits

Reviewing files that changed from the base of the PR and between bb21bd4 and a516414.

📒 Files selected for processing (6)
  • simulations/vip-607/abi/PrimeLiquidityProvider.json
  • simulations/vip-607/abi/XVS.json
  • simulations/vip-607/abi/XVSVault.json
  • simulations/vip-607/abi/erc20.json
  • simulations/vip-607/bscmainnet.ts
  • vips/vip-607/bscmainnet.ts
✅ Files skipped from review due to trivial changes (4)
  • simulations/vip-607/abi/XVS.json
  • simulations/vip-607/abi/PrimeLiquidityProvider.json
  • simulations/vip-607/abi/erc20.json
  • simulations/vip-607/abi/XVSVault.json

Comment on lines +125 to +126
- Withdraw THE from Treasury, RiskFundConverter, XVSVaultConverter, ProtocolShareReserve, and USDTPrimeConverter
- Transfer all THE to the Finance Team for OTC liquidation on a best-effort basis
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Minor description inconsistency: PSR is listed but not actually withdrawn from.

The actions list mentions "Withdraw THE from... ProtocolShareReserve" but no corresponding proposal action exists for PSR (correctly, since PSR lacks sweepToken). Consider updating this line to reflect that PSR THE has already been released to the other four contracts as noted on line 119, and only four contracts are being swept.

📝 Suggested description fix
-- Withdraw THE from Treasury, RiskFundConverter, XVSVaultConverter, ProtocolShareReserve, and USDTPrimeConverter
+- Withdraw THE from Treasury, RiskFundConverter, XVSVaultConverter, and USDTPrimeConverter (PSR funds were previously released to these contracts)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vips/vip-607/bscmainnet.ts` around lines 125 - 126, Update the proposal
description to remove the incorrect mention of ProtocolShareReserve/PSR from the
"Withdraw THE from..." list or explicitly note PSR was already released; change
the sentence referencing "Withdraw THE from Treasury, RiskFundConverter,
XVSVaultConverter, ProtocolShareReserve, and USDTPrimeConverter" to accurately
list only the four contracts (Treasury, RiskFundConverter, XVSVaultConverter,
and USDTPrimeConverter) or append "(PSR THE already released to the other
contracts)" so the description matches the actual actions in this file
(references: ProtocolShareReserve / PSR and the four sweep targets).

@fred-venus
Copy link
Copy Markdown
Contributor

@fred-venus fred-venus merged commit e506af9 into main Apr 3, 2026
6 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.

2 participants