You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Incorrect Token Conversion Due to Misapplied Fee in Asset Swap
Summary
The getNbOfnuAssetNeededForNuma function in the NumaPrinter contract inaccurately calculates the ETH equivalent of Numa tokens due to a decreased sell fee applied in the numaToEth function of the VaultManager contract. T
Root Cause
The numaToEth function in the VaultManager contract decreases the ETH amount by applying a sell fee, leading to an inaccurate ETH equivalent for the Numa tokens.
Damaged Hazelnut Wolverine
Medium
Incorrect Token Conversion Due to Misapplied Fee in Asset Swap
Summary
The
getNbOfnuAssetNeededForNuma
function in the NumaPrinter contract inaccurately calculates the ETH equivalent of Numa tokens due to a decreased sell fee applied in the numaToEth function of the VaultManager contract. TRoot Cause
The numaToEth function in the VaultManager contract decreases the ETH amount by applying a sell fee, leading to an inaccurate ETH equivalent for the Numa tokens.
Internal pre-conditions
https://github.com/sherlock-audit/2024-12-numa-audit/blob/ae1d7781efb4cb2c3a40c642887ddadeecabb97d/Numa/contracts/NumaProtocol/NumaPrinter.sol#L477
numaToEth is called with PriceType.SellPrice.
Sell fee is applied within numaToEth function in VaultManager.
External pre-conditions
getNbOfnuAssetNeededForNuma is called to determine nuAsset requirements.
VaultManager is integrated with NumaPrinter.
Attack Path
User calls getNbOfnuAssetNeededForNuma.
numaToEth decreases ETH value due to sell fee.
Impact
System will default to pool price even when vault is more favourabe
PoC
No response
Mitigation
The text was updated successfully, but these errors were encountered: