PoolTogether V5: Part Deux - shirochan's results

A protocol for no-loss prize savings.

General Information

Platform: Code4rena

Start Date: 02/08/2023

Pot Size: $42,000 USDC

Total HM: 13

Participants: 45

Period: 5 days

Judge: hickuphh3

Total Solo HM: 5

Id: 271

League: ETH

PoolTogether

Findings Distribution

Researcher Performance

Rank: 32/45

Findings: 1

Award: $89.63

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Awards

89.6296 USDC - $89.63

Labels

bug
3 (High Risk)
satisfactory
duplicate-82

External Links

Lines of code

https://github.com/GenerationSoftware/pt-v5-draw-auction/blob/f1c6d14a1772d6609de1870f8713fb79977d51c1/src/RngRelayAuction.sol#L131

Vulnerability details

Impact

There's no access restriction on rngComplete which allows anyone to execute this function and complete the auction. This can lead to unexpected behavior or potential DOS attack where a user completes the auction.

Tools Used

Manual Analysis

It's recommended to check that only the relayer can execute this function.

/// @notice Called by the relayer to complete the Rng relay auction.
...
function rngComplete(
    uint256 _randomNumber,
    uint256 _rngCompletedAt,
    address _rewardRecipient,
    uint32 _sequenceId,
    AuctionResult calldata _rngAuctionResult
  ) external returns (bytes32) {
+    require(msg.sender == rngAuctionRelayer, "RngRelayAuction/rngComplete: Only the relayer can call this function");
    if (_sequenceHasCompleted(_sequenceId)) revert SequenceAlreadyCompleted();

Assessed type

Access Control

#0 - c4-pre-sort

2023-08-08T03:01:38Z

raymondfam marked the issue as duplicate of #82

#1 - c4-judge

2023-08-14T02:47:15Z

HickupHH3 marked the issue as satisfactory

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