Study Guide for Cryptocurrency Trading Systems and Methods
Glossary
Cryptoasset refers to digital assets that are protected and verified using cryptography on the blockchain. Including but not limited to cryptocurrencies, tokens, etc. Cryptocurrency A digital or virtual currency that uses cryptography to ensure transaction security and control the creation of new units. Blockchain A growing list of records, called blocks, linked and protected using cryptography. Smart Contract A computer program stored on the blockchain that automatically executes when predetermined conditions are met. Decentralized Exchange (DEX) A type of exchange that allows users to trade crypto assets directly with each other without the involvement of an intermediary or third party. Centralized Exchange An exchange that is controlled and managed by a central institution through which users trade crypto assets. Ethereum An open source, blockchain-based distributed computing platform with smart contract capabilities. ERC20 Token A token standard on the Ethereum blockchain that defines the basic functions of a token, such as transfers and access to balances. Relayer A third-party service that helps users find and execute orders on decentralized exchanges. Wallet Software or hardware used to store, send, and receive cryptocurrencies. User Interface (UI) The medium through which users interact with the system. Server Gateway The intermediate server that connects the user's device to the blockchain network. Short Answer Questions
Please answer the following questions in 2-3 sentences:
What are the main advantages of decentralized exchanges compared to centralized exchanges?
What is a smart contract and what role does it play in cryptocurrency trading?
What is an ERC20 token and how is it different from other types of cryptocurrencies?
Explain the role of TokenTransferProxy and its importance in the system.
How does the main smart contract interact with different exchanges (such as EtherDelta, 0x, Kyber)?
What role does a relayer play in a decentralized exchange?
What is the main smart contract and how does it interact with user wallets?
Why do we need a handler contract in the system?
In the context of cryptocurrency trading, what do "on-chain" and "off-chain" operations refer to?
Describe how the system ensures that only tokens authorized by the user are used during the execution of transactions.
Short Answer Question
The main advantage of decentralized exchanges is improved security and privacy. Since funds are held by users in their personal wallets, there is no need to trust the trading platform itself. Additionally, decentralized exchanges offer increased privacy since personal information is not retained.
Smart contracts are self-executing contracts stored on the blockchain. They play a vital role in cryptocurrency trading, facilitating, verifying, and executing trades without the need for intermediaries.
ERC20 tokens are a token standard on the Ethereum blockchain. They differ from other cryptocurrencies in that they follow a specific set of rules and features, ensuring compatibility with a wide range of decentralized applications and exchanges.
TokenTransferProxy is responsible for transferring the ownership of ERC20 tokens from the user to the main smart contract when a sell order is executed. It acts as a trusted middleman, ensuring that only authorized trades are carried out.
The main smart contract interacts with different exchanges (such as EtherDelta, 0x, Kyber) by calling handler contracts specific to each exchange. These handler contracts act as an interface between the main contract and each exchange, allowing for seamless trade execution.
Relayers act as a third-party service in decentralized exchanges, helping users find and execute orders. They maintain off-chain order books and facilitate trades between users.
The main smart contract is the core component of the platform and is responsible for processing trade requests, executing orders, and managing users' funds. It interacts with user wallets, receiving trade requests and sending updated balances.
Handler contracts are essential for interacting with different decentralized exchanges. Each handler contract is specific to one exchange and contains the logic required to communicate with that particular exchange and execute trades.
In the context of cryptocurrency trading, "on-chain" operations refer to transactions recorded on the blockchain, while "off-chain" operations refer to transactions conducted outside of the blockchain.
The system ensures that only authorized tokens are used by requiring users to set a limit on the TokenTransferProxy before making any trades. This limit specifies the maximum number of tokens that the TokenTransferProxy can transfer on behalf of the user, preventing unauthorized use.