Skip to content

Latest commit

 

History

History
23 lines (13 loc) · 864 Bytes

008.md

File metadata and controls

23 lines (13 loc) · 864 Bytes

Proud Rusty Mantis

High

Buy fee doesn't increase in a case it is supposed to

Vulnerability Detail

Upon mints/burns of nuAssets and the TWAP price being within 2% of the vault buy price, the fee should increase. This can also be confirmed by the docs:

For every $1 of nuMoney burned or minted when the $NUMA LP 15min & 30min TWAP prices are within 2% of the buy price, the buy fee increases by 0.0001%.

However, such a thing does not happen in the code. The only block reachable through a nuAsset mint/burn (due to _isVaultBuy being false), is the one where the TWAP price is more than 2.5% lower than the vault buy price, in that case the fee decreases.

Attack Path

No response

Impact

Wrong buy fee

Mitigation

Implement the intended design