You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it uses invalid “transient” variables causing logic errors.
Summary
The function that contains a logical error is checkTransaction(). The logical error stems from the misuse of the keyword transient in the variable declarations. In Solidity, the transient keyword does not exist. All state variables declared at the contract level are stored in storage, and their values persist between transactions.
Root Cause
In the checkTransaction() function, these variables are intended to be temporary and only valid during a single transaction execution. However, because they are declared as state variables without proper handling (the transient keyword is not recognized), they persist between transactions. This can cause incorrect behavior, especially with the reentrancy guard and state checks, leading to potential security vulnerabilities.
Therefore, the logical error is that the variables intended to be temporary are, in fact, persistent, which can lead to incorrect execution logic in the checkTransaction() function.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
No response
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered:
sherlock-admin2
changed the title
Uneven Pine Sheep - it uses invalid “transient” variables causing logic errors.
Albort - it uses invalid “transient” variables causing logic errors.
Nov 27, 2024
Albort
High
it uses invalid “transient” variables causing logic errors.
Summary
The function that contains a logical error is checkTransaction(). The logical error stems from the misuse of the keyword transient in the variable declarations. In Solidity, the transient keyword does not exist. All state variables declared at the contract level are stored in storage, and their values persist between transactions.
Root Cause
In the checkTransaction() function, these variables are intended to be temporary and only valid during a single transaction execution. However, because they are declared as state variables without proper handling (the transient keyword is not recognized), they persist between transactions. This can cause incorrect behavior, especially with the reentrancy guard and state checks, leading to potential security vulnerabilities.
Therefore, the logical error is that the variables intended to be temporary are, in fact, persistent, which can lead to incorrect execution logic in the checkTransaction() function.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
No response
PoC
No response
Mitigation
No response
The text was updated successfully, but these errors were encountered: