| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
- Wargame
- ethereum virtual machine
- Ethererum
- chain reorganization
- Block
- web3
- libray
- NaughtCoin
- TransferFrom
- tx.origin
- solidity
- Smart contract
- writeup
- hard fork
- ethereum
- approve
- secureum
- coin flip
- transaction
- Assembly
- ethernaut
- audit
- Oracle Cloud
- EVM
- byte code
- Coin
- syntax
- openzepplin
- soft fork
- web assembly
- Today
- Total
목록solidity (10)
c0mpos3r
1. 문제 분석Generating random numbers in solidity can be tricky. There currently isn't a native way to generate them, and everything you use in smart contracts is publicly visible, including the local variables and state variables marked as private. Miners also have control over things like blockhashes, timestamps, and whether to include certain transactions - which allows them to bias these values ..
1. 문제 분석That was silly wasn't it? Real world contracts must be much more secure than this and so must it be much harder to hack them right? Well... Not quite.The story of Rubixi is a very well known case in the Ethereum ecosystem. The company changed its name from 'Dynamic Pyramid' to 'Rubixi' but somehow they didn't rename the constructor method of its contract:contract Rubixi { address private..
1. 문제 분석You know the basics of how ether goes in and out of contracts, including the usage of the fallback method.You've also learnt about OpenZeppelin's Ownable contract, and how it can be used to restrict the usage of some methods to a privileged address.Move on to the next level when you're ready! 당신은 폴백 방법의 사용을 포함하여 에테르가 계약에 들어오고 나가는 방법의 기본 사항을 알고 있습니다.또한 OpenZeppelin의 자체 계약과 일부 방법의 사용법을 권한있..
1. 문제 분석Congratulations! You have completed the tutorial. Have a look at the Solidity code for the contract you just interacted with below.You are now ready to complete all the levels of the game, and as of now, you're on your own.Godspeed!! 축하해요! 튜토리얼을 완료했습니다. 아래에서 방금 상호 작용 한 계약의 견고성 코드를 살펴보십시오.이제 게임의 모든 레벨을 완료 할 준비가되었으며 현재는 자신이 혼자입니다.1-1. code// SPDX-License-Identifier: MITpragma solidity ^0.8..
1. 문제 분석NaughtCoin is an ERC20 token and you're already holding all of them. The catch is that you'll only be able to transfer them after a 10 year lockout period. Can you figure out how to get them out to another address so that you can transfer them freely? Complete this level by getting your token balance to 0. NaughtCoin은 ERC20 토큰이며 이미 모든 것을 들고 있습니다. 캐치는 10 년의 잠금 기간 후에 만 전송할 수 있다는 것입니다. 자유롭게..
100 more Audit Findings102. 훅(Hook) 수신 컨트랙트의 잠재적 엣지 케이스 문서화 필요취약점: 프로토콜의 인출 함수는 사용자가 지정한 임의의 "훅" 컨트랙트를 호출할 수 있습니다. 그런데 누구나 소량의 토큰을 자신이 제어하는 주소로 보낸 뒤 인출하는 방식으로 이 훅을 트리거할 수 있습니다. 이는 사실상 누구나, 어떤 컨트랙트든 훅으로 지정하여 강제로 호출할 수 있음을 의미합니다.권장 사항: 훅을 수신하는 컨트랙트를 개발하는 개발자들은, 이 훅 함수가 예상치 못한 주체(msg.sender)에 의해 호출될 수 있음을 인지하고, 호출자와 전달된 파라미터를 반드시 검증해야 한다는 내용을 명확히 문서화해야 합니다.감사 출처: Umbra의 ConsenSys 감사103. 지원 토큰의 동작 제..
101 Finding from Audits1. transfer와 transferFrom의 반환 값을 처리하지 않음취약점: 모든 ERC-20 토큰이 표준을 동일하게 따르지는 않습니다. 일부 토큰의 transfer나 transferFrom 함수는 실패 시 revert 되는 대신 false를 반환합니다. 만약 이 반환 값을 확인하지 않으면, 컨트랙트는 전송이 실패했음에도 성공한 것으로 착각하고 다음 로직을 실행하여 심각한 문제를 일으킬 수 있습니다.권장 사항: 호출 결과를 require()로 감싸서 실패 여부를 확인하거나, OpenZeppelin의 SafeERC20 라이브러리를 사용하여 안전하게 호출해야 합니다.심각도: Medium (Aave Protocol V2의 Consensys Diligence 감사)2..
101 key aspects of Solidity102. 다중 상속과 다형성솔리디티는 다형성을 포함한 다중 상속을 지원합니다.다형성 (Polymorphism): 함수를 호출하면, 상속 계층 구조상 가장 하위(most derived)에 있는 컨트랙트의 함수가 항상 실행되는 특징을 의미합니다.컴파일 방식: 여러 컨트랙트를 상속받아도 블록체인에는 단 하나의 컨트랙트만 생성됩니다. 모든 부모 컨트랙트의 코드가 이 하나의 컨트랙트 안으로 컴파일되어 합쳐집니다.함수 오버라이딩 (Function Overriding): 부모 컨트랙트의 함수에 virtual 키워드가 붙어 있으면, 자식 컨트랙트에서 해당 함수의 동작을 덮어쓸 수 있습니다. 이때 자식 컨트랙트의 함수에는 반드시 override 키워드를 사용해야 합니다.다..