AI Arena - almurhasan's results

In AI Arena you train an AI character to battle in a platform fighting game. Imagine a cross between Pokémon and Super Smash Bros, but the characters are AIs, and you can train them to learn almost any skill in preparation for battle.

General Information

Platform: Code4rena

Start Date: 09/02/2024

Pot Size: $60,500 USDC

Total HM: 17

Participants: 283

Period: 12 days

Judge:

Id: 328

League: ETH

AI Arena

Findings Distribution

Researcher Performance

Rank: 241/283

Findings: 2

Award: $0.73

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/RankedBattle.sol#L294

Vulnerability details

Impact

Users may not claim NRN due to DOS.

Proof of Concept

  1. Let assume, Alice gets a fighter nft after 1000(or whatever big number) roundid.

  2. Alice gets some points after 1001 roundid.

  3. Alice call the claimNRN function,this will revert as alice’s lowerbound = 0 and current roundid = 1001, so the iteration may revert due to out of gas error.

Tools Used

manual review

Assessed type

DoS

#0 - c4-pre-sort

2024-02-25T02:24:11Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-02-25T02:24:21Z

raymondfam marked the issue as duplicate of #1541

#2 - c4-judge

2024-03-11T13:00:58Z

HickupHH3 marked the issue as duplicate of #216

#3 - c4-judge

2024-03-12T02:44:06Z

HickupHH3 marked the issue as partial-50

#4 - c4-judge

2024-03-21T02:11:05Z

HickupHH3 marked the issue as satisfactory

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/MergingPool.sol#L139

Vulnerability details

Impact

Users may not claim nft rewards in Mergingpool contract due to DOS.

Proof of Concept

  1. Let assume, Alice gets a fighter nft after 1000(or whatever big number) roundid.

  2. Alice become winner for rounid 1001 in mergingpool contract.

  3. Alice calls the claimRewards function, this will revert as alice’s lowerbound = 0 and current roundid = 1001, so the iteration may revert due to out of gas error

Tools Used

manual review

Assessed type

DoS

#0 - c4-pre-sort

2024-02-25T02:24:31Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-02-25T02:24:57Z

raymondfam marked the issue as duplicate of #1541

#2 - c4-judge

2024-03-11T13:00:59Z

HickupHH3 marked the issue as duplicate of #216

#3 - c4-judge

2024-03-12T02:44:11Z

HickupHH3 marked the issue as partial-50

#4 - c4-judge

2024-03-21T02:11:11Z

HickupHH3 marked the issue as satisfactory

Lines of code

https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/RankedBattle.sol#L477

Vulnerability details

Impact

Users can game the system to avoid losing stakeAtRisk NRN.

Proof of Concept

  1. Let assume, alice(a challenger) has staked 500 NRN and alice will fight 10 battles for the round.

  2. After 9 battles,Alice's stakeAtRisk = 50,AccumulatedPoints = 0.

  3. Alice loses the battle number 10.

  4. Before updating the battle record, Alice unstakes remaining 450 NRN.

  5. Now alice’s curStakeAtRisk sets to 0 ( as amountStaked[tokenId] = 0)

6.So Alice loses 0 curStakeAtRisk i.e 0 staked NRN by gaming the rules which is unfair.

Tools Used

manual review

Prevent the unfair mechanism

Assessed type

MEV

#0 - c4-pre-sort

2024-02-23T03:05:21Z

raymondfam marked the issue as sufficient quality report

#1 - c4-pre-sort

2024-02-23T03:05:29Z

raymondfam marked the issue as duplicate of #51

#2 - c4-pre-sort

2024-02-26T02:23:51Z

raymondfam marked the issue as duplicate of #136

#3 - c4-judge

2024-03-08T04:05:45Z

HickupHH3 marked the issue as unsatisfactory: Invalid

#4 - c4-judge

2024-03-08T04:09:32Z

HickupHH3 marked the issue as unsatisfactory: Invalid

#5 - c4-judge

2024-03-08T04:09:35Z

HickupHH3 marked the issue as unsatisfactory: Invalid

#6 - c4-judge

2024-03-13T14:43:22Z

HickupHH3 marked the issue as not a duplicate

#7 - HickupHH3

2024-03-13T14:43:28Z

dup #833

#8 - c4-judge

2024-03-13T14:43:38Z

HickupHH3 marked the issue as duplicate of #1641

#9 - c4-judge

2024-03-13T14:44:14Z

HickupHH3 changed the severity to 2 (Med Risk)

#10 - c4-judge

2024-03-13T14:44:25Z

HickupHH3 removed the grade

#11 - c4-judge

2024-03-13T14:44:34Z

HickupHH3 marked the issue as satisfactory

#12 - c4-judge

2024-03-13T14:44:42Z

HickupHH3 marked the issue as partial-50

#13 - HickupHH3

2024-03-13T14:45:02Z

very brief write-up, could use more elaboration.

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