Backd Tokenomics contest - hake's results

Maximize the power of your assets and start earning yield

General Information

Platform: Code4rena

Start Date: 27/05/2022

Pot Size: $75,000 USDC

Total HM: 20

Participants: 58

Period: 7 days

Judge: GalloDaSballo

Total Solo HM: 15

Id: 131

League: ETH

Backd

Findings Distribution

Researcher Performance

Rank: 33/58

Findings: 2

Award: $171.81

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

113.8755 USDC - $113.88

Labels

bug
QA (Quality Assurance)
resolved
sponsor confirmed

External Links

QA Report

[L-01] Missing zero address check

If parameter is accidentally set to zero the contract will have to be redeployed

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/Minter.sol#L96 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/access/Authorization.sol#L10 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/access/RoleManager.sol#L33 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/BkdLocker.sol#L50 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/RewardHandler.sol#L26 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/AmmGauge.sol#L40 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/BkdToken.sol#L21 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/BkdLocker.sol#L72

[L-02] Ownership transfer should be done in two steps

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/InflationManager.sol#L58-L63

Consider implementing a two step process where minter nominates an account and the nominated account needs to call an acceptMinter function for the transfer of ownership to fully succeed. This ensures the nominated EOA account is a valid and active account.

Other instance: https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/VestedEscrow.sol#L68-L78

[N-01] Typo

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/FeeBurner.sol#L35

Recieve

Change to "Receive"

[N-02] Remove TODO

https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/InflationManager.sol#L532

//TOOD: See if this is still needed somewhere

Also please fix wrong (but comical) spelling in future TODO notes.

#0 - GalloDaSballo

2022-06-21T00:20:37Z

Pretty generic report

Awards

57.93 USDC - $57.93

Labels

bug
G (Gas Optimization)
sponsor disputed

External Links

Gas Report

[G-01] Cache array

for (uint256 i; i < amounts.length; i = i.uncheckedInc()

Array could be cached:

length = amounts.length;
for (uint256 i; i < length; i = i.uncheckedInc()

Other instances: https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/tokenomics/VestedEscrow.sol#L94 https://github.com/code-423n4/2022-05-backd/blob/2a5664d35cde5b036074edef3c1369b984d10010/protocol/contracts/RewardHandler.sol#L42

#0 - GalloDaSballo

2022-06-18T00:19:18Z

[G-01] Cache array 6 gas

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