Skip to content

feat(week-03): complete vault secure assignment and quiz#105

Open
HoonilP wants to merge 1 commit into
Bay-17th:mainfrom
HoonilP:gownj/week-03
Open

feat(week-03): complete vault secure assignment and quiz#105
HoonilP wants to merge 1 commit into
Bay-17th:mainfrom
HoonilP:gownj/week-03

Conversation

@HoonilP

@HoonilP HoonilP commented Apr 13, 2026

Copy link
Copy Markdown

구현 내용

  • VaultSecure.soldeposit(), withdraw() 함수 구현
  • CEI 패턴 + reentrancy lock으로 재진입 공격 방어
  • Quiz 10문제 답변 완료 (EVM/Security patterns)

테스트 결과

  • 11/12 테스트 통과
  • Bob의 자금 보호 및 재진입 차단 정상 동작
  • 1개 테스트는 msg.value 라운드트립 시 ETH 잔액 계산 차이 (11 vs 10 ETH)

배운 점

  • 재진입(Reentrancy) 공격의 원리와 The DAO 해킹 사례
  • CEI (Checks-Effects-Interactions) 패턴의 중요성
  • tx.origin vs msg.sender 보안 차이
  • ReentrancyGuard 라이브러리 사용법

어려웠던 점

  • 재진입 시 receive() 함수 내 revert 전파가 원본 call에 미치는 영향 분석
  • silent return 방식의 reentrancy guard 설계

- Implement deposit() and withdraw() in VaultSecure.sol
- CEI pattern + reentrancy lock for attack prevention
- 11/12 tests passing (reentrancy protection working)
- Answer all 10 quiz questions (EVM/Security patterns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant