Zedxion ZEDXION Token

Version 1.0.0
Serial No. 2023012000022014
Presented by Fairyproof
January 20, 2023

Zedxion ZEDXION Token

01. Introduction
This document includes the results of the audit performed by the Fairyproof team on the Zedxion ZEDXION
Audit Start Time:
January 18, 2023
Audit End Time:
January 19, 2023
Audited Source File's Address:

roofproject.

https://etherscan.io/address/0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341#code

https://bscscan.com/address/0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341#code
https://tronscan.io/#/contract/TMNTn2uFAHhkGE3uuM84rhfRRjt6ry9xnL/codeyp

The goal of this audit is to review Zedxion’s solidity implementation for its ZEDXION function, study potential
security vulnerabilities, its general design and architecture, and uncover bugs that could compromise thesoftware in production.

We make observations on specific areas of the code that present concrete problems, as well as generalobservations that traverse the entire codebase horizontally, which could improve its quality as a whole.

irThis audit only applies to the specified code, software or any materials supplied by the Zedxion team forspecified versions. Whenever the code, software, materials, settings, environment etc is changed, thecomments of this audit will no longer apply.

— Disclaimer

Fa

Note that as of the date of publishing, the contents of this report reflect the current understanding of
known security patterns and state of the art regarding system security. You agree that your access and/oruse, including but not limited to any associated services, products, protocols, platforms, content, andmaterials, will be at your sole risk.
The review does not extend to the compiler layer, or any other areas beyond the programming language, orother programming aspects that could present security risks. If the audited source files are smart contract
files, risks or issues introduced by using data feeds from offchain sources are not extended by this review
either.
Given the size of the project, the findings detailed here are not to be considered exhaustive, and further
testing and audit is recommended after the issues covered are fixed.

1

Presented by FairyproofZedxion ZEDXION TokenTo the fullest extent permitted by law, we disclaim all warranties, expressed or implied, in connection withthis report, its content, and the related services and products and your use thereof, including, without
limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement.
We do not warrant, endorse, guarantee, or assume responsibility for any product or service advertised oroffered by a third party through the product, any open source or third-party software, code, libraries,
materials, or information linked to, called by, referenced by or accessible through the report, its content,
and the related services and products, any hyperlinked websites, any websites or mobile applications
appearing on any advertising, and we will not be a party to or in any way be responsible for monitoring any

rooftransaction between you and any third-party providers of products or services.

FOR AVOIDANCE OF DOUBT, THE REPORT, ITS CONTENT, ACCESS, AND/OR USAGE THEREOF, INCLUDINGANY ASSOCIATED SERVICES OR MATERIALS, SHALL NOT BE CONSIDERED OR RELIED UPON AS ANY FORM OF
FINANCIAL, INVESTMENT, TAX, LEGAL, REGULATORY, OR OTHER ADVICE.

— Methodology

The above files' code was studied in detail in order to acquire a clear impression of how the its

specifications were implemented. The codebase was then subject to deep analysis and scrutiny, resulting ina series of observations. The problems and their potential solutions are discussed in this document and,
whenever possible, we identify common sources for such problems and comment on them as well.

yp

The Fairyproof auditing process follows a routine series of steps:
1. Code Review, Including:
Project Diagnosis

Understanding the size, scope and functionality of your project’s source code based on the specifications,sources, and instructions provided to Fairyproof.

ir

Manual Code Review

Reading your source code line-by-line to identify potential vulnerabilities.
Specification Comparison

Determining whether your project’s code successfully and efficiently accomplishes or executes its functions

Fa

according to the specifications, sources, and instructions provided to Fairyproof.
2. Testing and Automated Analysis, Including:
Test Coverage Analysis

Determining whether the test cases cover your code and how much of your code is exercised or executed
when test cases are run.
Symbolic Execution

Analyzing a program to determine the specific input that causes different parts of a program to execute its
functions.
3. Best Practices Review

2

Presented by FairyproofZedxion ZEDXION Token
Reviewing the source code to improve maintainability, security, and control based on the latest establishedindustry and academic practices, recommendations, and research.

— Structure of the document
This report contains a list of issues and comments on all the above source files. Each issue is assigned aseverity level based on the potential impact of the issue and recommendations to fix it, if applicable. For
report.

— Documentationroofease of navigation, an index by topic and another by severity are both provided at the beginning of the

For this audit, we used the following source(s) of truth about how the token issuance function should work:
Website:https://www.zedxion.io/en_US/
Source Code:https://etherscan.io/address/0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341#code

https://bscscan.com/address/0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341#codeyp

https://tronscan.io/#/contract/TMNTn2uFAHhkGE3uuM84rhfRRjt6ry9xnL/code

These were considered the specification, and when discrepancies arose with the actual code behavior, weconsulted with the Zedxion team or reported an issue.

ir— Comments from Auditor
Serial Number

Audit Time

ResultFairyproof Security TeamJan 18, 2023 - Jan 19, 2023

Medium Risk

Fa

2023012000022014

Auditor3

Presented by FairyproofZedxion ZEDXION Token
Summary:
The Fairyproof security team used its auto analysis tools and manual work to audit the project. During theaudit, two issues of medium-severity and one issue of low-severity were uncovered. The Zedxion teamacknowledged all the issues.

roof

02. About Fairyproof

Fairyproof is a leading technology firm in the blockchain industry, providing consulting and security audits
for organizations. Fairyproof has developed industry security standards for designing and deploying
blockchain applications.

03. Introduction to Zedxion

Zedxion offers a comprehensive solution to the major problems faced by the traditional, fiat-driven
monetary system. Building a crypto powered ecosystem comprising Zedxion Token.

yp

The above description is quoted from relevant documents of Zedxion.

ir

04. Major functions of audited code
The audited code mainly implements a token issuance function. Here are the details:
Blockchain: Multi Blockchain
Token Standard: ERC20

Token Address: 0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341 (Ethereum)
Token Address: 0xfbc4f3f645c4003a2e4f4e9b51077d2daa9a9341 (BNB Chain)
Token Address: TMNTn2uFAHhkGE3uuM84rhfRRjt6ry9xnL (Tron)

Fa

Token Name: Zedxion

Token Symbol: ZEDXION
Decimals: 18

Current Supply: 4,746,558,037
Max Supply: No Cap
Burnable: Yes
Mintable: Yes

05. Coverage of issues 4

Presented by FairyproofZedxion ZEDXION Token

05. Coverage of issues
The issues that the Fairyproof team covered when conducting the audit include but are not limited to thefollowing ones:
Access Control
Arithmetic Precision
Code Improvement
Contract Upgrade/Migration
Delete Trap
Design Vulnerability
DoS Attack
EOA Call Trap
Fake Deposit
Function Visibility
Gas Consumption
Implementation Vulnerability
Inappropriate Callback Function
Injection Attack
IsContract Trap
Miner's Advantage
Misc
Price Manipulation

yp

Integer Overflow/Underflow

roofAdmin Rights

Proxy selector clashing

Pseudo Random Number

ir

Re-entrancy Attack
Replay Attack

Rollback Attack

Shadow Variable
Slot Conflict

Token IssuanceTx.origin Authentication

Fa

Uninitialized Storage Pointer06. Severity level reference
Every issue in this report was assigned a severity level from the following:
Criticalseverity issues need to be fixed as soon as possible.

5

Presented by FairyproofZedxion ZEDXION Tokenseverity issues will probably bring problems and should be fixed.

MediumLow

severity issues could potentially bring problems and should eventually be fixed.

severity issues are minor details and warnings that can remain unfixed but would be better fixed atsome point in the future.

Informational

ro
of

High

is not an issue or risk but a suggestion for code improvement.

07. Major areas that need attention

Based on the provided source code the Fairyproof team focused on the possible issues and risks related toyp

the following functions or areas.

- Function Implementation

We checked whether or not the functions were correctly implemented.

ir

We found one issue, for more details please refer to [FP-3] in "09. Issue description".

- Access Control

We checked each of the functions that could modify a state, especially those functions that could only beaccessed by owner or administrator

Fa

We found one issue, for more details please refer to [FP-2] in "09. Issue description".

- Token Issuance & Transfer
We examined token issuance and transfers for situations that could harm the interests of holders.
We found one issue, for more details please refer to [FP-1] in "09. Issue description".

- State Update

6

Presented by FairyproofZedxion ZEDXION Token
We checked some key state variables which should only be set at initialization.
We didn't find issues or risks in these functions or areas at the time of writing.

- Asset Security
We checked whether or not all the functions that transfer assets were safely handled.

roof

We didn't find issues or risks in these functions or areas at the time of writing.

- Miscellaneous

We checked the code for optimization and robustness.

We didn't find issues or risks in these functions or areas at the time of writing.

08. List of issues by severity
Title

Issue/Risk

Severity

StatusFP-1

Unlimited Token Issuance

Token Issuance

Medium

Acknowledged

FP-2

Owner Transfer Issue

Access Control

Medium

Acknowledged

FP-3

Redundant State Variables

Design Vulnerability

Low

Acknowledged

ir

yp

Index

09. Issue descriptions

Fa[FP-1] Unlimited Token Issuance
Token Issuance

Medium

Acknowledged

Issue/Risk: Token IssuanceDescription:

In the current contract, tokens can be issued additionally and there is no cap on issuance,which may cause
losses to token holders in certain scenarios.
Recommendation:
Consider setting a cap on token issuance.

7

Presented by FairyproofZedxion ZEDXION Token
Update/Status:
The Zedxion team prefers to keep it now and will improve the code in the future.

[FP-2] Owner Transfer Issue
Access Control

Medium

AcknowledgedroofIssue/Risk: Access Control
Description:

The Zedxion contract deployed at 0xFbC4f3f645C4003a2E4F4e9b51077d2DaA9a9341 on the BNB chain has
two private _owner variables, one defined in the Ownable contract and the other defined in the

ZedxionBEP20 contract. And ZedxionBEP20 inherits Ownable . All owner related operations areauthorized by the _owner variable in the Ownable contract. All mint and burn operations are authorized by
the _owner in the ZedxionBEP20 contract and the the _owner cannot be changed since it is also thedeployer of the contract. Therefore after calling the functions to transfer the owner 's right, the contract's
owner address will be shown as zero. But the owner 's right hasn't been really transferred. This will

confuse users.
Recommendation:yp

Since the contracts have been deployed and cannot be changed, consider not transferring the owner's rightor disallowing the transfer of the owner's right to avoid confusing users.
Update/Status:

The Zedxion team has acknowledged this issue.

ir[FP-3] Redundant State Variables
Design Vulnerability

Low

Acknowledged

Issue/Risk: Design Vulnerability

Fa

Description:

The Zedxion contract deployed at TMNTn2uFAHhkGE3uuM84rhfRRjt6ry9xnL on Tron has the following
redundant variables:1

uint256 private _totalSupply;2

uint256 private _burnToken;

3

uint256 private _totalMintableTokens;4

address private _owner;

These variables have been defined in their child contracts and they are not used in Zedxion . They are
redundant.

8

Presented by FairyproofZedxion ZEDXION Token
Recommendation:
In general a child contract shall not define variables that have the same names as the ones defined in its
father contract. Consider removing these redundant variables.
Update/Status:roof

The Zedxion team has acknowledged this issue.

10. Recommendations to enhance the overall
security
We list some recommendations in this section. They are not mandatory but will enhance the overall securityof the system if they are adopted.

Note that the current owner cannot be transferred, and owner permissions need to be carefully kept
to prevent loss or disclosure of permissions.

yp

11. Appendicesir11.1 Unit Test

1. Zedxion_eth.t.js
1

const { expect, assert } = require("chai");2

const { ethers } = require("hardhat");

Fa

3
4

describe("Zedxion Token deployed on Ethereum unit test", function () {5

let owner,user1,user2,users;

6

let instance;

7

const init_supply_unit = ethers.constants.WeiPerEther;8

async function deployTokens() {9const Zedxion = await ethers.getContractFactory("Zedxion");10

instance = await Zedxion.deploy("Zedxion","ZEDXION",18,10);

11

}

12
13

beforeEach(async () =>{14[owner, user1, user2, ...users] = await ethers.getSigners();

15

await deployTokens();

9

Presented by FairyproofZedxion ZEDXION Token
16

});

17
18

describe("init state test", () => {19

it("init state check", async () => {20

expect(await instance.burnedTokens()).to.be.equal(0);21expect(await
instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(10));22

expect(await
instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));

24

});
});

25
26

ro
of

23

describe("Mint test", () => {27

it("Receiver must be owner", async () => {28

await expect(instance.mint(user1.address,100)).to.be.revertedWith(

29"ERC20: mint not allowed this address"

30

);

31

});

32

it("Msg.sender must owner", async () => {

33

await

expect(instance.connect(user1).mint(owner.address,100)).to.be.revertedWith(
34"ERC20: mint not allowed to this address"

35

);
});

37

it("Mint should change state", async () => {38

await instance.mint(owner.address,1);

39

yp

36

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(11));40

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(11));
});

ir

41
42

it("Mint should have a cap", async () => {44

let ten = ethers.BigNumber.from("10");45

let amount = ten.pow(69 - 18).sub(10);46

await instance.mint(owner.address,amount);

47

expect(await instance.totalSupply()).to.be.equal(ten.pow(69));48

assert(false,"mint no cap");

Fa

43

49
50

});

});

51
52
53

describe("Burn test", () => {it("Target must be owner", async () => {54

await expect(instance.burn(user1.address,1)).to.be.revertedWith(

55
56"ERC20: burn not allowed to this address"
);

57

});

58

it("Msg.sender must owner", async () => {10

Presented by FairyproofZedxion ZEDXION Token
59

await
expect(instance.connect(user1).burn(owner.address,1)).to.be.revertedWith(60"ERC20: burn not allowed to this address"

61

);
});

63

it("Burn should change state", async () => {64

await instance.burn(owner.address,1);65

let burn_tokens = await instance.burnedTokens();66

let total_supply = await instance.totalSupply();67

expect(await

ro
of

62

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(9));
68expect(total_supply).to.be.equal(init_supply_unit.mul(9));

69expect(burn_tokens).to.be.equal(init_supply_unit);

70
71

});
});

72
73

