Block Chain Technology and Investments Buzz for Beginners

Discuss Blockchain Technology Platform, Crypto Currencies, ICO's, ETF's, NFT's and more...

Crypto Stocks/ETFs

Funds that invest in companies involved in development and use of blockchain technology or Futures contracts that track the performance of cryptocurrencies or holding the underlying crypto-assets.

Start a Bitcoin full node on your computer (Supported OS : Linux, Mac, BSD, Windows)

$ curl https://bitnodes.io/install-full-node.sh | sh

Hyperledger Smart Contract for Private loans


// loan_chaincode.go

package main

import (
	"fmt"
	"github.com/hyperledger/fabric-contract-api-go/contractapi"
)

// LoanContract represents the smart contract
type LoanContract struct {
	contractapi.Contract
}

// Loan represents a loan transaction
type Loan struct {
	ID        string `json:"id"`
	Borrower  string `json:"borrower"`
	Lender    string `json:"lender"`
	Amount    int    `json:"amount"`
	Repaid    bool   `json:"repaid"`
}

// Init initializes the chaincode
func (lc *LoanContract) Init(ctx contractapi.TransactionContextInterface) error {
	fmt.Println("Chaincode initialized")
	return nil
}

// RequestLoan creates a new loan request
func (lc *LoanContract) RequestLoan(ctx contractapi.TransactionContextInterface, id string, borrower string, lender string, amount int) error {
	existing, err := ctx.GetStub().GetState(id)
	if err != nil {
		return fmt.Errorf("Failed to get loan: %v", err)
	}

	if existing != nil {
		return fmt.Errorf("Loan with ID %s already exists", id)
	}

	loan := Loan{
		ID:       id,
		Borrower: borrower,
		Lender:   lender,
		Amount:   amount,
		Repaid:   false,
	}

	loanJSON, err := serialize(loan)
	if err != nil {
		return err
	}

	err = ctx.GetStub().PutState(id, loanJSON)
	if err != nil {
		return fmt.Errorf("Failed to put loan into ledger: %v", err)
	}

	return nil
}

// RepayLoan marks the loan as repaid
func (lc *LoanContract) RepayLoan(ctx contractapi.TransactionContextInterface, id string) error {
	loanJSON, err := ctx.GetStub().GetState(id)
	if err != nil {
		return fmt.Errorf("Failed to read loan: %v", err)
	}

	if loanJSON == nil {
		return fmt.Errorf("Loan with ID %s does not exist", id)
	}

	var loan Loan
	err = deserialize(loanJSON, &loan)
	if err != nil {
		return err
	}

	loan.Repaid = true

	loanJSON, err = serialize(loan)
	if err != nil {
		return err
	}

	err = ctx.GetStub().PutState(id, loanJSON)
	if err != nil {
		return fmt.Errorf("Failed to update loan: %v", err)
	}

	return nil
}

// QueryLoan retrieves loan details by ID
func (lc *LoanContract) QueryLoan(ctx contractapi.TransactionContextInterface, id string) (*Loan, error) {
	loanJSON, err := ctx.GetStub().GetState(id)
	if err != nil {
		return nil, fmt.Errorf("Failed to read loan: %v", err)
	}

	if loanJSON == nil {
		return nil, fmt.Errorf("Loan with ID %s does not exist", id)
	}

	var loan Loan
	err = deserialize(loanJSON, &loan)
	if err != nil {
		return nil, err
	}

	return &loan, nil
}

// serialize converts struct to JSON
func serialize(data interface{}) ([]byte, error) {
	return json.Marshal(data)
}

// deserialize converts JSON to struct
func deserialize(data []byte, result interface{}) error {
	return json.Unmarshal(data, result)
}

func main() {
	loanContract := new(LoanContract)
	chaincode, err := contractapi.NewChaincode(loanContract)
	if err != nil {
		fmt.Printf("Error creating loan chaincode: %s", err.Error())
		return
	}

	if err := chaincode.Start(); err != nil {
		fmt.Printf("Error starting loan chaincode: %s", err.Error())
	}
}
Install and Instantiate Chaincode: Follow the Hyperledger Fabric documentation to package, install, and instantiate the chaincode. 

