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
User gets fewer Numa tokens when burning nuAsset tokens
Summary
Incorrect calculation in NumaPrinter.sol results in user getting fewer Numa tokens when burning nuAsset tokens to mint Numa tokens
Root Cause
In NumaPrinter.sol, a wrong calculation is done to get the highest amount between the amount of Numa generated from the Vault buy price and the amount of Numa generated LP Price, and this results a lower amount of Numa returned to burnAssetInputToNuma.
Internal pre-conditions
User needs to call burnAssetInputToNuma when vault buy price != LP Price
External pre-conditions
No response
Attack Path
User calls burnAssetInputToNuma when vault buy price != LP Price
getNbOfNumaFromAssetWithFeeis called to fetch the max amount of Numa minted from burning _nuAssetAmount
Higher amount of Numa between vault buy price amountnumaAmountVault and LP price amount numaAmountPrice is returned
Impact
The user receives less Numa tokens than should be sent, when burning nuAssetAmount of nuAsset tokens.
Slow Sky Puma
Medium
User gets fewer Numa tokens when burning nuAsset tokens
Summary
Incorrect calculation in NumaPrinter.sol results in user getting fewer Numa tokens when burning nuAsset tokens to mint Numa tokens
Root Cause
In NumaPrinter.sol, a wrong calculation is done to get the highest amount between the amount of Numa generated from the Vault buy price and the amount of Numa generated LP Price, and this results a lower amount of Numa returned to
burnAssetInputToNuma
.Internal pre-conditions
burnAssetInputToNuma
when vault buy price != LP PriceExternal pre-conditions
No response
Attack Path
burnAssetInputToNuma
whenvault buy price != LP Price
getNbOfNumaFromAssetWithFee
is called to fetch the max amount of Numa minted from burning_nuAssetAmount
numaAmountVault
and LP price amountnumaAmountPrice
is returnedImpact
The user receives less
Numa
tokens than should be sent, when burningnuAssetAmount
ofnuAsset
tokens.PoC
No response
Mitigation
The line
should be changed to
The text was updated successfully, but these errors were encountered: