All pages
Powered by GitBook
1 of 2

Loading...

Loading...

Compliance Interface

The Compliance contract interface defines the set of functions and events used to enforce regulatory compliance within the T-REX protocol. Below is a detailed breakdown of each function and event, explaining its purpose, source, and functionality.

TokenBound

Event

Description: Emitted when a token has been bound to the compliance contract.


TokenUnbound

Event

Description: Emitted when a token has been unbound from the compliance contract.


bindToken

Source: ICompliance

Description: Binds a token to the compliance contract. This function emits a TokenBound event.


unbindToken

Source: ICompliance

Description: Unbinds a token from the compliance contract. This function emits a TokenUnbound event.


transferred

Source: ICompliance

Description: Called whenever tokens are transferred from one wallet to another. This function can update state variables in the compliance contract, which are used by canTransfer to decide if a transfer is compliant.


created

Source: ICompliance

Description: Called whenever tokens are created on a wallet. This function can update state variables in the compliance contract, which are used by canTransfer to decide if a transfer is compliant.


destroyed

Source: ICompliance

Description: Called whenever tokens are destroyed. This function can update state variables in the compliance contract, which are used by canTransfer to decide if a transfer is compliant.


isTokenAgent

Source: ICompliance

Description: Returns true if the address given corresponds to a token agent.


isTokenBound

Source: ICompliance

Description: Returns true if the address given corresponds to a token that is bound with the compliance contract.


canTransfer

Source: ICompliance

Description: Checks if a transfer is compliant. This is a read-only function that cannot be used to increment counters, emit events, or modify state variables.

event TokenBound(address _token);
event TokenUnbound(address _token);
function bindToken(address _token) external;
function unbindToken(address _token) external;
function transferred(
    address _from,
    address _to,
    uint256 _amount
) external;
function created(address _to, uint256 _amount) external;
function destroyed(address _from, uint256 _amount) external;
function isTokenAgent(address _agentAddress) external view returns (bool);
function isTokenBound(address _token) external view returns (bool);
function canTransfer(
    address _from,
    address _to,
    uint256 _amount
) external view returns (bool);

Compliance management

The Compliance contract is ensuring that all token operations adhere to regulatory requirements and standards. It works in conjunction with the Identity Registry and other components to enforce rules and restrictions on token transfers, maintaining the integrity and legality of the security token ecosystem.

Key Features of the Compliance Contract

  1. Regulatory Compliance:

    • The Compliance contract enforces regulatory rules and restrictions on token transfers. This includes ensuring that only eligible investors can participate in token transactions and that all transactions comply with KYC (Know Your Customer) and AML (Anti-Money Laundering) regulations.

  2. Flexible Rule Management:

    • The Compliance contract allows for the dynamic addition and modification of compliance rules. This flexibility ensures that the contract can adapt to changing regulatory landscapes and specific requirements of different token offerings.

  3. Interoperability with Identity Registry:

    • The Compliance contract interacts closely with the Identity Registry to verify the identity and eligibility of participants. By leveraging the verified identities stored in the Identity Registry, the Compliance contract ensures that all participants meet the necessary regulatory standards.

How the Compliance Contract Works

  1. Binding Tokens:

    • The Compliance contract can bind and unbind tokens through the bindToken and unbindToken functions. These functions emit TokenBound and TokenUnbound events respectively, ensuring transparency and traceability of the binding process.

Integration with Other T-REX Components

  • Identity Registry: The Compliance contract relies on the Identity Registry to provide verified identity data. This integration ensures that all compliance checks are based on accurate and up-to-date information.

  • Token Smart Contract: The Compliance contract works with the Token Smart Contract to enforce compliance rules during token transfers. It acts as a gatekeeper, allowing only those transactions that meet all regulatory requirements.

Benefits of the Compliance Contract

  1. Regulatory Assurance:

    • By enforcing strict compliance rules, the Compliance contract provides assurance that all token transactions are legal and compliant with relevant regulations. This reduces the risk of legal issues and enhances the credibility of the T-REX protocol.

  2. Flexibility and Adaptability:

Transaction Monitoring:
  • The Compliance contract monitors all token transfers, creations, and destructions using the transferred, created, and destroyed functions. These functions update state variables within the contract, which are then used to enforce compliance rules.

  • Compliance Verification:

    • The canTransfer function checks whether a proposed token transfer complies with the set rules. This function verifies the sender's and receiver's eligibility and other parameters, returning true if the transfer is compliant and false otherwise.

    • The isTokenAgent and isTokenBound functions provide additional checks to ensure that only authorized agents and bound tokens interact with the compliance mechanisms.

  • The ability to dynamically manage compliance rules ensures that the T-REX protocol can adapt to changing regulatory environments and specific requirements of different token offerings. This flexibility is crucial for maintaining long-term compliance and operational efficiency.
  • Enhanced Security:

    • The Compliance contract enhances the security of the T-REX protocol by ensuring that only verified and eligible participants can engage in token transactions. This reduces the risk of fraud and unauthorized activities within the ecosystem.