Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Beosin - Algorithm error #14

Closed
sherlock-admin opened this issue Nov 4, 2023 · 1 comment
Closed

Beosin - Algorithm error #14

sherlock-admin opened this issue Nov 4, 2023 · 1 comment
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout

Comments

@sherlock-admin
Copy link
Contributor

sherlock-admin commented Nov 4, 2023

Beosin

medium

Algorithm error

##Summary
Inconsistency in calculations related to the HEAL_PROBABILITY_MINUEND parameter

##Vulnerability Detail
Inconsistency between the parameters used in the initialization HEAL_PROBABILITY_MINUEND and subsequent calculations in the healProbability function.
The algorithm for calculating HEAL_PROBABILITY_MINUEND is *99-80. the calculation in HEALProbability is *19 (which is 99-80) .

##Impact
The result of the healProbability function calculation is large, affecting the token destruction in _healRequestFulfilled, and the return value deadAgentsCount is not increased. The end of the game was delayed.

##Code Snippet
https://github.com/sherlock-audit/2023-10-looksrare/blob/main/contracts-infiltration/contracts/Infiltration.sol#L379-L381

https://github.com/sherlock-audit/2023-10-looksrare/blob/main/contracts-infiltration/contracts/Infiltration.sol#L1019-L1028
##Tool used
Manual Review

##Recommendation
It is recommended to modify the HEAL_PROBABILITY_MINUEND parameter or the calculation in the healProbability function.

@github-actions github-actions bot closed this as completed Nov 6, 2023
@github-actions github-actions bot added the Excluded Excluded by the judge without consulting the protocol or the senior label Nov 6, 2023
@nevillehuang
Copy link
Collaborator

No issue here, not clear what the submission is pointing to as logic is working as intended.

@rcstanciu rcstanciu added the Has Duplicates A valid issue with 1+ other issues describing the same vulnerability label Nov 8, 2023
@sherlock-admin2 sherlock-admin2 changed the title Merry Mauve Bear - Algorithm error Beosin - Algorithm error Nov 9, 2023
@sherlock-admin2 sherlock-admin2 added Non-Reward This issue will not receive a payout and removed Has Duplicates A valid issue with 1+ other issues describing the same vulnerability labels Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Excluded Excluded by the judge without consulting the protocol or the senior Non-Reward This issue will not receive a payout
Projects
None yet
Development

No branches or pull requests

4 participants