You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developers/api/rest/block-actions.md
+28-19Lines changed: 28 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,11 @@
1
-
# Transaction Details
1
+
# Block Actions
2
2
3
-
All block body arrays share the same entry structures described below. See [GET /transaction/latest](#get-transactionlatest) for context on where these fields appear.
3
+
Every block affects the chain state via actions. These actions are returned from various API methods such as the `/chain/block/:id` and `/transaction/latest` methods.
4
+
The JSON structure of these actions is explained below.
4
5
5
-
## Rewards
6
+
## Reward
6
7
7
-
Block rewards paid to miners.
8
+
Block reward paid to miners.
8
9
9
10
```json
10
11
{
@@ -23,9 +24,9 @@ Block rewards paid to miners.
23
24
|`amount.E8`| integer | Amount in raw E8 units |
24
25
|`amount.str`| string | Amount as decimal string |
25
26
26
-
## Wart Transfers
27
+
## Wart Transfer
27
28
28
-
WART coin transfers between accounts.
29
+
Wart coin transfer between accounts. Token transfers are returned as a differnt action type, see below.
29
30
30
31
```json
31
32
{
@@ -55,7 +56,9 @@ WART coin transfers between accounts.
55
56
56
57
## Token Transfers
57
58
58
-
Token transfers between accounts.
59
+
Token transfers between accounts. Wart transfers are separated from token transfers because the latter
60
+
require additional fields to be returned such as different amount specification (assets don't always have
61
+
8 decimals) and `isLiquidity` flag.
59
62
60
63
```json
61
64
{
@@ -90,12 +93,12 @@ Token transfers between accounts.
90
93
|`asset.name`| string | Asset name |
91
94
|`asset.decimals`| integer | Asset decimals |
92
95
|`asset.hash`| string | Asset hash |
93
-
|`isLiquidity`| boolean | Whether transfer is liquidity-related|
96
+
|`isLiquidity`| boolean | Whether transfer is the asset itself (false) or liquidity of the corresponding pool|
Represents a new limit order placed on the DEX including orders that were included in the same block and were immediately matched.
99
102
100
103
```json
101
104
{
@@ -136,9 +139,11 @@ New limit orders placed on the DEX.
136
139
|`limit.doubleRaw`| number | Price as double (raw) |
137
140
|`buy`| boolean | True if buy order, false if sell |
138
141
139
-
## Matches
142
+
## Match
140
143
141
-
DEX trade matches (swaps between liquidity providers).
144
+
In each block, markets with new orders are order-matched. Order matching is based on CoinFuMasterShifu's paper on [Fair Batch Matching](https://github.com/CoinFuMasterShifu/FairBatchMatching/blob/main/FairBatchMatching.pdf). This algorithm batch-matches discrete with continuous liquidity in a fair way such that no intrinsic ordering exists among the matched orders, which means that the the algorithm is MEV-proof, in particular no sandwich attacks are possible.
145
+
146
+
The returned JSON object contains the pool before and after the matching, and all swaps executed. Each swaps also includes the history id which can be used for further lookup on the referenced order. To check remaining order quantity, use the `historyId` in the `/market/:market/order/:historyId` API endpoint.
Represents Transaction cancelation, i.e. special transactions which block other transactions. Each cancel transaction contains a `cancelTxid` field referencing the cancelled transaction. No transaction with the referenced transaction id can be mined in the same or a future block.
0 commit comments