Platform: Code4rena
Start Date: 24/03/2023
Pot Size: $49,200 USDC
Total HM: 20
Participants: 246
Period: 6 days
Judge: Picodes
Total Solo HM: 1
Id: 226
League: ETH
Rank: 214/246
Findings: 1
Award: $10.79
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Rolezn
Also found by: 0x3b, 0xGordita, 0xSmartContract, 0xhacksmithh, 0xnev, 0xpanicError, 4lulz, Angry_Mustache_Man, ArbitraryExecution, Aymen0909, Bason, BlueAlder, EvanW, Franfran, HHK, Haipls, IgorZuk, JCN, KrisApostolov, Madalad, MiksuJak, MiniGlome, RaymondFam, ReyAdmirado, Rickard, Sathish9098, Udsen, adriro, alexzoid, anodaram, arialblack14, c3phas, carlitox477, ch0bu, chaduke, codeslide, d3e4, dicethedev, ernestognw, fatherOfBlocks, georgits, hunter_w3b, inmarelibero, lukris02, mahdirostami, maxper, pavankv, pixpi, rotcivegaf, smaul, tank, tnevler, wen, yac
10.7864 USDC - $10.79
https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L73-L74 Before 532939 After 524794 https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L141-L142 Before 729728 722422
https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L165-L175 Example update
function addDerivative(address _contractAddress, uint256 _weight) external onlyOwner { derivatives[derivativeCount] = IDerivative(_contractAddress); weights[derivativeCount] = _weight; derivativeCount++; totalWeight += _weight; // Maintain a running total of weights emit DerivativeAdded(_contractAddress, _weight, derivativeCount); }
Before 102462 After 99501 https://github.com/code-423n4/2023-03-asymmetry/blob/44b5cd94ebedc187a08884a7f685e950e987261c/contracts/SafEth/SafEth.sol#L182-L195 Example update
function adjustWeight(uint256 _derivativeIndex, uint256 _newWeight) external onlyOwner { require(_derivativeIndex < derivativeCount, "Invalid derivative index"); uint256 _oldWeight = weights[_derivativeIndex]; weights[_derivativeIndex] = _newWeight; // Update totalWeight using the difference between the new and old weights totalWeight = totalWeight - _oldWeight + _newWeight; emit WeightChange(_derivativeIndex, _newWeight); }
Before 46507 after 41294
#0 - c4-sponsor
2023-04-10T20:00:22Z
elmutt marked the issue as sponsor confirmed
#1 - c4-judge
2023-04-23T19:23:13Z
Picodes marked the issue as grade-b