Client Application: Create an HTML page or another application to interact with the chaincode. This can be done using the Hyperledger Fabric SDK for your preferred programming language. This example provides a basic structure for a private loan transactions chaincode in Hyperledger Fabric. You may need to adjust the code based on your specific requirements, security considerations, and network setup.

Disney Co. chose Polygon as blockchain-native platform.

Polygon is selected to participate in Disney's 2022 Accelerator program, according to a statement made by Disney on Wednesday. Polygon's native token, MATIC surges.

Chipotle use Flexa to accept the CryptoCurrencies

Flexa (https://flexa.network/) is a digital payment platform used by Chipotle to accept the crypto currencies.  Customers will need to download SPEDN or Gemini app to use Flexa.  Flexa supports around 98 crypto currencies.  

Flexa use SPEND SDK to unlock instant payments.

Bitcoin Crashing - A Domino Effect

Unwinding and Liquidation stemming from the UST/LUNA unwind.


Are you a Photographer or an Artist? Try these simple steps to create your first NFT in OpenSea.

   
    1) Create Metamask account 


    2) Create Opensea Account
    3) Upload the picture in Opensea.   

    4) List the picture for Sale in Opensea.io (Choose Polygon Blockchain for free listing)
    
    5) Check the NFT in OpenSea. 



There was an error with your transaction. Please try again

Open Sea Error -  There was an error with your transaction.  Please try again

How to fix the error?
  1. Refresh the MetaMask Account
  2. Disable the popup blockers
  3. Disable Antivirus blocking OpenSea
  4. Disable AdBlocker
  5. Try in different Browser

Java Script Ethereum Provider API Example

// Function to detect providers injected at window.ethereum


    import ethProvider from '@metamask/detect-provider'; 

    const eprovider = await ethProvider(); 

    if (eprovider) { startApp(provider); } 

    else { console.log('MetaMask is not installed'); }

Silvergate - Stablecoin Pilot Launch

        Silvergate purchased technology and other assets from Diem, the stablecoin project from Meta Platforms.  Silvergate will grow its stablecoin to its Silvergate Exchange Network (SEN).  The SEN allows Banks digital currency and institutional investor clients to send U.S. dollars and euros 24/7 between their Silvergate accounts.  Read more @ https://www.silvergate.com/

How to Create OpenSea Account?

Prerequisite:   Metamask Wallet / Coinbase Wallet / WalletConnect


How to Buy ETH in Meta Mask ?

  • Buy Ether using Wyre
  • Buy Ether using Transak


How to install and create Meta Mask Account?

Metamask is a Crypto Wallet and Gateway to Defi Blockchain Apps.

How to create a Meta Mask Account?
  • Goto https://metamask.io or Go To Chrome/Firefox/Opera Browser Extensions, search for Meta Mask Extension
  • Click Add Extension
How to create a new Wallet in Metamask?
  • Click the installed Extension in the upper right corner of the Browser.
  • Read and accept the terms and Create a Wallet.
  • Create a strong password and click Create.
  • MetaMask will create a secret recovery key which is 12 seed phrase words.  Keep the secret key in a safe place
What is a secret 12 word recovery phase?
  • The 12 word secret phase is generated when you sign up with MetaMask.  This is the master key used to recover your Wallet.  Do not share with any one.  If you lose the Secret Key, you cannot recover the Wallet.  If you need to back up your Secret Recovery Phrase again, you can find it in Settings -> Security.






Congratulations !!! You have created your MetaMask Account.

Tezos Blockchain - GPS NFT

Gap Threads:  Gap's first ever NFT built on Tezos, energy-efficient

         Blockchain. https://www.gap.com/nft/#how-it-work


Tezos:
        Tezos requires less cost and energy to operate than a proof-of-work algorithm.

Shiba Inu Surges 16%

Shiba Inu Surges 16% following Whales $136 Million SHIB Buy.  According to the Whale Stats website, the crypto whale purchased approximately 4 trillion SHIB tokens, with a value of about $136 million at the time.

What is Stable Coin - DAI?

πŸ‘‰    DAI is a stable coin that has a steady value of one US dollar. 

πŸ‘‰    DAI is an ERC20 token on the Ethereum blockchain.

πŸ‘‰    DAI is used in MakerDAO, a Lending system that allows borrow and lend.  DAI is created whenever someone takes out a loan on MakerDAO

