Skip to content

gateway: sign and relay orders #333

@lispc

Description

@lispc

background

we may need to develop an exchange gateway to maker bots to integrate.

The rollup exchange is more complex than normal CEXs. eg nonce, eddsa signature.

The trading bots may include python/js/java/c++, it is unrealistic to implement to same logic ( encoding & sign ) in every language. So a rust gateway may be helpful.

The gateway is run by a trading team, the gateway can access their l2 seckey. Bots send raw orders to the gateway, gateway service fetchs nonce & order_id & order_pos and signs the order, and then send the signed order to the real FluiDex server.

TODO

  1. copy and modify client.ts into a grpc server process, which expose one grpc endpoint signOrder. signOrder shares most codes with createOrder function. input: order details, output: signature
  2. add a python client, which uses the js grpc signer to get order signature, then sends signed orders to the exchange

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions