Popcorn contest - apvlki's results

A multi-chain regenerative yield-optimizing protocol.

General Information

Platform: Code4rena

Start Date: 31/01/2023

Pot Size: $90,500 USDC

Total HM: 47

Participants: 169

Period: 7 days

Judge: LSDan

Total Solo HM: 9

Id: 211

League: ETH

Popcorn

Findings Distribution

Researcher Performance

Rank: 106/169

Findings: 2

Award: $36.63

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

1.1529 USDC - $1.15

Labels

3 (High Risk)
partial-25
upgraded by judge
duplicate-402

External Links

Judge has assessed an item in Issue #752 as 2 risk. The relevant finding follows:

Possibility of MultiRewardEscrow.claimReward() to be vulnerable to a reentrancy attack There are a bunch of external calls before setting accruedRewards[user][_rewardTokens[i]]to zero. Malicious actors can add some exploits on the external calls potentially draining the rewards pool of that reward token. It is recommended to refactor this conforming to the check-effects pattern

#0 - c4-judge

2023-03-01T01:26:04Z

dmvt marked the issue as duplicate of #402

#1 - c4-judge

2023-03-01T01:26:10Z

dmvt marked the issue as partial-25

#2 - c4-judge

2023-03-01T22:31:45Z

dmvt changed the severity to 3 (High Risk)

  1. Adding initial staking rewards token and funding staking rewards will revert if the rewardToken does not revert.

The affected functions are the following:

In instances that reward tokens are unable to revert, the contract will proceed to call the MultiRewardStaking contract right away. Luckily, the transfer used in MultiRewardStaking.addRewardToken() and MultiRewardStaking.fundReward() contains safeTransferFrom which will revert if no tokens were transferred to the adminProxy and VaultController.

  1. Possibility of MultiRewardEscrow.claimReward() to be vulnerable to a reentrancy attack

There are a bunch of external calls before setting accruedRewards[user][_rewardTokens[i]] to zero. Malicious actors can add some exploits on the external calls potentially draining the rewards pool of that reward token. It is recommended to refactor this conforming to the check-effects pattern

  1. Setting max allowance during token transfers

Setting max allowance might completely drain user funds if exploited by malicious actors.

This was observed in the following contracts:

  • Vault.sol
  • VaultController.sol
  • AdapterBase.sol
  • BeefyAdapter.sol
  • MultiRewardsStaking.sol

#0 - c4-judge

2023-02-28T15:10:13Z

dmvt marked the issue as grade-b

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