Patwars

-
-
Project Annoucement
Project: Patwars
Audit
1
KYC
Onboard [M/D/Y]
04/20/2023
Contract
PAWSv2.sol

Smart Contract AuditSecurity Assessment powered by SECURI LAB

Audit Report
1 Avaliable
Assessment
PAWSv2.sol
Chain
-
Compiler Version
v0.8.18
Date
04/20/2023
0
All Findings
0
Unresolved
0
Resolved
0
Critical
0
High
0
Medium
0
Low
0
Very Low
0
Infromational

Powered by SECURI LAB

9.3
CVSS Score
9.3 From 10 Points
Function relation graph
Capabilities
🧪 Experimental Features

-

💰 Can Receive Funds

-

🖥 Uses Assembly

-

💣 Destroyable Contracts

-

📤 Transfers ETH

-

⚡ Low-Level Calls

-

👥 DelegateCall

-

🧮 Uses Hash Functions

-

🔖 ECRecover

-

🌀 New/Create/Create2

-

♻️ TryCatch

-

Σ Unchecked

yes

View Findings

Smart Contract Audit Findings

Vulnerability Findings

ID Vulnerability Detail Severity Category Status
SEC-01 Use Custom Errors Resolved
SEC-02 Long revert strings Resolved

 

 

 

 

SEC-01:    Use Custom Errors

Vulnerability Detail Severity Location Category Status
Use Custom Errors Check on finding Resolved

 

Finding:

127:         require(currentAllowance >= subtractedValue, “ERC20: decreased allowance below zero”);

 

142:         require(fromBalance >= amount, “ERC20: transfer amount exceeds balance”);

 

158:         require(owner != address(0), “ERC20: approve from the zero address”);

 

159:         require(spender != address(0), “ERC20: approve to the zero address”);

 

172:             require(currentAllowance >= amount, “ERC20: insufficient allowance”);


Scenario:

Recommendation:

Instead of using error strings, to reduce deployment and runtime cost, you should use Custom Errors. This would save both deployment and runtime cost.

https://blog.soliditylang.org/2021/04/21/custom-errors/

 

Alleviation:

Patwars Team has resolved this issue.

SEC-02:    Long revert strings

Vulnerability Detail Severity Location Category Status
Long revert strings Check on finding Resolved

 

Finding:

127:         require(currentAllowance >= subtractedValue, “ERC20: decreased allowance below zero”);

 

142:         require(fromBalance >= amount, “ERC20: transfer amount exceeds balance”);

 

158:         require(owner != address(0), “ERC20: approve from the zero address”);

 

159:         require(spender != address(0), “ERC20: approve to the zero address”);


Scenario:

Recommendation:

Long revert strings can indeed increase gas costs for transactions because they are stored as part of the contract bytecode. To optimize gas usage

 

Alleviation:

Patwars Team has resolved this issue.

 

 

Audit TImeline