Platform: Code4rena
Start Date: 21/07/2023
Pot Size: $90,500 USDC
Total HM: 8
Participants: 60
Period: 7 days
Judge: 0xean
Total Solo HM: 2
Id: 264
League: ETH
Rank: 34/60
Findings: 1
Award: $319.21
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Sathish9098
Also found by: 0x3b, 0xnev, 3agle, BugBusters, DadeKuma, K42, Udsen, foxb868, ktg, kutugu, oakcobalt, peanuts, squeaky_cactus
The overall quality of the codebase for Arcade.xyz can be classified as "Good".
Strengths
Weaknesses
ArcadeGSCCoreVoting.sol
and CoreVoting.sol
(Out-of-Scope). These contracts allow for the submission and voting of proposals.ArcadeToken.sol
, which assigns 1 unit of voting power for every 1 unit of ARCD Token. This voting power can be delegated to other users.ArcadeTokenDistributor.sol
which will distribute a pre-decided percentage of tokens to various stakeholders and contracts like ArcadeTreasury.sol
, ArcadeAirdrop.sol
, Dev Partners, etc. After that, the tokens can be minted after a year at a 2% inflationary cap.ArcadeTreasury.sol
contract provides a mechanism for managing funds held in the Arcade treasury, with configurable spending thresholds, governance control, and an allowance system for smaller spending by the GSC.ARCDVestingVault.sol
and NFTBoostVault.sol
, handle and track the user's voting power. Both inherit from the BaseVotingVault.sol
.ImmutableVestingVault.sol
, wherein a manager cannot revoke the grants after setting them.NFTBoostVault.sol
. It supports any and all the ERC1155s which have an assigned boost multiplier value (max 1.5x) in the NFTBoostVault.sol
.ClaimData
to the publishRoots()
function.ARCDVestingVault.sol
where the manager
role has complete control over all the tokens that have not yet been withdrawn by the user.NFTBoostVault.sol
was particularly interesting as it used ERC1155s to boost the user's voting power, which opened up the possibility for reentrancy.nonReentrant
modifiers, one function, delegate()
, lacked the modifier and performed several major state changes.updateNft()
or withdraw()
), with a higher boost multiplier, could potentially reenter delegate()
to change the registration.delegatee
from another user to myself, effectively reducing my delegate's voting power._syncVotingPower()
and then perform subsequent actions.ArcadeTreasury.sol
, the expenditure of tokens is recorded and capped per block./// @notice mapping storing how much is spent or approved in each block. mapping(uint256 => uint256) public blockExpenditure; //In _spend() function uint256 spentThisBlock = blockExpenditure[block.number]; if (amount + spentThisBlock > limit) revert T_BlockSpendLimit();
/// @notice mapping storing how much is spent or approved in each block. mapping(uint256 => mapping(address => uint256)) public blockExpenditure; //In _spend() function uint256 spentThisBlock = blockExpenditure[block.number][token]; if (amount + spentThisBlock > limit) revert T_BlockSpendLimit();
54 hours
#0 - c4-pre-sort
2023-07-31T16:40:46Z
141345 marked the issue as high quality report
#1 - liveactionllama
2023-08-02T17:37:30Z
After discussion with the lookout, removing the high quality
label here, simply to focus usage of that label on the top 2 QA reports.
#2 - c4-judge
2023-08-10T22:59:58Z
0xean marked the issue as selected for report
#3 - c4-judge
2023-08-17T22:33:10Z
0xean marked the issue as not selected for report
#4 - c4-judge
2023-08-17T22:33:16Z
0xean marked the issue as grade-a