Platform: Code4rena
Start Date: 08/03/2023
Pot Size: $60,500 USDC
Total HM: 2
Participants: 123
Period: 7 days
Judge: hansfriese
Id: 220
League: ETH
Rank: 123/123
Findings: 1
Award: $19.30
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: JCN
Also found by: 0x1f8b, 0xSmartContract, 0xSolus, 0xhacksmithh, 0xnev, Angry_Mustache_Man, Aymen0909, Diana, Flora, Inspex, Madalad, MatricksDeCoder, MiniGlome, R-Nemes, RaymondFam, ReyAdmirado, Rolezn, SAAJ, Sathish9098, Shubham, Udsen, Viktor_Cortess, arialblack14, atharvasama, ayden, c3phas, carlitox477, descharre, dharma09, durianSausage, fatherOfBlocks, ginlee, glcanvas, hunter_w3b, leopoldjoy, matrix_0wl, mrpathfindr, nadin, oyc_109, pipoca, schrodinger, slvDev, ulqiorra, volodya
19.3029 USDC - $19.30
_DIVISOR
= 100.
citizenStatus.points = 100 * timelockMultiplier / _DIVISOR;
Make the following change and save 729 gas on average for calling stake
citizenStatus.points = timelockMultiplier;
NeoTokyoStaker.sol#L1155
uint256 points = amount * 100 / 1e18 * timelockMultiplier / _DIVISOR;
Make the following change and save 729 gas on average for calling withdrawer
uint256 points = amount * timelockMultiplier / 1e18;
stakerLPPosition[msg.sender]
to save upto 2301 gasNeoTokyoStaker.sol#L1157-L1161
LPPosition storage position = stakerLPPosition[msg.sender]; // Update the caller's LP token stake. position.timelockEndTime = block.timestamp + timelockDuration; position.amount += amount; position.points += points;
#0 - c4-judge
2023-03-17T04:34:47Z
hansfriese marked the issue as grade-b