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
Inflated ETH Conversion in Numa to ETH conversion from vault in getNbOfNuAssetFromNuma
Summary
The getNbOfNuAssetFromNuma function in the NumaPrinter contract incorrectly calculates the ETH equivalent of Numa tokens due to an inflated buy fee applied in the numaToEth function of the VaultManager contract. This results in an inaccurate conversion rate from vault when minting nuAssets.
This leads to an incorrect ETH equivalent for the Numa tokens passed in the vaultmanager
Internal pre-conditions
numaToEth is called with PriceType.BuyPrice.
Buy fee is applied within numaToEth function in Vaultmanager
External pre-conditions
getNbOfNuAssetFromNuma is called to convert Numa to nuAssets.
VaultManager is integrated with NumaPrinter.
Attack Path
User calls getNbOfNuAssetFromNuma through mintAssetFromNumaInput numaToEth inflates ETH value due to buy fee.
Impact
The inflated ETH conversion causes the system to default to using the pool price for nuAsset minting, even when the vault price would be more favorable.
Damaged Hazelnut Wolverine
Medium
Inflated ETH Conversion in Numa to ETH conversion from vault in
getNbOfNuAssetFromNuma
Summary
The
getNbOfNuAssetFromNuma
function in theNumaPrinter
contract incorrectly calculates the ETH equivalent ofNuma
tokens due to an inflated buy fee applied in thenumaToEth
function of theVaultManager
contract. This results in an inaccurate conversion rate from vault when mintingnuAssets
.Root Cause
https://github.com/sherlock-audit/2024-12-numa-audit/blob/ae1d7781efb4cb2c3a40c642887ddadeecabb97d/Numa/contracts/NumaProtocol/NumaPrinter.sol#L354
The
numaToEth
function in theVaultManager
contract applies a buy fee to the ETH amount returned by inflating the value returned with buy feeThis leads to an incorrect ETH equivalent for the Numa tokens passed in the vaultmanager
Internal pre-conditions
numaToEth is called with PriceType.BuyPrice.
Buy fee is applied within numaToEth function in
Vaultmanager
External pre-conditions
getNbOfNuAssetFromNuma
is called to convert Numa to nuAssets.VaultManager is integrated with NumaPrinter.
Attack Path
User calls
getNbOfNuAssetFromNuma
throughmintAssetFromNumaInput
numaToEth
inflates ETH value due to buy fee.Impact
The inflated ETH conversion causes the system to default to using the pool price for nuAsset minting, even when the vault price would be more favorable.
PoC
No response
Mitigation
The text was updated successfully, but these errors were encountered: