Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ’½Source code

www.fourninexai.com

Source code verification provides a way for projects to open source their smart contract code for end users to inspect and verify that it does what it claims to do. By uploading source code, BscScan will match the compiled contract bytecode with that on the blockchain and display it under the Contract Four Nine X Ai is a standard code on BNB Smart Chain (BSC), BEP20 guarantees lower transaction costs stable and fast transactions with the goal of providing a flexible format for developers

Audit by AI (Four Nine X Ai)

βœ… Key Features and Functions

  1. Standard ERC20 Implementation

    • Implements IERC20, IERC20Metadata

    • Supports transfer, approve, transferFrom, increaseAllowance, decreaseAllowance

  2. Owner Control

    • Inherits from Ownable, restricting rescueBalance, rescueToken, transferOwnership to the owner.

  3. Token Supply Initialization

    • On deployment, _mint(owner(), _totalSupply * 10^_decimals) is called to allocate total supply.

  4. Burn Function

    • burn(uint256 amount) allows any token holder to destroy their own tokens.

  5. Token Rescue

    • rescueToken(...): allows the owner to withdraw any ERC20 token sent to the contract.

    • rescueBalance(...): allows the owner to withdraw native BNB from the contract.

  6. Service Fee Payment

    • The contract calls an external payServicesFees() function on deployment to pay for Makecoin services (used by ServicePayer constructor).

    • Referral support via _refaddress.


⚠️ Security Risks & Warnings

Area
Issue / Concern

rescueToken

Owner can withdraw any ERC20 tokens sent to the contract.

rescueBalance

Owner can withdraw all BNB from the contract.

burn

Functionally safe, but should be double-checked if you're implementing tokenomics.

Ownership

renounceOwnership() can remove owner, disabling privileged functions forever.

External Call

Constructor calls payServicesFees() β€” ensure the receiver contract is trusted.


πŸ› οΈ Suggestions for Improvement

  1. Blacklist or Pause Functionality

    • Add Pausable or Blacklistable modifiers to restrict token operations during emergencies.

  2. Emit Events for Rescue

    • Emit custom events in rescueToken() and rescueBalance() for better transparency.

  3. Gas Optimization

    • Use SafeERC20 (from OpenZeppelin) to handle ERC20 token transfers safely, especially for non-standard tokens.

  4. Constructor Comments

    • Document the parameters clearly, especially _servicePayer, _servicesName, and _refaddress.

  5. Security Audit

    • If you plan to go live with real value, get the contract audited to verify the external service call behavior.


πŸ” Summary of Access Control

Function
Access
Action

burn()

Public

Burns sender's tokens

rescueBalance()

OnlyOwner

Withdraws native BNB

rescueToken()

OnlyOwner

Withdraws ERC20 tokens

transferOwnership()

OnlyOwner

Changes contract owner


πŸ§ͺ Final Verdict

βœ… Safe for general use as a standard ERC20 token, πŸ”’provided:

  • You trust the service payer contract being called in the constructor.

  • You understand the owner has strong control over the funds held in the contract.

Last updated