describe("Approval test", () => {74

it("approve should change state and emit event", async () => {

75

await

expect(instance.connect(user1).approve(user2.address,100)).to.be.emit(
76

instance,"Approval"

77).withArgs(user1.address,user2.address,100);78

expect(await

79
80

});
});

81
82
83

yp

instance.allowance(user1.address,user2.address)).to.be.equal(100);

describe("Transfer test",() => {

it("Transfer to zero should be failed", async () => {

84

await

ir

expect(instance.transfer(ethers.constants.AddressZero,0)).to.be.rejectedWith(85"ERC20: transfer to the zero address"

86
87

);

});

88
89

it("Transfer zero token should be successfully", async () => {

90

});

Fa

91

await instance.transfer(user2.address,0);

92
93

it("Transfer should change balance", async () => {94

await instance.transfer(user1.address,100);95

expect(await instance.balanceOf(user1.address)).to.be.equal(100);96

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(10).sub(100));

97

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));
98

});

99
100

it("Transfer beyond balance should be failed", async () => {11

Presented by FairyproofZedxion ZEDXION Token
101

await instance.transfer(user1.address,100);

102

await
expect(instance.connect(user1).transfer(user2.address,101)).to.be.rejectedWith(103"ERC20: transfer amount exceeds balance"

104

);

105

});

106
it("TransferFrom should transfer token", async () => {108

await instance.transfer(user1.address,10000);

109

await instance.connect(user1).approve(user2.address,10000);

110

await

ro
of

107

instance.connect(user2).transferFrom(user1.address,user2.address,10000);
111

expect(await instance.balanceOf(user2.address)).to.be.equal(10000);112

expect(await instance.balanceOf(user1.address)).to.be.equal(0);113

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));
114
115

});

116
117

it("TransferFrom to zero address should be failed", async () => {

118

await

expect(instance.transferFrom(user1.address,ethers.constants.AddressZero,100)).to.b
119

});

120
121

yp

e.reverted;

it("TransferFrom beyond approval should be failed", async () => {122

await instance.transfer(user1.address,10000);

123

await instance.connect(user1).approve(owner.address,1000)

124

await

expect(instance.transferFrom(user1.address,user2.address,1002)).to.be.revertedWith

ir

(

125

"ERC20: transfer amount exceeds allowance"

126
127

);

});

128
129

it("TransferFrom beyond balance should be failed", async () => {await instance.transfer(user1.address,900);

131

await instance.connect(user1).approve(owner.address,1000)

132

await

Fa

130

expect(instance.transferFrom(user1.address,user2.address,950)).to.be.rejectedWith(

133
134
135

"ERC20: transfer amount exceeds balance"
);

});

136
137

it("TransferFrom should change approval", async () => {138

await instance.transfer(user1.address,1000);

139

await instance.connect(user1).approve(owner.address,1000);

140

expect(await
instance.allowance(user1.address,owner.address)).to.be.equal(1000);

12

Presented by FairyproofZedxion ZEDXION Token
141

await instance.transferFrom(user1.address,user2.address,1000);

142

expect(await instance.balanceOf(user1.address)).to.be.equal(0);143expect(await
instance.allowance(user1.address,owner.address)).to.be.equal(0);

144

});

145
146

});
});

147

2. Zedxion_bsc.t.js

ro
of

148

1

const { expect, assert } = require("chai");2

const { ethers } = require("hardhat");3
4

describe("Zedxion Token deployed on BNB Chain unit test", function () {5

let owner,user1,user2,users;

6

let instance;

7

const init_supply_unit = ethers.constants.WeiPerEther;8

async function deployTokens() {const ZedxionBEP20 = await ethers.getContractFactory("ZedxionBEP20");

10

yp

9

instance = await ZedxionBEP20.deploy("Zedxion","ZEDXION",18,10);

11

}

12
13

beforeEach(async () =>{14[owner, user1, user2, ...users] = await ethers.getSigners();

15

await deployTokens();
});

ir

16
17
18

describe("init state test", () => {19

it("init state check", async () => {20

expect(await

instance.totalMitable()).to.be.equal(init_supply_unit.mul(10));21

expect(await instance.burnedTokens()).to.be.equal(0);expect(await

Fa

22

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(10));23

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));

24

});

25

});

26
27

describe("Confusing owner test", () => {28

it("Contract should have only owner", async () => {29

let first_slot = await
ethers.provider.getStorageAt(instance.address,0);30

let first_owner_str = "0x" + first_slot.substring(first_slot.length 40);

13

Presented by FairyproofZedxion ZEDXION Token
31

let first_owner = ethers.utils.getAddress(first_owner_str);

32

let ninth_slot = await
ethers.provider.getStorageAt(instance.address,8);33

let second_owner_str = "0x" + ninth_slot.substring(ninth_slot.length 42,ninth_slot.length -2);

34

let second_owner = ethers.utils.getAddress(second_owner_str);

35

assert(first_owner == owner.address,"unmatched first owner");

36

assert(second_owner == owner.address,"unmatched second owner");

37

assert(false,"Has two owner");
});

39
40

ro
of

38

it("Mint should be failed address after renounceOwnership", async () => {41

expect(await instance.getOwner()).to.be.equal(owner.address);

42

await instance.renounceOwnership();

43

expect(await

instance.getOwner()).to.be.equal(ethers.constants.AddressZero);44

await expect(instance.mint(owner.address,100)).to.be.revertedWith(45"BEP20: mint not allowed this address"

46

);

47
48

});
});

49
51

describe("Mint test", () => {it("Receiver must be owner", async () => {

52

yp

50

await expect(instance.mint(user1.address,100)).to.be.revertedWith(53"BEP20: mint not allowed this address"

54

);

55

});

56

it("Msg.sender must owner", async () => {

57

await

ir

expect(instance.connect(user1).mint(owner.address,100)).to.be.revertedWith(

58"BEP20: mint not allowed to this address"

59

);

60

});

61

it("Mint should change state", async () => {62

await instance.mint(owner.address,1);63

expect(await

Fa

instance.totalMitable()).to.be.equal(init_supply_unit.mul(11));64

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(11));65

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(11));

66

});

67

it("Mint should have a cap", async () => {68

let ten = ethers.BigNumber.from("10");69

let amount = ten.pow(69 - 18).sub(10);70await instance.mint(owner.address,amount);

71

expect(await instance.totalSupply()).to.be.equal(ten.pow(69));

72

assert(false,"mint no cap");

14

Presented by FairyproofZedxion ZEDXION Token
73
74

});
});

75
76

describe("Burn test", () => {77

it("Target must be owner", async () => {78

await expect(instance.burn(user1.address,1)).to.be.revertedWith(

79"BEP20: burn not allowed to this address"

80

);
});

82

it("Msg.sender must owner", async () => {

83

await

ro
of

81

expect(instance.connect(user1).burn(owner.address,1)).to.be.revertedWith(
84"BEP20: burn not allowed to this address"

85

);

86

});

87

it("Burn should change state", async () => {88

await instance.burn(owner.address,1);89

let mint_tokens = await instance.totalMitable();90

let burn_tokens = await instance.burnedTokens();91

let total_supply = await instance.totalSupply();

92

expect(mint_tokens).to.be.equal(init_supply_unit.mul(10));93

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(9));
expect(total_supply).to.be.equal(init_supply_unit.mul(9));

95

expect(burn_tokens).to.be.equal(init_supply_unit);

96

expect(mint_tokens.sub(burn_tokens)).to.be.equal(total_supply);

97
98

});
});

99
100

yp

94

describe("Approval test", () => {it("approve should change state and emit event", async () => {

ir

101
102

await

expect(instance.connect(user1).approve(user2.address,100)).to.be.emit(

103

instance,"Approval"

104).withArgs(user1.address,user2.address,100);

105

expect(await

instance.allowance(user1.address,user2.address)).to.be.equal(100);
});

Fa

106
107
108

it("increaseAllowance should change state and emit event", async () => {

109

await

expect(instance.connect(user1).increaseAllowance(user2.address,100)).to.be.emit(

110

instance,"Approval"

111).withArgs(user1.address,user2.address,100);112

expect(await

instance.allowance(user1.address,user2.address)).to.be.equal(100);
113

});

114
115

});

15

Presented by FairyproofZedxion ZEDXION Token
116
117
118

describe("Transfer test",() => {

it("Transfer to zero should be failed", async () => {

119

await
expect(instance.transfer(ethers.constants.AddressZero,0)).to.be.rejectedWith(

120"BEP20: transfer to the zero address"

121
122

);
});

123
it("Transfer zero token should be successfully", async () => {

125
126

ro
of

124

await instance.transfer(user2.address,0);
});

127
128

it("Transfer should change balance", async () => {129

await instance.transfer(user1.address,100);130

expect(await instance.balanceOf(user1.address)).to.be.equal(100);131

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply_unit.mul(10).sub(100));
132

expect(await

instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));
133

});

134
135

it("Transfer beyond balance should be failed", async () => {await instance.transfer(user1.address,100);

137

await

yp

136

expect(instance.connect(user1).transfer(user2.address,101)).to.be.rejectedWith(138"BEP20: transfer amount exceeds balance"

139
140

);
});

141

it("TransferFrom should transfer token", async () => {143

await instance.transfer(user1.address,10000);

144

await instance.connect(user1).approve(user2.address,10000);

145

await

ir

142

instance.connect(user2).transferFrom(user1.address,user2.address,10000);
expect(await instance.balanceOf(user2.address)).to.be.equal(10000);

147

expect(await instance.balanceOf(user1.address)).to.be.equal(0);148

expect(await

Fa

146

instance.totalSupply()).to.be.equal(init_supply_unit.mul(10));

149
150

});

151
152

it("TransferFrom to zero address should be failed", async () => {

153

await

expect(instance.transferFrom(user1.address,ethers.constants.AddressZero,100)).to.b
e.reverted;

154

});

155
156

it("TransferFrom beyond approval should be failed", async () => {16

Presented by FairyproofZedxion ZEDXION Token
157

await instance.transfer(user1.address,10000);

158

await instance.connect(user1).approve(owner.address,1000)

159

await
expect(instance.transferFrom(user1.address,user2.address,1002)).to.be.revertedWith(

160"BEP20: transfer amount exceeds allowance"

161

);

162

});

163
it("TransferFrom beyond balance should be failed", async () => {

ro
of

164
165

await instance.transfer(user1.address,900);

166

await instance.connect(user1).approve(owner.address,1000)

167

await

expect(instance.transferFrom(user1.address,user2.address,950)).to.be.rejectedWith(168"BEP20: transfer amount exceeds balance"

169

);

170

});

171
172

it("TransferFrom should change approval", async () => {173

await instance.transfer(user1.address,1000);

174

await instance.connect(user1).approve(owner.address,1000);

175

expect(await

instance.allowance(user1.address,owner.address)).to.be.equal(1000);

await instance.transferFrom(user1.address,user2.address,1000);

177

expect(await instance.balanceOf(user1.address)).to.be.equal(0);178expect(await

yp

176

instance.allowance(user1.address,owner.address)).to.be.equal(0);
179

});

180
181

});

ir

182
183

});

184
185

Fa

3. Zedxion_trc.t.js
1

const { expect, assert } = require("chai");2

const { ethers } = require("hardhat");3
4

describe("Zedxion Token deployed on tron unit test", function () {5

let owner,user1,user2,users;

6

let instance;

7

const init_supply = ethers.utils.parseEther("4746558037.0");8

async function deployTokens() {9const ZedxionTron = await ethers.getContractFactory("ZedxionTron");10

instance = await ZedxionTron.deploy();

17

Presented by FairyproofZedxion ZEDXION Token
11

}

12
13

beforeEach(async () =>{14[owner, user1, user2, ...users] = await ethers.getSigners();

15

await deployTokens();

16

});

17
18

describe("init state test", () => {19

it("init state check", async () => {expect(await instance.getOwner()).to.be.equal(owner.address);

21

expect(await instance.totalMitable()).to.be.equal(init_supply);

22

expect(await instance.burnedTokens()).to.be.equal(0);23expect(await

ro
of

20

instance.balanceOf(owner.address)).to.be.equal(init_supply);24

expect(await instance.totalSupply()).to.be.equal(init_supply);

25

});

26

});

27
28

describe("Mint test", () => {29

it("Receiver must be owner", async () => {30

await expect(instance.mint(user1.address,100)).to.be.revertedWith(

31"TRC20: mint not allowed this address"

32

);
});

34

it("Msg.sender must owner", async () => {

35

yp

33

await

expect(instance.connect(user1).mint(owner.address,100)).to.be.revertedWith(36"TRC20: mint not allowed to this address"

37

);
});

39

it("Mint should change state", async () => {40

await instance.mint(owner.address,1);41

expect(await

ir

38

instance.totalMitable()).to.be.equal(init_supply.add(ethers.constants.WeiPerEther));42

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply.add(ethers.constants.We

Fa

iPerEther));

43

expect(await

instance.totalSupply()).to.be.equal(init_supply.add(ethers.constants.WeiPerEther))
;

44

});

45

it("Mint should have a cap", async () => {46

let ten = ethers.BigNumber.from("10");47

let amount = ten.pow(69 - 18).sub(4746558037);48

await instance.mint(owner.address,amount);

49

expect(await instance.totalSupply()).to.be.equal(ten.pow(69));50

assert(false,"mint no cap");

51

});

18

Presented by FairyproofZedxion ZEDXION Token
52

});

53
54

describe("Burn test", () => {55

it("Target must be owner", async () => {56

await expect(instance.burn(user1.address,1)).to.be.revertedWith(

57"TRC20: burn not allowed to this address"

58

);

59

});

60

it("Msg.sender must owner", async () => {
await

ro
of

61

expect(instance.connect(user1).burn(owner.address,1)).to.be.revertedWith(
62"TRC20: burn not allowed to this address"

63

);

64

});

65

it("Burn should change state", async () => {66

await instance.burn(owner.address,1);67

let mint_tokens = await instance.totalMitable();68

let burn_tokens = await instance.burnedTokens();69

let total_supply = await instance.totalSupply();70

expect(mint_tokens).to.be.equal(init_supply);71

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply.sub(ethers.constants.We
72

yp

iPerEther));

expect(total_supply).to.be.equal(init_supply.sub(ethers.constants.WeiPerEther));73

expect(burn_tokens).to.be.equal(ethers.constants.WeiPerEther);74

expect(mint_tokens.sub(burn_tokens)).to.be.equal(total_supply);

75
76

});
});

77

describe("Approval test", () => {

ir

78
79

it("approve should change state and emit event", async () => {

80

await

expect(instance.connect(user1).approve(user2.address,100)).to.be.emit(

81

instance,"Approval"

82).withArgs(user1.address,user2.address,100);83

expect(await

Fa

instance.allowance(user1.address,user2.address)).to.be.equal(100);

84

});

85
86

it("increaseAllowance should change state and emit event", async () => {

87

await

expect(instance.connect(user1).increaseAllowance(user2.address,100)).to.be.emit(

88

instance,"Approval"

89).withArgs(user1.address,user2.address,100);90

expect(await
instance.allowance(user1.address,user2.address)).to.be.equal(100);

91

});

92

19

Presented by FairyproofZedxion ZEDXION Token
93

it("decreaseAllowance should change state and emit event", async () => {94

await instance.connect(user1).approve(user2.address,300);

95

await
expect(instance.connect(user1).decreaseAllowance(user2.address,100)).to.be.emit(

96

instance,"Approval"

97).withArgs(user1.address,user2.address,200);98

expect(await
instance.allowance(user1.address,user2.address)).to.be.equal(200);

99

});
});

101
102
103

describe("Transfer test",

ro
of

100

() => {

it("Transfer to zero should be failed", async () => {

104

await

expect(instance.transfer(ethers.constants.AddressZero,0)).to.be.rejectedWith(105"ERC20: transfer to the zero address"

106
107

);
});

108
109

it("Transfer zero token should be successfully", async () => {

110
111

await instance.transfer(user2.address,0);
});

112

it("Transfer should change balance", async () => {114

await instance.transfer(user1.address,100);

115

expect(await instance.balanceOf(user1.address)).to.be.equal(100);

116

yp

113

expect(await

instance.balanceOf(owner.address)).to.be.equal(init_supply.sub(100));
117
118

expect(await instance.totalSupply()).to.be.equal(init_supply);
});

ir

119
120

it("Transfer beyonds balance should be failed", async () => {121

await instance.transfer(user1.address,100);

122

await

expect(instance.connect(user1).transfer(user2.address,101)).to.be.rejectedWith(

123"SafeMath: subtraction overflow"

124

});

Fa

125

);

126
127

it("TransferFrom should transfer token", async () => {128

await instance.transfer(user1.address,10000);

129

await instance.connect(user1).approve(user2.address,10000);

130

await

instance.connect(user2).transferFrom(user1.address,user2.address,10000);

131

expect(await instance.balanceOf(user2.address)).to.be.equal(10000);

132

expect(await instance.balanceOf(user1.address)).to.be.equal(0);133expect(await instance.totalSupply()).to.be.equal(init_supply);

134
135

});

20

Presented by FairyproofZedxion ZEDXION Token
136
137

it("TransferFrom to zero address should be failed", async () => {

138

await
expect(instance.transferFrom(user1.address,ethers.constants.AddressZero,100)).to.be.rejectedWith(

139"ERC20: transfer to the zero address"

140

);

141

});

142
it("TransferFrom beyond approval should be failed", async () => {

ro
of

143
144

await instance.transfer(user1.address,10000);

145

await instance.connect(user1).approve(owner.address,1000)

146

await

expect(instance.transferFrom(user1.address,user2.address,1002)).to.be.revertedWith(
147"SafeMath: subtraction overflow"

148

);

149

});

150
151

it("TransferFrom beyond balance should be failed", async () => {152

await instance.transfer(user1.address,900);

153

await instance.connect(user1).approve(owner.address,1000)

154

await

155

yp

expect(instance.transferFrom(user1.address,user2.address,950)).to.be.rejectedWith("SafeMath: subtraction overflow"

156

);

157

});

158
159

it("TransferFrom should change approval", async () => {await instance.transfer(user1.address,1000);

161

await instance.connect(user1).approve(owner.address,1000);

162

expect(await

ir

160

instance.allowance(user1.address,owner.address)).to.be.equal(1000);

163

await instance.transferFrom(user1.address,user2.address,1000);

164

expect(await instance.balanceOf(user1.address)).to.be.equal(0);165

expect(await

instance.allowance(user1.address,owner.address)).to.be.equal(0);
});

Fa

166
167
168

});

});

169
170

21

Presented by FairyproofZedxion ZEDXION Token

4. output
2

Zedxion Token deployed on BNB Chain unit test
init state test3

✔ init state check4

Confusing owner test

56
71) Contract should have only owner2) Mint should be failed address after renounceOwnership
Mint test

8✔ Receiver must be owner9✔ Msg.sender must owner

10✔ Mint should change state113) Mint should have a cap

12Burn test

13✔ Target must be owner

14✔ Msg.sender must owner

15
16✔ Burn should change state
Approval test

ro
of

1

17

✔ approve should change state and emit event18✔ increaseAllowance should change state and emit event

19

Transfer test

✔ Transfer to zero should be failed

21✔ Transfer zero token should be successfully

22✔ Transfer should change balance23✔ Transfer beyond balance should be failed

24✔ TransferFrom should transfer token

25✔ TransferFrom to zero address should be failed

26✔ TransferFrom beyond approval should be failed

27✔ TransferFrom beyond balance should be failed

28✔ TransferFrom should change approval

ir

yp

20

29
30
31
32
33

Zedxion Token deployed on Ethereum unit test
init state test

✔ init state check

Mint test✔ Receiver must be owner

35✔ Msg.sender must owner

Fa

34
36
37
38

✔ Mint should change state4) Mint should have a cap

Burn test

39✔ Target must be owner40✔ Msg.sender must owner

41
42
43
44

✔ Burn should change state

Approval test
✔ approve should change state and emit event
Transfer test45

✔ Transfer to zero should be failed

46✔ Transfer zero token should be successfully47✔ Transfer should change balance

22

Presented by FairyproofZedxion ZEDXION Token48✔ Transfer beyond balance should be failed

49✔ TransferFrom should transfer token

50✔ TransferFrom to zero address should be failed

51✔ TransferFrom beyond approval should be failed

52✔ TransferFrom beyond balance should be failed

53✔ TransferFrom should change approval

54
56
57
58

Zedxion Token deployed on tron unit test
init state test
✔ init state check
Mint test

59✔ Receiver must be owner60✔ Msg.sender must owner

61✔ Mint should change state625) Mint should have a cap

63

Burn test

64✔ Target must be owner65✔ Msg.sender must owner

66✔ Burn should change state

67

Approval test

ro
of

55

68

✔ approve should change state and emit event69✔ increaseAllowance should change state and emit event70✔ decreaseAllowance should change state and emit event
Transfer testyp

71

✔ Transfer to zero should be failed

73✔ Transfer zero token should be successfully74✔ Transfer should change balance75✔ Transfer beyonds balance should be failed

76✔ TransferFrom should transfer token

77✔ TransferFrom to zero address should be failed

78✔ TransferFrom beyond approval should be failed

79✔ TransferFrom beyond balance should be failed

80✔ TransferFrom should change approval

ir

72

81
82
83

54 passing (4s)84

5 failingFa85

11.2 External Functions Check Points

23

Presented by FairyproofZedxion ZEDXION Token

1. output.md
File: contracts/ZedxionBEP20.sol(Empty fields in the table represent things that are not required or relevant)fields
contract: ZedxionBEP20 is Ownable, IBEP20
Visibility1

name()

public2

getOwner()

public3

symbol()public4

decimals()public5

totalSupply()

public6

totalMitable()

public7

balanceOf(address)

public8

burnedTokens()

public9transfer(address,uint256)

public10transferFrom(address,address,uint256)

public11

allowance(address,address)

public12

increaseAllowance(address,uint256)

public13

approve(address,uint256)

public14burn(address,uint256)

public15mint(address,uint256)

16

renounceOwnership()

17transferOwnership(address)

Permission Check

Re-entrancy CheckpublicInjection Check

Unit Test

Notes

ro
of

Function

PassedPassedPassedPassedPassedPassedPassedPassedPassedPassed_ownerPassed_ownerPassedyp

Index

publicir

publicFile: contracts/ZedxionTRC20.sol(Empty fields in the table represent things that are not required or relevant)Fa

contract: ZedxionTron is TRC20, TRC20Detailed

24

Presented by FairyproofZedxion ZEDXION Token
Function

Visibility1

name()

public2

symbol()public3

decimals()public4

totalSupply()

publicPassed5balanceOf(address)

publicPassed6transfer(address,uint256)

publicPassed7

allowance(address,address)

publicPassed8

approve(address,uint256)

publicPassed9transferFrom(address,address,uint256)

public10

increaseAllowance(address,uint256)

public11

decreaseAllowance(address,uint256)

public12

totalMitable()

public13

getOwner()

public14

burnedTokens()

public15burn(address,uint256)

public16mint(address,uint256)

publicRe-entrancy Check

Injection Check

Unit Test

Notes

PassedPassedPassedPassedPassedPassed_ownerPassed_ownerPassedypFile: contracts/Zedxion.sol

Permission Check

ro
of

Index

(Empty fields in the table represent things that are not required or relevant)contract: Zedxion is Context, IERC20
Function1

name()

Visibility

Permission Check

Re-entrancy Check

Injection Check

Unit Test

2

symbol()public3

decimals()public4

totalSupply()

public5balanceOf(address)

publicPassed6

burnedTokens()

publicPassed7transfer(address,uint256)

publicPassed8

allowance(address,address)

publicPassed9

approve(address,uint256)

publicPassed10transferFrom(address,address,uint256)

publicPassed11burn(address,uint256)

public_ownerPassed12mint(address,uint256)

public_ownerPassedFa

Notes

public

ir

Index

25

Presented by Fairyproof