Page cover image

Flow & Architecture

The overall flow and architecture of Tylix Token is structured around the core principles of security, verifiability and systemic flexibility. The main design of the smart contract is not only a standard ERC20 token implementation, but also includes advanced control mechanisms such as transaction security, time-controlled transaction management and on-chain history verification.

Main Components and Data Flow:

Token Distribution (Minting)

During the setup phase of the contract (constructor()), the initial distribution of tokens is done to the address that deployed the contract. This process automatically generates 1 million Tylix Tokens (NSDT) with the precision determined by the decimals() function of the ERC20 standard.

Transfer Flow

User-to-user transfers are handled through the safeTransfer() method. The transfer flow does not proceed without passing through 3 security checks:

  • Validity of address (to != address(0))

  • The amount to be sent is greater than zero

  • The sender's balance is sufficient

Transactions that pass these checks are executed under the ERC20 standard via the transfer() function and then the TransferExecuted event is emitted. This guarantees on-chain auditability of the transfer.

Proof-of-History (PoH) Flow

recordHistory(bytes32 newHash) can only be called by the address with owner authorization. When the function is executed:

  • The new hash value is validated and double-checked.

  • lastHistoryHash and lastTimestamp are updated.

  • hash is stored in the historyHashes dictionary.

  • The HistoryRecorded event is published.

This chain of operations allows the system to verify the accuracy of past events through the verifyHistory(bytes32 hashToVerify) function.

Pause/Unpause Stream

The pause() function, which works with ownership control, allows the system to be stopped only 1 hour apart. This allows manual intervention in emergencies and prevents abuse.

The unpause() function can be used to get the system back up and running, but only if the contract is actually paused.

Flow Principle in Architecture

Tylix architecture uses an event-driven structure. All major transactions (transfer, history, pause) emit an event, supporting both chain traceability and readability by external systems (dApp, monitoring tools, bridge).

This flow is shaped by the following principles:

  • Authorization Controlled Transaction Initiation

  • Preconditioned Transaction Validation

  • State Update

  • Event Broadcasting

Each process sticks to this sequence. Thanks to this deterministic structure, the Tylix architecture produces predictable and reliable results against user inputs.

Last updated