Quantum Audit Logo

Is Yield Basis Safe?

On-chain security analysis — is it a scam or legit?

Is this your token? Publish your own audit on this page →

Yield Basis YB
0x0179…45ff
Ethereum Not verifiedLast checked 3d ago 1 audit on record
Executive SummaryAI Copilot

The YBToken contract implements a custom ERC-20 token with an exponential emission schedule. The audit identified a critical bug in the emission calculation formula, which could lead to incorrect token minting or system failure. A high-severity access control issue exists where the emission mechanism can be permanently disabled if the minter role is not correctly configured before ownership is renounced. The contract also uses an outdated Vyper compiler version, increasing potential risks.

1 Critical1 High1 Medium1 Low1 Informational
Volume 24h
$83.5K
Liquidity
$1.19M
Price
$0.09652
Token Age
9mo
Top 10 Holders
86.2%

Security Findings

Critical

Critical Emission Calculation Bug

C-01The `_emissions` function, central to the token's supply mechanism, contains a syntax error and a potential logical flaw in the argument passed to `math._wad_exp`. The line `reserve * (10**18 - math._wad_exp(-dt * rate_36 uint256))` is syntactically incorrect (the `uint256` after `rate_36` is misplaced) and `rate_36` is calculated as `max_mint_rate * rate_factor`, where `max_mint_rate` is already scaled by `10**18`. This over-scaling of the `_wad_exp` argument could lead to `_wad_exp` returning 0 prematurely, causing `amount` to be equal to `reserve` (minting the entire reserve in one go), or causing reverts due to extreme input values, effectively bricking the emission mechanism.
IssueThe `_emissions` function, central to the token's supply mechanism, contains a syntax error and a potential logical flaw in the argument passed to `math._wad_exp`. The line `reserve * (10**18 - math._wad_exp(-dt * rate_36 uint256))` is syntactically incorrect (the `uint256` after `rate_36` is misplaced) and `rate_36` is calculated as `max_mint_rate * rate_factor`, where `max_mint_rate` is already scaled by `10**18`. This over-scaling of the `_wad_exp` argument could lead to `_wad_exp` returning 0 prematurely, causing `amount` to be equal to `reserve` (minting the entire reserve in one go), or causing reverts due to extreme input values, effectively bricking the emission mechanism.
FixCorrect the syntax error in the `_emissions` function. Carefully review the scaling of `rate_36` and the expected input for `math._wad_exp` to ensure the emission formula behaves as intended. The argument to `_wad_exp` typically represents a rate per unit time, often requiring division by `10**18` if the rate itself is WAD-scaled.
StatusUnresolved
High

Irreversible Minter Bricking Risk

