xTRIBE contest - 0xmint's results

A TRIBE tokenomic upgrade with multi-delegation, autocompounding rewards, and reward delegation

General Information

Platform: Code4rena

Start Date: 21/04/2022

Pot Size: $75,000 USDC

Total HM: 7

Participants: 45

Period: 7 days

Judge: 0xean

Total Solo HM: 5

Id: 111

League: ETH

Tribe

Findings Distribution

Researcher Performance

Rank: 23/45

Findings: 2

Award: $223.44

๐ŸŒŸ Selected for report: 0

๐Ÿš€ Solo Findings: 0

Awards

65.8244 USDC - $65.82

Labels

bug
G (Gas Optimization)
sponsor acknowledged

External Links

Gas

Check whether there's any rewards before storing these state variables : storedAsset and lastReward

https://github.com/fei-protocol/ERC4626/blob/643cd044fac34bcbf64e1c3790a5126fec0dbec1/src/xERC4626.sol#L87

I mentioned to the dev(Joey|Tribe) that newReward will be zero since whatever asset is deposited in the contract would equal to the storedAsset - lastReward(zero if newReward is zero) .He responded that the donations would come directly from the protocol. But since the frequency of such deposits can't be ascertained, it's counterproductive to be saving a zero value to storage (in the event that there are no rewards for users).

Update the state variable as such :

if(newRewardโ‰ 0){

storedTotalAssets=storedTotalAssets_+lastRewardAmount_; lastReward=newReward; }

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax ยฉ 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter