Platform: Code4rena
Start Date: 14/04/2022
Pot Size: $75,000 USDC
Total HM: 8
Participants: 72
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 2
Id: 110
League: ETH
Rank: 31/72
Findings: 2
Award: $275.64
🌟 Selected for report: 0
🚀 Solo Findings: 0
Function getAmountOut(_assetAmountIn)
fails to handle the case for funding.discount == 0
function getAmountOut(uint256 _assetAmountIn) public view returns (uint256 citadelAmount_) { uint256 citadelAmountWithoutDiscount = _assetAmountIn * citadelPriceInAsset; if (funding.discount > 0) { citadelAmount_ = (citadelAmountWithoutDiscount * MAX_BPS) / (MAX_BPS - funding.discount); } // @audit-issue // if `funding.discount == 0`, `citadelAmount_` will be returned with default initialized value (i.e 0) citadelAmount_ = citadelAmount_ / assetDecimalsNormalizationValue; }
Manual review
#0 - GalloDaSballo
2022-04-23T01:31:05Z
Yes, dup of many others
#1 - jack-the-pug
2022-05-29T07:10:56Z
Dup #149
🌟 Selected for report: IllIllI
Also found by: 0v3rf10w, 0x1f8b, 0xDjango, 0xkatana, AmitN, CertoraInc, Dravee, Funen, Hawkeye, Jujic, MaratCerby, Picodes, Ruhum, SolidityScan, TerrierLover, TomFrenchBlockchain, TrungOre, VAD37, Yiko, berndartmueller, cmichel, csanuragjain, danb, defsec, delfin454000, dipp, ellahi, fatherOfBlocks, georgypetrov, gs8nrv, gzeon, horsefacts, hubble, hyh, ilan, jah, joestakey, kebabsec, kenta, kyliek, m9800, minhquanym, oyc_109, p_crypt0, peritoflores, rayn, reassor, remora, rfa, robee, scaraven, securerodd, shenwilly, sorrynotsorry, tchkvsky, teryanarmen, z3s
91.3943 USDC - $91.39
_minCitadelOut
describe it as ID of DAO.TREASURY_GOVERNANCE_ROLE
is not used anywhere in the contract KnightingRound.sol
and can be omitted.