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: 89/183
Findings: 3
Award: $22.18
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: MrPotatoMagic
Also found by: 0x175, 0x486776, 0x77, 0xAkira, 0xAsen, 0xDemon, 0xabhay, 0xblack_bird, 0xlemon, 0xloscar01, 0xtankr, 3docSec, 4rdiii, Abdessamed, AlexCzm, Angry_Mustache_Man, BiasedMerc, Circolors, Cryptor, DMoore, DPS, DedOhWale, Dinesh11G, Dots, GalloDaSballo, Giorgio, Honour, Imp, Jorgect, Krace, KupiaSec, Mrxstrange, NentoR, Pechenite, PoeAudits, Ryonen, SBSecurity, Sabit, T1MOH, TheFabled, TheSavageTeddy, Tychai0s, VAD37, Vasquez, WildSniper, ZanyBonzy, adam-idarrha, alix40, asui, blutorque, btk, c0pp3rscr3w3r, caglankaan, carrotsmuggler, d_tony7470, dimulski, dinkras, djxploit, falconhoof, forgebyola, grearlake, imare, itsabinashb, josephdara, kartik_giri_47538, ke1caM, kennedy1030, koo, lionking927, ljj, niser93, pep7siup, poslednaya, ptsanev, sashik_eth, shaflow2, steadyman, turvy_fuzz, ubl4nk, valentin_s2304, web3km, xyz, y4y, zhaojohnson, zigtur
0.0234 USDC - $0.02
Due to the introduction of the idToBlockOfLastDeposit
check, small 1 wei deposits could be sent to all Dyad users as a means to prevent them from withdrawing their positions
if (idToBlockOfLastDeposit[id] == block.number) revert DepositedInSameBlock();
function deposit( uint id, address vault, uint amount ) external isValidDNft(id) { idToBlockOfLastDeposit[id] = block.number;
I generally don't recommend block-locks as the main issue with the system seems to be the manipulation of prices, I would recommend working to ensure Kerosene is tamper-proof rather than rely on block-locks which are not particularly effective on mainnet
MEV
#0 - c4-pre-sort
2024-04-28T07:07:05Z
JustDravee marked the issue as duplicate of #489
#1 - c4-pre-sort
2024-04-29T09:25:28Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-05T20:39:26Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#3 - c4-judge
2024-05-05T20:45:35Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#4 - c4-judge
2024-05-05T21:48:52Z
koolexcrypto marked the issue as nullified
#5 - c4-judge
2024-05-05T21:48:55Z
koolexcrypto marked the issue as not nullified
#6 - c4-judge
2024-05-08T15:26:45Z
koolexcrypto marked the issue as duplicate of #1001
#7 - c4-judge
2024-05-11T19:49:21Z
koolexcrypto marked the issue as satisfactory
#8 - c4-judge
2024-05-13T18:34:30Z
koolexcrypto changed the severity to 3 (High Risk)
🌟 Selected for report: Infect3d
Also found by: 0x486776, 0xAlix2, 0xleadwizard, 0xnilay, Abdessamed, ArmedGoose, Bauchibred, Bigsam, GalloDaSballo, HChang26, Myrault, OMEN, SBSecurity, T1MOH, ZanyBonzy, alix40, atoko, iamandreiski, jesjupyter, ke1caM, miaowu, peanuts, vahdrak1
17.2908 USDC - $17.29
In lack of a mechanism to handle bad debt, any Vault that will be underwater will never be liquidated
This will have a negative impact to the Peg of Dyad
While a 150% CR is very safe, I have demonstrated in Kerosene backing check can mostly be sidestepped
that the 1:1 collateral backing can be sidestepped
This means that bad debt, while unlikely, is possible and should not be dismissed as acceptable
Due to the logic in liquidate, 100% of debt must be paid for a certain amount of assets + bonus to be paid out
This fundamentally means that any time the cost of liquidation is too high (due to low premium), liquidations won't happen
The Health of Dyad is based on the collective sum of Collateral / Debt
Not having a way to handle bad debt will mean that over time the Token will have to trade below peg to compensate for it's bad debt backing
Add a way to perform bad debt liquidations and redistribute the bad debt in some way
In lack of that you'll have to have the DAO step in as buyer of last resort being willing to take the losses for these bad debt CDP
I don't recommend this as I'm confident some actors will abuse this to make money off of the DAO
MEV
#0 - c4-pre-sort
2024-04-28T10:07:00Z
JustDravee marked the issue as primary issue
#1 - c4-pre-sort
2024-04-29T09:34:18Z
JustDravee marked the issue as sufficient quality report
#2 - shafu0x
2024-04-30T15:19:34Z
Would this be solved by partial liquidations?
#3 - c4-judge
2024-05-05T11:47:42Z
koolexcrypto marked the issue as duplicate of #1097
#4 - c4-judge
2024-05-08T08:50:14Z
koolexcrypto marked the issue as not a duplicate
#5 - c4-judge
2024-05-08T14:57:09Z
koolexcrypto marked the issue as primary issue
#6 - c4-judge
2024-05-09T12:21:18Z
koolexcrypto marked the issue as duplicate of #977
#7 - c4-judge
2024-05-12T09:23:57Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#8 - c4-judge
2024-05-29T07:02:06Z
koolexcrypto marked the issue as satisfactory
🌟 Selected for report: carrotsmuggler
Also found by: 0xAlix2, 0xSecuri, 0xblack_bird, 0xnev, AM, Al-Qa-qa, AlexCzm, Dudex_2004, Egis_Security, GalloDaSballo, Infect3d, Jorgect, KupiaSec, Ryonen, SpicyMeatball, T1MOH, VAD37, adam-idarrha, amaron, cu5t0mpeo, d3e4, darksnow, forgebyola, foxb868, itsabinashb, jesjupyter, nnez, peanuts, pontifex, wangxx2026, windhustler, zhuying
4.8719 USDC - $4.87
Kerosene backed Vaults will be spot liquidatable at will whenever majority of holders decides to
We can simplify the future state of DYAD to the following:
These minority users, will be at the mercy of the majority
For the sake of argument let's imagine that the Majority has CR at 150% of all of which is exogenous and the Minority has CR at 150%, where 100% of it is exogenous, but 50% is Kerosene
The Majority will be able to:
Kerosene must become tampering resistant before it is usable
For example, the vaults collateralizing kerosene should be aggressively above 150% CR, and should be somewhat locked for some time as to prevent the scenario above from being possible
MEV
#0 - c4-pre-sort
2024-04-28T07:18:45Z
JustDravee marked the issue as duplicate of #67
#1 - c4-pre-sort
2024-04-29T09:06:15Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-08T11:50:08Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#3 - c4-judge
2024-05-08T12:40:57Z
koolexcrypto marked the issue as satisfactory