H-01The `renounce_ownership` function transfers ownership to the zero address, making the contract ownerless. Concurrently, it sets `erc20.is_minter[msg.sender] = False`, revoking the deployer's minting privileges. If the `set_minter` function (which is owner-restricted) is not called by the deployer *before* renouncing ownership to grant minting rights to a designated entity (like a `GaugeController`), the contract will become permanently unable to mint new tokens, rendering its core emission functionality inoperable.
IssueThe `renounce_ownership` function transfers ownership to the zero address, making the contract ownerless. Concurrently, it sets `erc20.is_minter[msg.sender] = False`, revoking the deployer's minting privileges. If the `set_minter` function (which is owner-restricted) is not called by the deployer *before* renouncing ownership to grant minting rights to a designated entity (like a `GaugeController`), the contract will become permanently unable to mint new tokens, rendering its core emission functionality inoperable.
FixEnsure that the `set_minter` function is called by the deployer to authorize the intended minter (e.g., `GaugeController`) *before* `renounce_ownership` is executed. Implement clear deployment and post-deployment procedures to prevent this critical misconfiguration. Consider adding a check in `renounce_ownership` to ensure at least one minter is active before allowing ownership renunciation, or allow a specific role to set minters even after ownership is renounced (though this goes against the…
StatusUnresolved
Medium

Outdated Vyper Version and Libraries

M-01The contract is compiled with Vyper 0.4.3, which is an outdated version of the language. This version may contain known or undiscovered compiler bugs and lacks modern security features and optimizations present in current Vyper releases. Additionally, the `snekmate` libraries used are likely also outdated, potentially introducing further vulnerabilities or non-standard behaviors.
IssueThe contract is compiled with Vyper 0.4.3, which is an outdated version of the language. This version may contain known or undiscovered compiler bugs and lacks modern security features and optimizations present in current Vyper releases. Additionally, the `snekmate` libraries used are likely also outdated, potentially introducing further vulnerabilities or non-standard behaviors.
FixMigrate the contract to a modern, audited Vyper version (e.g., 0.3.x) and update to actively maintained and audited libraries. Thoroughly re-audit the contract after migration to ensure no new issues are introduced and all existing logic remains correct.
StatusUnresolved
Low

Lack of Emergency Pause Mechanism

L-01The contract lacks a mechanism to pause critical functions like `emit` in case of an emergency, such as a discovered vulnerability or an economic exploit. This could leave the protocol vulnerable to rapid exploitation without a way to mitigate ongoing damage.
IssueThe contract lacks a mechanism to pause critical functions like `emit` in case of an emergency, such as a discovered vulnerability or an economic exploit. This could leave the protocol vulnerable to rapid exploitation without a way to mitigate ongoing damage.
FixConsider implementing a pause mechanism for the `emit` function. This mechanism should be controlled by a trusted multi-signature wallet or a governance process, allowing for a temporary halt of emissions in emergencies. Given the ownerless design, this would need to be integrated carefully, perhaps allowing a designated `GaugeController` or a separate governance contract to trigger a pause.
StatusUnresolved
Info

Implicit Trust in Designated Minter

I-01The contract's design, particularly after ownership renunciation, places implicit trust in an external `GaugeController` (or similar designated minter) to manage token emissions responsibly. The `emit` function's `rate_factor` parameter allows the minter to control the percentage of inflation. The security of the token's supply and economic model heavily relies on the designated minter's implementation, its own access controls, and its resistance to manipulation.
IssueThe contract's design, particularly after ownership renunciation, places implicit trust in an external `GaugeController` (or similar designated minter) to manage token emissions responsibly. The `emit` function's `rate_factor` parameter allows the minter to control the percentage of inflation. The security of the token's supply and economic model heavily relies on the designated minter's implementation, its own access controls, and its resistance to manipulation.
FixConduct a thorough audit of the `GaugeController` contract (or any designated minter) that will interact with this `YBToken`. Ensure its access control mechanisms are robust, its logic is sound, and it cannot be manipulated to mint tokens maliciously or in an unintended manner.
StatusUnresolved

Category Ratings

TechnicalMedium5/10

The contract implements a custom ERC-20 token with an exponential emission model. The architecture is straightforward, leveraging `snekmate` libraries for standard ERC-20 and ownership functionalities. However, a critical bug was identified in the `_emissions` calculation (7.2 Code Security), potentially leading to incorrect token minting or system failure. Additionally, the contract uses an outdated Vyper compiler version (7.2 Code Security), which may expose it to known vulnerabilities. Access control (7.3 Access Control) for minting is based on a minter role, which can be irreversibly misconfigured.

GovernanceMedium4/10

The economic model is based on a continuous exponential emission schedule, designed to deplete a fixed `reserve` over time. The `max_mint_rate` and `reserve` are set at deployment, making the core parameters immutable. A critical bug in the emission calculation (7.4 Economic) directly threatens the intended tokenomics. The system relies on a designated minter (e.g., `GaugeController`) to manage the `rate_factor`, which dictates the actual emission rate. The irreversible ownerless state combined with the minter setup (7.5 Governance) presents a high risk of bricking the emission mechanism if not configured precisely during deployment.

UpgradesMedium5/10

The contract is not designed with upgradeability in mind, meaning its logic is immutable once deployed. This eliminates risks associated with upgrade mechanisms (7.7 Upgrades) but also prevents any future bug fixes or feature enhancements without a full redeployment and migration.

Security Checklist

Contract VerifiedPass
Ownership RenouncedPass
No Mint FunctionFail
Liquidity LockedFail
Not a ProxyPass

Holder Composition

4.8% in wallets81.4% in contracts
Effective Concentration37.4%

Share held by contracts — treasury, vesting, bridge or staking — is discounted against share held by wallets when the score is computed: a contract cannot decide to sell the way an anonymous holder can, though it can still be drained or voted to sell. Effective concentration is the figure the risk score is actually calculated from.

Liquidity Depth

The risk score reads depth across every pair. The volume figure and the volume-to-liquidity ratio elsewhere on this page describe only the pair this audit analysed, so the two are not directly comparable.

LP Distribution

Top-1 Unlocked Holder88.0%
Top-3 Unlocked97.6%

Key Addresses

Deployer
0xa39e…c80d
Unlocked LP Held By
0xda21…e12f0x0a44…d0090xf32b…f01b0x6c7f…a1bb0x8d8a…2d6b0x577b…b1cc0x0a83…11b50x0f71…aac4

No privileged address appears among these holders: the unlocked liquidity sits with independent providers, not with the deployer.

What Raised This Score

  • Mintable supply — no cap found, dilution unbounded
  • Top-10 concentration > 30% (86.2% total → 37.4% effective; 4.8% in EOAs, 81.4% in contracts — moderate)
  • Liquidity not locked, but no owner/deployer address holds LP — market-depth risk, not rug risk
  • LP top1 unlocked holder = 88.0% (independent LP — depth risk, pool = 97% of DEX liquidity)
  • LP top3 unlocked holders = 97.6% (independent LP — depth risk, pool = 97% of DEX liquidity)
  • 1 Critical finding(s) from audit
  • 1 High finding(s) from audit
  • 1 Medium finding(s) from audit
  • 1 Low finding(s) from audit

Each factor is an on-chain fact recorded at the time of this analysis. The score is computed from them by a deterministic function, so the same contract returns the same score for anyone who runs the audit. How scores are computed

Related Audits

Ethena (ENA)High RiskEigenCloud (prev. EigenLayer) (EIGEN)High RiskOlympus (OHM)High RiskFabric Protocol (ROBO)High RiskUSDeHigh RiskVirtuals Protocol (VIRTUAL)High Risk

Would You Like a More Detailed Audit of Yield Basis?

Our AI-powered scanner gives you a deeper, real-time smart contract analysis — free, with every scoring factor shown.

Get Detailed Audit