EdificeX Info

EdificeX democratizes real estate ownership by implementing the declining partnership mode of finance through an innovative technology called real estate tokenization. Our solution allows buyers to acquire portions of a property and gradually purchase the rest as their finances permit. We make the home-buying process flexible, accessible, interest-free, and seamless.

EdificeX Logo

TrustNet Score

The TrustNet Score evaluates crypto projects based on audit results, security, KYC verification, and social media presence. This score offers a quick, transparent view of a project's credibility, helping users make informed decisions in the Web3 space.

80.00
Poor Excellent

Real-Time Threat Detection

Real-time threat detection, powered by Cyvers.io, is currently not activated for this project.

This advanced feature provides continuous monitoring and instant alerts to safeguard your assets from potential security threats. Real-time detection enhances your project's security by proactively identifying and mitigating risks. For more information, click here.

Security Assessments

"Static Analysis Dynamic Analysis Symbolic Execution SWC Check Manual Review"
Contract address
N/A
Network N/A
License N/A
Compiler N/A
Type N/A
Language Solidity
Onboard date 2024/12/03
Revision date 2024/12/10

Summary and Final Words

No crucial issues found

The contract does not contain issues of high or medium criticality. This means that no known vulnerabilities were found in the source code.

Contract owner cannot mint

It is not possible to mint new tokens.

Contract owner cannot blacklist addresses.

It is not possible to lock user funds by blacklisting addresses.

Contract owner cannot set high fees

The fees, if applicable, can be a maximum of 25% or lower. The contract can therefore not be locked. Please take a look in the comment section for more details.

Contract cannot be locked

Owner cannot lock any user funds.

Token cannot be burned

There is no burning within the contract without any allowances

Ownership is not renounced

The owner retains significant control, which could potentially be used to modify key contract parameters.

Scope of Work

This audit encompasses the evaluation of the files listed below, each verified with a SHA-1 Hash. The team referenced above has provided the necessary files for assessment.

The auditing process consists of the following systematic steps:

  1. Specification Review: Analyze the provided specifications, source code, and instructions to fully understand the smart contract's size, scope, and functionality.
  2. Manual Code Examination: Conduct a thorough line-by-line review of the source code to identify potential vulnerabilities and areas for improvement.
  3. Specification Alignment: Ensure that the code accurately implements the provided specifications and intended functionalities.
  4. Test Coverage Assessment: Evaluate the extent and effectiveness of test cases in covering the codebase, identifying any gaps in testing.
  5. Symbolic Execution: Analyze the smart contract to determine how various inputs affect execution paths, identifying potential edge cases and vulnerabilities.
  6. Best Practices Evaluation: Assess the smart contracts against established industry and academic best practices to enhance efficiency, maintainability, and security.
  7. Actionable Recommendations: Provide detailed, specific, and actionable steps to secure and optimize the smart contracts.

A file with a different Hash has been intentionally or otherwise modified after the security review. A different Hash may indicate a changed condition or potential vulnerability that was not within the scope of this review.

Final Words

The following provides a concise summary of the audit report, accompanied by insightful comments from the auditor. This overview captures the key findings and observations, offering valuable context and clarity.


Ownership Privileges
EdificeXAddressRegistry.sol
  • The admin can whitelist addresses.
  • The admin can set the fee address.
  • The admin can set the reserve address.
  • The admin can set the tax and insurance address.
EdificeXAdminController.sol
  • The owner can add/remove admins from the contract.
EdificeXTokenFactory.sol
  • The admin can create new tokens with the associated governance structure.
EdificeXToken.sol
  • The admin can update any arbitrary value in the token price.
  • The admin can update the musharakahMinAmount and maxAmountToBuy values in the contract.
  • The admin can disable the musharakah.
  • The whitelisted addresses can buy tokens.
  • The admin can mint a specific portion of tokens reserved for refinancing purposes.
  • The admin can transfer buyer deposits to the beneficiary addresses.
  • The whitelisted buyers can purchase tokens from other investors.
EdificeXPropertyManager.sol
  • The admin can toggle policies.
  • The admin or timelock contract can update the payment frequency.
  • The admin or timelock contract can update the rent adjustment period.
  • The admin or timelock contract can update the maintenance strategy.
  • The admin or timelock contract can enable/disable the remodeling setting in the contract.
  • The admin or timelock contract can enable/disable the self-fund repair permission in the contract.
  • The admin or timelock contract can enable/disable the subletting permission in the contract.
EdificeXGovernor.sol
  • The enabled policy can propose a payment frequency update.
  • The enabled policy can propose to update the rent period adjustment.
  • The enabled policy can propose to update the maintenance strategy.
  • The enabled policy can propose to update the grace period update.
  • The enabled policy can propose to update the remodeling permission.
  • The enabled policy can propose to update the self-fund repair permission.
  • The enabled policy can propose to update the subletting permission update.
EdificeXGovernorDeployer.sol
  • The admin can set the governance factory address.
EdificeXGovernanceFactory.sol
  • The admin can set the edifice factory address.
  • The EdificeX factory address can create a new EdificeXTimelock, property manager, and governor contract and grant roles. 

Note - This Audit report consists of a security analysis of the EdificeX smart contract. This analysis did not include functional testing (or unit testing) of the contract’s logic. Moreover, we only audited one token contract for the EdificeX team. Other contracts associated with the project were not audited by our team. We recommend investors do their own research before investing.

Files and details

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Functions
public

/

State variables
public

/

Total lines
of code

/

Capabilities
Hover on items

/

Findings and Audit result

high Issues | 2 findings

Resolved

#1 high Issue
Missing access control for governance contract.
GovernanceFactory.sol
L55-105
Description

The function createGovernance lacks access control, which means any external account can call it to deploy a governance setup. This could lead to misuse or abuse, especially in scenarios where only authorized entities should deploy governance structures for specific tokens. A malicious or unauthorized deployment might conflict with legitimate governance, especially if it's linked to the same token. To mitigate this, Ensure only authorized addresses (e.g., contract owners, admins, or pre-approved deployers) can call createGovernance.

Resolved

#2 high Issue
Missing access control for EdificeXGovernor contract.
GovernorDeployer.sol
L32-58
Description

This function lacks access control, meaning anyone can call deployGovernor to create a new governor contract for a given token. This creates risks, including unauthorized deployments, resource abuse, and potential conflicts with legitimate governance structures. Malicious actors may deploy a governor with invalid configurations or intentions, causing operational or reputational damage. To mitigate this, Ensure only authorized entities can call deployGovernor. This can be done using onlyAdmin or a similar modifier.

medium Issues | 3 findings

Resolved

#1 medium Issue
Missing access control.
BunyanToken.sol
L426-436
Description

Any external account can call this function once the conditions are met (sale succeeded and deposits not yet claimed). A malicious actor can trigger the transfer to beneficiary at an unintended time, potentially disrupting the expected flow of the sale. A malicious caller could repeatedly call this function in rapid succession right before the first claim, disrupting contract behavior or causing unintended side effects like consuming gas unnecessarily. To secure this function, add a modifier that restricts access to the beneficiary. Adding a restriction, such as the onlyBeneficiary modifier, would prevent unauthorized users from triggering the claim process, mitigating potential spam or DoS attacks.

Resolved

#2 medium Issue
Missing Threshold
BunyanToken.sol
L271-277
Description

The function updates the price of the token where as there is no check for max threshold price. An admin could inadvertently or maliciously set an unreasonably high or low price. Sudden price spikes or drops could create confusion or loss for users. Add a threshold validation mechanism to ensure _price stays within acceptable bounds.

Resolved

#3 medium Issue
Missing 'isContract' check.
EdificeXGovernorDeployer.sol
L44-47
Description

The contract lacks a validation check to ensure that specific parameters are contract addresses. Without this check, there is a risk that non-contract addresses (such as externally owned accounts, or EOAs) could be mistakenly set for parameters intended to reference other contracts. This could lead to failures in executing critical interactions within the contract, as EOAs do not support contract-specific functions. To mitigate this, implement a validation check to ensure that parameters designated as contract addresses are verified. This can be done using Solidity’s Address library function contract, which checks if an address has an associated contract code.

low Issues | 8 findings

Resolved

#1 low Issue
Missing zero or dead address check.
AdminController.sol
L27-31
Description

It is recommended to check that the address cannot be set to zero or dead address.

Resolved

#2 low Issue
Floating pragma solidity version
All
L2
Description

Adding the constant version of solidity is recommended, as this prevents the unintentional deployment of a contract with an outdated compiler that contains unresolved bugs.

Resolved

#3 low Issue
Event Emission Doesn't Include maxAmountToBuy
BunyanToken.sol
L279-289
Description

The emitted SetMusharakahMinAmountBP event includes bp and musharakahMinAmount, but not maxAmountToBuy. It may be challenging to debug or trace changes to maxAmountToBuy based on logs. Consider extending the event to include maxAmountToBuy.

Resolved

#4 low Issue
Unused library
LowGasSafeMath.sol
L6-46
Description

The project contains the unused library in the contract which is not recommended. There should not be any additional code which is not used in the contract to avoid high gas fees.

Resolved

#5 low Issue
Unused library
SignedSafeMath.sol
L8-91
Description

The project contains the unused library in the contract which is not recommended. There should not be any additional code which is not used in the contract to avoid high gas fees.

Resolved

#6 low Issue
Missing zero or dead address check.
BunyanToken.sol
L41-43
L49-51
L57-59
L65-67
Description

It is recommended to check that the address cannot be set to zero or dead address.

Pending

#7 low Issue
Missing zero or dead address check.
EdificeXGovernorDeployer.sol
L28-30
Description

It is recommended to check that the address cannot be set to zero or dead address.

Pending

#8 low Issue
Missing zero or dead address check.
EdificeXAddressRegistry.sol
L41-43
L49-51
L57-59
L65-67
Description

It is recommended to check that the address cannot be set to zero or dead address.

optimization Issues | 1 findings

Resolved

#1 optimization Issue
Public function that could be declared external (external-function)
BunyanExchange.sol
L53-66
L68-84
L86-116
Description

Use the `external` attribute for functions never called from the contract.

informational Issues | 1 findings

Acknowledged

#1 informational Issue
Missing emit.
EdificeXGovernorDeployer.sol
L44-47
Description

It is recommended to emit all the critical parameter changes.