πŸ‘‰    DAI can be easily transferred between Ethereum wallets.

πŸ‘‰    DAI can be used as payment system in DeFi Applications 

πŸ‘‰    UK or Europe users can spend DAI using the Monolith Visa debit card. 

πŸ‘‰    Other stables coins:  Tether, USDC, Gemini Coin and Facebook Diem.



How to Buy DOGE Cryptocurrency

πŸ‘‰What is DOGE?
      Dogecoin is a peer-to-peer and open-source digital currency.  DOGE evolved as a friendly internet currency introduced in December of 2013. The original idea behind Dogecoin was to help the public understand the technology behind blockchains.
Dogecoin is built on the same basic technology as other cryptocurrencies like Bitcoin. DOGE is more affordable and faster.

πŸ‘‰How to Buy a DOGE Cryptocurrency?

       Open an online account in Crypto Exchanges - Coinbase, eToro, Robinhood, Gemini and Webull.    After both your wallet and your exchange account are open, you can place a buy order to purchase DOGE.  The exchanges will offer you a wide range of order types to choose from. If you've ever traded stocks before, you're likely already familiar with the basic types of orders.  If you haven't, be sure to gain a basic familiarity with the most common order types before you invest.  Calculate how much DOGE you want to buy based on your cash investment funds and the current market price.   Broker will take care of filling your order on your behalf.  When you see your DOGE in your exchange wallet, it means that your order has been completed.   If your broker cannot fill your order according to your specifications, they may cancel it at the end of the trading day.

πŸ‘‰What are Cryptocurrency Wallets?

       A Wallet (Hardware/Digital) provides you with a set of keys that you can use to store your DOGE off of an exchange. This helps keep your investment safer in the event that your exchange is targeted in a hack or theft.

πŸ‘‰Software wallets -- Software wallets are free, but they must be connected to the internet in order to access your investments.
πŸ‘‰Hardware storage wallets  -- Review Ledger Nano S/Ellipal Titan Hardware Wallet and buy.

πŸ‘‰Any Exchange Limitations?

     Robinhood - Does not currently offer users access to send or receive their assets to another wallet.
     Coinbase, eToro and Gemini - Provides the access to send and receive from their respective exchange wallets.

Ethereum Live Networks to Deploy your DApp

πŸ–§    WebThree (cpp-ethereum): https://github.com/ethereum/cpp-ethereum
πŸ–§    Hyperledger Besu (java): https://github.com/hyperledger/besu
πŸ–§    Geth (go-ethereum): https://github.com/ethereum/go-ethereu
πŸ–§    Parity: https://github.com/paritytech/parity
πŸ–§    Nethermind: https://github.com/NethermindEth/nethermind
πŸ–§    More: https://ethereum.org/developers/#clients--running-your-own-node

Fire up a Personal Ethereum Blockchain using Ganache

πŸ‘‰To run tests, execute commands, and inspect state while controlling how the chain operates, download the Ganache https://www.trufflesuite.com/ganache

Solidity - PersonalContract Example code

pragma solidity ^0.4.21;

//This is a simple Contract.  Usecase:  Lend $1000 to a Friend.

contract PersonalBond {

    // Publicly accessible state variable. address type is 160-bit. Stores addresses of the contract
    // keyword public, automatically creates a function function minter() returns (address) { return minter; } outside of the code to give access to the outside.
    address public minter;
   
    // map the addresses to unsigned int
    mapping (address => uint) public balances;

    event Sent(address from, address to, uint amount);
   
    function PersonalBond() public {
        minter = msg.sender;
    }

    function mint(address receiver, uint amount) public {
        if (msg.sender != minter) return;
        balances[receiver] += amount;
    }

    function send(address receiver, uint amount) public {
        if (balances[msg.sender] < amount) return;
        balances[msg.sender] -= amount;
        balances[receiver] += amount;
        emit Sent(msg.sender, receiver, amount);
    }
}

Ledger Nano S Hardware Wallet



πŸ‘‰

Cryptocurrencies and NFT's can be stored in  Hardware Wallet.  Ledger Nano S Hardware Wallet protects your tokens based on Secure Chip Technology for maximum security.  It is USB based and embeds a secure OLED display to double-check and confirm each and every transaction with tap on its side buttons.  https://shop.ledger.com/products/ledger-nano-s