Blockchain Tech Flashcards
RPC Endpoint
An RPC (remote procedure call) endpoint is like a node’s address: it’s a URL which requests for blockchain data can be sent to. The Ethereum JSON-RPC spec defines the methods which you can use to retrieve data from a node.
ABI
Application Binary Interface
The ABI tells solidity and other programming languages how it can interact with another contract.
anytime you want to interact with an already deployed smart contract you will need an ABI.
Interface
E.g. chainlink smart contract import for USD/ETH
A minimalistic view into smart contracts; their functions
Compile down to ABIs
‘view’
No state change in functions. Just getter function.
Overflow
Prior to ETH 0.8
If adding on top of maximum number uint could be, it wrapped around -> going to lowest
uint8 num = 255 + uint8(1);
return num
=> 0
2**8 = 256
using A for B;
E.g.
using SafeMathChainlink for uint256;
used to attach library functions to any type in context of a contract.
using A for B;
E.g.
using SafeMathChainlink for uint256;
used to attach library functions to any type in context of a contract.
.transfer( )
msg.sender.transfer( address( this ).balance )
‘this’
=> referring to contract you’re currently in. JS style.
Address of current contract
address( this )
Enable an address to be sent money to
In Solidity 0.8.0 address literals changed from address payable to address.
Enable them by calling
payabale( msg.sender )
IPFS
The InterPlanetary File System (IPFS) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system
PLFs
Protocol for Loanable Funds - Lending protocols / money markets
Term coined by Daniel, Sam and Lewis
CFD
Contract for difference
Differences in the settlement between the open and closing trade prices are cash-settled. Popular in FX and commodity products.
Illegal in the US
AMM
Automated Market Maker
Simplest version: Constant Product Invariant
d ∗ c = k
(First review -> recreate!)
Curve for example, uses a special invariant for their stablecoin pools!