Skip to content

Latest commit

 

History

History
133 lines (71 loc) · 3.38 KB

report.md

File metadata and controls

133 lines (71 loc) · 3.38 KB

Aderyn Analysis Report

This report was generated by Aderyn, a static analysis tool built by Cyfrin, a blockchain security company. This report is not a substitute for manual audit or security review. It should not be relied upon for any purpose other than to assist in the identification of potential security vulnerabilities.

Table of Contents

Summary

Files Summary

Key Value
.sol Files 1
Total nSLOC 129

Files Details

Filepath nSLOC
src/ChristmasDinner.sol 129
Total 129

Issue Summary

Category No. of Issues
High 1
Low 4

High Issues

H-1: Functions send eth away from contract but performs no checks on any address.

Consider introducing checks for msg.sender to ensure the recipient of the money is as intended.

1 Found Instances
  • Found in src/ChristmasDinner.sol Line: 137

         function refund() external nonReentrant beforeDeadline {

Low Issues

L-1: Unsafe ERC20 Operations should not be used

ERC20 functions may not behave as expected. For example: return values are not always meaningful. It is recommended to use OpenZeppelin's SafeERC20 library.

1 Found Instances
  • Found in src/ChristmasDinner.sol Line: 235

             _to.transfer(refundValue);

L-2: Missing checks for address(0) when assigning values to address state variables

Check for address(0) when assigning values to address state variables.

1 Found Instances
  • Found in src/ChristmasDinner.sol Line: 171

             host = _newHost;

L-3: Modifiers invoked only once can be shoe-horned into the function

1 Found Instances
  • Found in src/ChristmasDinner.sol Line: 77

         modifier nonReentrant() {

L-4: State variable could be declared constant

State variables that are not updated following deployment should be declared constant to save gas. Add the constant attribute to state variables that never change.

1 Found Instances
  • Found in src/ChristmasDinner.sol Line: 42

         bool public deadlineSet = false;