Platform: Code4rena
Start Date: 18/04/2024
Pot Size: $36,500 USDC
Total HM: 19
Participants: 183
Period: 7 days
Judge: Koolex
Id: 367
League: ETH
Rank: 153/183
Findings: 1
Award: $0.28
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Maroutis
Also found by: 0x486776, 0xShitgem, 0xabhay, 0xleadwizard, 0xlemon, 0xnilay, 0xtankr, 3docSec, AM, Aamir, Abdessamed, Al-Qa-qa, AlexCzm, Circolors, CodeWasp, Daniel526, Egis_Security, Emmanuel, Giorgio, Honour, Hueber, Infect3d, Krace, KupiaSec, LeoGold, Limbooo, PoeAudits, SBSecurity, SpicyMeatball, T1MOH, The-Seraphs, TheSavageTeddy, TheSchnilch, Topmark, VAD37, ZanyBonzy, adam-idarrha, bhilare_, btk, carlitox477, cinderblock, dimulski, falconhoof, grearlake, gumgumzum, iamandreiski, itsabinashb, josephdara, ke1caM, kennedy1030, ljj, n0kto, n4nika, neocrao, oakcobalt, petro_1912, pontifex, poslednaya, shaflow2, shikhar229169, web3km, ych18, zhaojohnson, zigtur
0.2831 USDC - $0.28
https://github.com/code-423n4/2024-04-dyad/blob/main/script/deploy/Deploy.V2.s.sol#L64-L65 https://github.com/code-423n4/2024-04-dyad/blob/main/script/deploy/Deploy.V2.s.sol#L93-L95 https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L67-L91
According to Deploy.V2.s.sol
, ethVault
& wstEth
are both licensed to KeroseneManager
(L64-65) and to Licenser
(L93-L94).
As a result, a user can add both of these vaults as a normal vault and Kerosene Vault using the function VaultManagerV2.add()
and VaultManagerV2.addKerosene()
. Therefore, the function getTotalUsdValue()
will not return the correct total Usd Value as the amount deposited by the user to ethVault
& wstEth
will be counted twice. Hence the collatRatio()
will return a wrong value and a user can mint dyad
more than the system is expecting.
ethVault
& wstEth
as a normal vault and Kerosene Vault using the function VaultManagerV2.add()
and VaultManagerV2.addKerosene()
dyad
that worth 66 USD or less, but as the amount of WETH is double counted in getTotalUsdValue()
and so collatRatio()
will return a wrong value, the user can mint until an amount worth of 99 USD. This is because the function getTotalUsdValue()
will return 200*(10**oracle.deciamls())
and so collatRatio()
will return approximately 2e18.The impact of this issue is HIGH, one other impact is that if the user add a kerosene vault as a non kerosene vault, he can bypass many of the checks that uses getNonKeroseneValue()
like in L165 and L150
Other
#0 - c4-pre-sort
2024-04-28T06:47:54Z
JustDravee marked the issue as duplicate of #105
#1 - c4-pre-sort
2024-04-29T09:06:25Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-05T11:37:18Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#3 - c4-judge
2024-05-28T15:13:12Z
koolexcrypto removed the grade
#4 - c4-judge
2024-05-28T15:13:17Z
koolexcrypto marked the issue as not a duplicate
#5 - c4-judge
2024-05-28T15:13:30Z
koolexcrypto marked the issue as duplicate of #1133
#6 - c4-judge
2024-05-28T15:14:46Z
koolexcrypto marked the issue as satisfactory