Questions tagged [reentrant-attacks]
Questions related to "reentrancy vulnerability" or "reentrant attack", where untrusted code reenters a contract and manipulates state. http://forum.ethereum.org/discussion/1317/reentrant-contracts https://github.com/LeastAuthority/ethereum-analyses/blob/master/GasEcon.md
128 questions
0 votes
0 answers
23 views
Rather than ERC777 hooks is there any way to know when transaction is being taken from the user like a hook?
Rather than ERC777 hooks is there any way to know when transaction is being taken from the user like a hook??I know reentrancy are only possible when the native / ERC777 i wanted to know if there's ...
0 votes
1 answer
25 views
Reentrancy Logic: Where we already set the user balance to 0 on failed withdrawal
sorry, I am new, but anyway. This is the Ethereum documentation that I’m referencing. contract NoLongerAVictim { function withdraw() external { uint256 amount = balances[msg.sender]; ...
1 vote
1 answer
73 views
Can a Reentrancy Vulnerability Occur When the Check-Effects-Interaction Pattern Is Enforced
I am currently conducting research on reentrancy vulnerabilities in Solidity-based smart contracts, which has led me to the following question: Can any type of reentrancy vulnerability (single-...
0 votes
1 answer
77 views
Is it possible for two users to receive the same nonce-generated ID in a Solidity smart contract?
I have a smart contract deployed on the Ethereum blockchain where each user who interacts with a specific function is assigned an ID based on a nonce value stored in the contract. The nonce is ...
3 votes
2 answers
232 views
Is the new transient storage immutable?
I just found out about EIP-1153, and that there's a new type of storage: transient, which exists in the scope of a one single transaction. Do I understand this correctly: Contract A can write ...
1 vote
1 answer
107 views
reentrance in ERC20 token transfer
Since ERC20 token transfer is prone to reentrance attack because they do not invoke any function in external contract. is it okay to update the state after external call??. since its impossible for ...
0 votes
1 answer
63 views
Reentrancy attack: revert Transfailed
I have written a reentrancy vulnerable contract and a written a script to exploit it. I have printed both contract's ether value across the whole process and it looks like it is working. However, the ...
1 vote
1 answer
47 views
Reentrancy Vulnerability
I've noticed that the offer function uses the .call{value: amount}("") method to send Ether to the recipient's address. Could anyone provide insight into whether this function is indeed ...
1 vote
1 answer
2k views
Reentrancy Guard and CEI
Could you please explain, is there a need to use a ReentrancyGuard modifier if the contract follows the CEI(Check Effect Interactions) pattern? If yes, could you bring an example, where the contract ...
0 votes
0 answers
64 views
Failed to demonstrate a Re-entrancy attack due to arithmetic underflow
I try to do re-entrancy on a contract for testing purposes, but I encountered an error when doing so. Here's the targeted contract // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {...
1 vote
1 answer
81 views
Understanding Reentrancy attacks
I'm trying to understand the mechanism for a reentrancy attack, and how it might be mitigated. I'm looking at (for example) this scan result: https://de.fi/scanner/contract/...
0 votes
1 answer
295 views
About how reentrancy works?
I tried investigating reentrancy and found something unexpected. I tried preventing reentrancy with reentrancy locks as recommended. When I ran the code, there was no error due to attempted reentrancy ...
0 votes
1 answer
65 views
Reentrancy check on external call
If I have two external functions in two contracts (A and B), where A calls B, B's called function has an onlyA() modifier, and B's called function sends ETH to an external address, is it logical to ...
0 votes
1 answer
100 views
Does the OpenZeppelin nonReentrant modifier block calling all functions that have the modifier on them, or it keeps a separate state for each function
Would the nonReentrant modifier from the OpenZeppelin ReentrancyGuard library prevent the user from calling stake() when the unstake() function hasn't yet been fully processed (in the example below)? ...
1 vote
1 answer
175 views
Is it possible to batch-call the function multiple times so it's executed asynchronously and make profit from that?
If an attacker batch-calls the vulnerable contract's function in a re-entrancy attack attempt, would the transaction with a CEI pattern violation be fully executed before the other transactions are ...