Logo

Automated code reviewer for Solidity developers


status veCVX/contracts/veCVXStrategy.sol
2. Inaccurate CVX Lock Amount Derived from Ratio Difference

Severity
Finding ID BH-2021-09-bvecvx-02
Target veCVX/contracts/veCVXStrategy.sol
Function name manualRebalance

Description
The function calculates the CVX amount to lock using cvxToLock = newLockRatio.sub(currentLockRatio), where both variables are derived from a flawed comparison of ratios. Even if these ratios were correctly unit-aligned (which they are not), subtracting ratios and assuming the result maps directly to a CVX token amount introduces significant inaccuracies. The actual CVX amount needed to achieve the target lock percentage should be calculated directly based on totalCVXBalance and balanceInLock, not the difference in their relative ratios.

Key Features


Secure Your Smart Contracts Effortlessly with Bug Hunter.
Read the white-paper →





High Accuracy with
Low False Positives
  • Detects up to 70% of vulnerabilities
  • Less than 5% false positives
  • Powered by ML and Formal Methods


Fast &
Hassle-Free
  • ⚡ Scans 50+ lines per second
  • 🔌 Supports Hardhat & Foundry out of the box
  • 🛠️ No config files or dependencies
  • ☁️ Upload a ZIP or connect GitHub instantly


Comprehensive Coverage for Robust Protection
  • 🛡️ Detects 40+ vulnerability types
  • 🧮 Math & Accounting: overflows, rounding
  • 🧭 Oracle & State: timestamp and data issues
  • 🔄 Control Flow: re-entrancy, DoS

Pricing



Beta Version

Free and Unlimited

  • 💳 No credit card required
  • ♾️ Unlimited scans
  • 🚀 Full feature access
Full Version

Coming Soon

  • 🧩 Flexible pricing in development
  • 🚀 Launching with additional features
  • 📢 Stay tuned for updates

Walkthrough


Simple 3-step process



Upload Code
Drag-and-drop zip or link GitHub repo.



Automated Review
Bug Hunter's engine analyzes your code.



Get Report
Receive a comprehensive PDF audit.

Blogs




BugHunter Quick-Start Guide: Automate Your Solidity Security Reviews in Minutes
Step-by-step guide to submitting and tracking smart contract reviews using Bug Hunter.

Bug Hunter Analysis of NFT Protocols
With an overall 50% accuracy, Bug Hunter surfaced roughly half of all auditor-confirmed issues.

Bug Hunter Analysis of Yield-Farming Protocols
With an overall 46.5% hit rate, Bug Hunter removes nearly half the auditor workload on first pass.

Explore all Resources

Ready to ship with confidence?


Launch Bug Hunter
Logo
Automated code reviewer for Solidity developers.
Impressum & Privacy Policy


Projektnummer: 65004155

© 2025 Truscova. All rights reserved.