TBC20 Contract

What is TBC?

TBC is a Layer 2 solution for Bitcoin, introducing the Bitcoin Virtual Machine (BVM) and innovative technologies like TuringTXID and TuringContract. TBC leverages the SHA256 PoW and UTXO model, providing superior scalability, data sharding, and practical Turing-complete smart contract capabilities, making it ideal for Web3 application development.TXO model, providing superior scalability, data sharding, and practical Turing-complete smart contract capabilities, making it ideal for Web3 application development.


What is TBC20?

TBC20 is a new type of token protocol that aims to bring the benefits of the UTXO models into the TBC ecosystem. It allows for the creation and trading of Bitcoin-like assets on the TBC net, utilizing the strengths of both platforms.


Use Cases

  • Asset-Backed Tokens
  • Represent real-world asset ownership with digital collectibles, ensuring authenticity and legal rights.

  • Decentralized Applications (DApps)
  • Facilitate secure, transparent transactions without central oversight via a distributed ledger.

  • Uniform Resource Identifier
  • Standardize data storage spaces and empower users with direct data control.

  • Content Publishing
  • Enable decentralized content creation platforms for music, videos, and articles, protecting copyrights and enabling direct monetization.

  • Gig Economy
  • Provide an alternative to conventional financial systems with automated, transparent operations governed by smart contracts.

  • Decentralized Finance (DeFi)
  • Facilitate secure, transparent transactions without central oversight via a distributed ledger.


    TBC's innovative approach is to building a scalable, secure, and efficient smart contract layer on Bitcoin, encouraging developers to leverage these features for diverse and impactful applications.

      Key Features of TBC

    • Decentralization
    • Consensus Mechanism:Uses Bitcoin's PoW and SHA256 mining algorithm.Fair Competition:Block release based on computational power competition ensures optimal resource allocation.

    • Compliance and Efficiency
    • Node Mining:Compliant mechanism to prevent hash power attacks and asset theft under low network hash power.

    • Unlimited Scalability
    • Optimized UTXO Model:High-concurrency transaction format and high-performance parallel computing super nodes. Performance:Capable of handling millions of TPS; test-net exceeds 13,000 TPS.

    • Layer-1 UTXO Smart Contracts
    • TuringContract:Implements practical Turing-complete smart contracts based on UTXO, executing all EVM logic with high performance and low fees.

    • Zero-Confirmation Transactions
    • Instant Transactions:Enables immediate FT & NFT transactions with decreasing gas fees as user base grows

    • Bitcoin Operating System
    • Integrated Functionality:Supports smart contracts, data storage, contract execution, and transaction transmission on a single chain.

    • Wallet Compatibility
    • Identical Structure:Uses the same address and private key structure as Bitcoin.

    • User-Friendly Cross-Chain Infrastructure
    • TuringBridge:Forthcoming open-source application library with customizable, functional applications.



      Key Features of TBC20

    • Identical receiving address format as Bitcoin
    • TBC20 adopts the same receiving address format as Bitcoin, providing a seamless user experience for those familiar with Bitcoin’s address structure. Users can easily manage their TBC20 assets using the same addresses and private keys as they would with Bitcoin, ensuring compatibility and ease of use across platforms.

    • based on UTXO model
    • The UTXO (Unspent Transaction Output) model, inherited from Bitcoin, offers enhanced security and traceability, making it less prone to double-spending and other transaction malleability issues. Each TBC20 token transaction is verifiable, contributing to a robust and transparent ecosystem.

    • Enhanced security and transparency
    • Leveraging the UTXO model and smart contracts, TBC20 provides users with increased security and transparency for asset transactions. All transactions are recorded on-chain, ensuring they are auditable and tamper-proof, fostering greater trust in the system.

    • Interoperability with DeFi applications
    • TBC20 tokens are designed to be compatible with existing DeFi protocols, allowing seamless integration with decentralized applications (DApps) on multiple blockchains. This feature enhances liquidity, enabling TBC20 tokens to be used for lending, staking, and trading across various DeFi platforms.


    TBC-20: Token Standard

    Simple Summary

    A standard interface of tokens.


    Abstract

    The TBC20 standard allows for the implementation of a standard API for tokens within smart contracts. This standard provides basic functionality to transfer tokens, as well as allow tokens to be approved so they can be spent by another on-chain third party.


    Methods

    Name

    Returns the name of the token.

    
      function name() public view returns (string)
    
                    

    symbol

    Returns the name of the token.

    
      function symbol() public view returns (string)
    
                    

    decimals

    Returns the name of the token.

    
      function decimals() public view returns (uint8)
    
                    

    totalSupply

    Returns the name of the token.

    
      function totalSupply() public view returns (uint256)
    
                    

    balanceOf

    Returns the name of the token.

    
      function balanceOf(address _owner) public view returns (uint256 balance)
    
                    

    transfer

    Returns the name of the token.

    
      function transferFrom(privkey_from, address _to, uint256 _value) public returns (bool success)
    
                    

    transfer

    Example

    A simple example of using contract js sdk

    
      npm install tbc-lib-js
    
    
      const TBCFt = require('tbc-lib-js/lib/contract/ft.js');
    
      TBCTockenA = TBCFt.BindTocken(tockenIdentifier);
      tokenName = TBCTockenA.name();
      console.log(tockenName);
    
                    

    TBC721

    Coming soon.