Blog posts

2023

Ethereum DeAnonymisation Techniques

7 minute read

Published:

Anonymize Ethereum with Bitcoin methods

Ethereum Architecture

  • Ethereum stores state and account balance directly
  • Smart contracts
    • Each smart contract is identified by an Ethereum address
    • Written in solidity
  • Blockchain

Ethereum Overview and Privacy Attacks

8 minute read

Published:

Ethereum

Accounts

  • 20-byte address
  • A state -> state’ = transaction of information or value between account
  • Contain 4 fields
    • Nonce: Counter that make sure the transaction can be processed once
    • Ether balance
    • Contract code (for contract account)
    • Storage
  • Type of accounts
    • Externally owned accounts
      • Controlled by private keys
      • Can send messages by creating and signing transaction
    • Contract accounts
      • Controlled by contract code
      • Code is activate when message is received
      • Code could read/write to internal storage or create a message or contract in return

        Contract

  • An autonomous agent the live inside the Ethereum environment
  • Execute a specific code when “triggered”

    Transaction and message

  • Transaction- A sign data package that store a message to be sent from an externally owned account
  • STARTGAS and GASPRICE are to prevent infinite loop by limiting the number of computation steps
  • gas is dependent on the amount of computation and capacity of data
  • Transaction contain
    • Recipient message
    • Signature of the sender
    • Amount of ether to be transfer
    • Data field(optional)
    • STARTGAS - Maximum allowed computation steps
    • GASPRICE - Fees pays by the sender per computational steps(gas)

      Messages

  • Messages is like transaction except it is produced by a contract
  • Messages contain the sender, recipient, amount of ether being sent, data field(optional), STARTGAS

    Ethereum state transition function

  • Validate the transaction
  • Calculate the transaction fee STARTGAS * GASPRICE
  • Subtract the fees from the sender’s account balance and increment the sender’s nonce
  • Transfer the transaction value from sender to recipient.
    • If recipient don’t exist. Create a new account
    • If it’s a contract account, run the contract’s code until completion or run out of gas
  • If ran out of gas or the sender don’t have efficient fund. Revert all state changes except the payment of the fees.
  • Otherwise, refund the remaining gas to the sender.
  • Fees are send to the sender
  • Example of transition function (Send 10eth, 2000 gas, 0.001 ether gasprice and 64 bytes of data)
    • Data being sent:
      • byte[0:31] = 2
      • byte[32:63] = “CHARLIE”

Bitcoin & Blockchain Overview

5 minute read

Published:

What is blockchain?

What is a block?

  • Persistent, immutable and append-only data structure
  • Block used as currency tracks
    • User transactions
    • Timestamp
    • Reference
  • A block (besides the genesis block) is tied to it’s previous block in a cryptographic way
  • Each block contains
    • Header
    • One or more user’s transactions ![Simplified Bitcoin Blockchain]