Chain | Type | Min Tx Gas | Model | Explanation |
---|---|---|---|---|
Arbitrum | Optimistic Rollup | 35-70k | Multifunctional gas limit | Bake L1 data fee into L2 gas limit |
BNB Chain | Sidechain | 21k | EVM | Same as vanilla EVM |
Gnosis | Sidechain | 21k | EVM | Same as vanilla EVM |
OP Stack | Optimistic Rollup | 21k | Two-dimensional fees | Explicit L2 execution fee and implicit L1 DA fee |
Polygon | Sidechain | 21k | EVM | Same as vanilla EVM |
- $800k
- July 2, 2021
- Vulnerability: Smart contract bug
- Note: Users reported lost funds, ChainSwap shut down all nodes and a fix was deployed within 30 minutes.
- Source: https://chain-swap.medium.com/chainswap-post-mortem-and-compensation-plan-90cad50898ab
- $4.4M
- July 10, 2021
- Vulnerability: Smart contract bug
🥇 Instead of sending Ether, use the withdrawal pattern
🥈 If you really need to send Ether, use a safe wrapper like OpenZeppelin's Address.sendValue(addr, amount)
🥉 If you really need to send Ether without dependencies, use (bool success, ) = addr.call{value: amount}("")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract QuickSort { | |
function sort(uint[] data) public constant returns(uint[]) { | |
quickSort(data, int(0), int(data.length - 1)); | |
return data; | |
} | |
function quickSort(uint[] memory arr, int left, int right) internal{ |