Linked Questions

3 votes
6 answers
2k views

What is checklist for auditing a smart contract? [duplicate]

Can anyone tell me the steps or points required to audit the smart contract? I want to audit a smart contact and i need checklist for that.
Dhara Patel's user avatar
19 votes
3 answers
14k views

Is it possible to overflow uints?

The Ethereum token tutorial has a check for a uint256 overflow. function transfer(address _to, uint256 _value) { /* Check if sender has balance and for overflows */ if (balanceOf[msg.sender] ...
Noah Thorp's user avatar
10 votes
1 answer
1k views

Writing secure Smart Contracts in Solidity?

With the DAO hack, it becomes even more important for developers to write secure smart contracts and be aware of pitfalls. Are there any good reference points/links which can describe the best ...
2 votes
1 answer
479 views

What is a smart contract security audit?

A lot of blockchain projects have a smart contract security audit on their website and publish about this on social media. What are these audits? Does my project need one?
Mikko Ohtamaa's user avatar
2 votes
2 answers
4k views

Contract kill/terminate with selfdestruct but also for tokens?

selfdestructs(owner) refunds Eth to owner. However, it does not transfer any tokens the contract may own. These would get permanently lost. Would something like the following work? Is there a better ...
Remco's user avatar
  • 413
2 votes
2 answers
873 views

Are Ethereum transactions atomic

I apologize in advance if my question is dumb. I want to make a smart contract which will handle money from the outside. However, I haven't been able to find any information about multithreading on ...
lizardev's user avatar
1 vote
2 answers
890 views

Ethereum Contract auditing(solidity)

I am a student of Information Security and my teacher has given me the task to know about the details of auditing that is being done on Ethereum smart contracts that are written using solidity. ...
Larosh's user avatar
  • 11
1 vote
2 answers
181 views

ethereum smart contract security check [closed]

How to prevent smart contract from the vulnerabilities? what are all the security measurements we need to consider before publishing our smart contract? Regards Mani
user324534's user avatar
0 votes
1 answer
392 views

When should I use ReentrancyGuard in a smart contract?

I am looking at the ReentrancyGuard smart contract from Open Zeppelin and I don't understand when I have to use it. Is it necessary in all my smart contracts or do I only have to add it in some ...
Falcon Stakepool's user avatar
0 votes
1 answer
354 views

How do I write smart contracts that are LP tokens?

I'm very new to blockchain and DeFi, and I'd like to ask a questions regarding LP tokens. If I wanted to list 4 LP tokens, with farm reward proportions of: 80/60/40/20, how do I go about writing them? ...
code_learner93's user avatar
0 votes
3 answers
170 views

Best testing Ethereum practices

My team recently starting learning Ethereum and smart contracts. Wanted to ask what are the best practices for testing. I have read about creating private networks: Can we have our own private ...
Exhaler's user avatar
0 votes
1 answer
217 views

Does reentrancy attack happens as soon as the balance in storage is modified after the withdrawal?

I just saw something like this: function sub( uint a, uint b ) internal pure returns (uint) { require(b <= a, "SUB_UNDERFLOW"); return a - b; } function withdraw(...
user2284570's user avatar
  • 1,018
1 vote
0 answers
213 views

What s the fake deposit attack affecting some exchanges with erc20?

There are a lot of articles about hacked tokens affecting centralized exchanges only when Googling fake erc20 deposit but I failed to find a reference describing how the attack works technically. The ...
user2284570's user avatar
  • 1,018
0 votes
1 answer
104 views

Does only function involving ETH transactions need reentrancy guard?

I thought so as it may induces fallback() functions, however, I saw in Synthetix's staking contracts, they use reentrancy guard on so many functions that does not involve ETH at all? https://github....
frt132's user avatar
  • 87
1 vote
1 answer
32 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 ...
Mark's user avatar
  • 13