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
* Add examples to builder codes and revshare
* Remove unnecessary code group formatting from builder codes and revshare documentation
* refine docs for builder codes and revenue share
Copy file name to clipboardExpand all lines: docs/pages/interaction/integration/integration-builder-codes.mdx
+66-31Lines changed: 66 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,48 +3,83 @@
3
3
Builder codes enables external parties to submit orders to dYdX and collect fees (per-order) for building and routing an order to the exchange.
4
4
The address and fee, in parts per million, needs to be configured via the `BuilderCodeParameters` in the order message itself. The fee will be paid out when the given order is filled.
5
5
6
+
**Important:** Builder code fees are added **on top of each fill**, as opposed to revenue share where the fee revenue is split. No governance proposal is required to use builder codes.
7
+
6
8
Builder fees and addresses can be queried via the indexer using the `/orders` and `/fills` endpoints as usual. `/orders` contains details on the fee rate and builder address. `/fills` also contains the builder address as well as details on the amount charged per-fill.
7
9
8
10
9
-
## Changes To The Order Message
11
+
#Placing orders and verifying Order Router Address in Fills
10
12
11
13
::::steps
12
14
13
15
## BuilderCodeParameters
14
16
`BuilderCodeParameters` is an addition to the order message which will specify:
15
-
- `partner address` - where fees will be routed
16
-
- `fee (in ppm)` that will be charged on order matching
17
-
18
-
```go
19
-
message Order {
20
-
// The unique ID of this order. Meant to be unique across all orders.
Copy file name to clipboardExpand all lines: docs/pages/interaction/integration/integration-revshare.mdx
+74-82Lines changed: 74 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,101 +17,93 @@ To participate in the Order Router Rev Share program, users need to propose and
17
17
18
18
## Voting in via Governance
19
19
20
-
To participate in the Order Router Rev Share program, you need to create and submit a governance proposal. Below is an example of what the governance message structure looks like:
-`address` - The address of the order router that will receive the revenue share. This is also the id you place in your order message
38
-
-`sharePpm` - The revenue share percentage in parts per million (ppm).
39
-
40
-
After submitting the proposal, it must go through the standard governance voting process and receive a passing vote before the order router address and revenue share percentage are activated in the system.
20
+
To participate in the Order Router Rev Share program, you need to create and submit a governance proposal. Since governance proposals require adding gas, deposit, and other parameters, it's recommended to create the proposal using a JSON file and submit it via CLI command.
41
21
42
-
## Updating Revenue Share (Optional)
43
-
44
-
The process for updating an existing order router's revenue share is the same as setting up a new one. You will need to submit a governance proposal with the updated parameters.
45
-
46
-
To update the revenue share percentage for an existing order router, create a governance message with the same structure:
For an example of the governance proposal JSON structure, see [proposal 311 on Mintscan](https://www.mintscan.io/dydx/proposals/311).
60
23
61
-
The proposal must go through the standard governance voting process and receive a passing vote before the updated revenue share percentage takes effect.
24
+
The key components of the proposal message are:
62
25
63
-
:::note
64
-
65
-
- You must use the exact same address that was previously approved
66
-
- The update will completely replace the previous configuration once approved
67
-
:::
68
-
69
-
## Deleting an Order Router Rev Share (Optional)
70
-
71
-
To delete an order router's revenue share configuration, you simply need to set the revenue share percentage to 0. This process follows the same governance workflow as setting up or updating a revenue share.
72
-
73
-
Submit a governance proposal with the following message structure:
-`address` - The address of the order router that will receive the revenue share. This is also the id you place in your order message
27
+
-`share_ppm` - The revenue share percentage in parts per million (ppm)
89
28
90
-
- Setting `sharePpm` to 0 effectively disables the revenue share for that order router
91
-
- The address must match the previously approved order router address
92
-
- The proposal must still pass through the standard governance voting process
93
-
- Once approved, the order router will no longer receive any revenue share
29
+
After submitting the proposal, it must go through the standard governance voting process and receive a passing vote before the order router address and revenue share percentage are activated in the system.
94
30
95
-
After the proposal passes, any orders that include this order router address will no longer generate revenue share for the router.
96
-
:::
31
+
## Placing orders with order rev share address and verifying Order Router Address in Fills
97
32
98
-
## Changes to the Order Message
99
33
The `order_router_address` field is set when an order is placed
100
34
101
35
-`order_router_address` - the ID of the order router and where fees will be sent to
102
36
103
-
```go
104
-
message Order {
105
-
// The unique ID of this order. Meant to be unique across all orders.
0 commit comments