Giter Club home page Giter Club logo

dev-portal's People

Contributors

altafan avatar bordalix avatar cl-ol avatar kcoax avatar louisinger avatar sekulicd avatar tiero avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dev-portal's Issues

Blog post: create your own market making formula

This should touch

  • Forking the repo and locate the pkg folder to create a file
  • Detailing the Go interface to satisfy
  • Detail the checks to sanitize the inputs
  • Writing an unbalanced formula
  • Build the daemon, run and make a custom trade in regtest

[Specs] Add Volumes to Trade interface

Following this discussion, it could be worth adding a rpc like the one below to the trade service to expose data about market volumes on a given time range.


rpc MarketVolume(MarketVolumeRequest) returns (MarketVolumeReply) {
    option (google.api.http) = {
      post: "/v1/market/volume"
      body: "*"
    };
}

message MarketVolumeRequest {
   Market market = 1;
   TimeRange time_range = 2;
}

message MarketVolumeReply {
   uint64 quote_asset_volume = 1;
}


message TimeRange {
  // predefined time_period till now
  PredefinedPeriod predefined_period = 1;
  // granular time range
  CustomPeriod custom_period = 2;
}

message CustomPeriod {
  // start_date in RFC3339 format
  string start_date = 1;
  // end_date in RFC3339 format
  string end_date = 2;
}

enum PredefinedPeriod {
  NULL = 0;
  LAST_HOUR = 1;
  LAST_DAY = 2;
  LAST_MONTH = 3;
  LAST_3_MONTHS = 4;
  YEAR_TO_DATE = 5;
  ALL = 6;
}

[Specs] Add Pool protocol

This issue tracks ideas and discussions for the Pool concept.

Pool

_Providers can pool together liquidity registering their endpoints into a distributed service mesh, creating a direct bi-directional stream connection to communicate their reserves/prices. The pool acts also as a first responder for traders to lookup for the provider's aggregated market prices and to register the trader's limit order proposals.

The main purposes of Pool are:

  1. Accept requests from traders using the same interface defined here.
  2. Let Liquidity Providers register themself and keep track of the network topology.
  3. Let the traders placing limit orders. Maybe dedicated protocol?

NOTICE The provider joining the pool MUST serves only trade requests coming to the the pool, cannot serve traders directly.

[specs] Update BOTD#4

We must update BOTD#3 by moving to psetv2 (drop in/out blinding keys and add unblinded inputs) and by adding fee asset and amount to the swap request.

It is also very important to describe thoroughly how to use these new fields, in particular how to correctly charge the fees to either amount_p or amount_r.

Improve description of no macaroons auth setup

At the very end of the Configure CLI section, it would be better to mention the daemon's env var to use to make it run without macaroons out instead of just talking about it like:

If instead, your dameon's Operator interface is not proteced by this type of authentication/authorization (meaning you exported the env var TDEX_NO_MACAROONS=true at start-up), then you need to run:

[Specs] Add spot price API

Let's add an API to fetch the spot price of a market. Without this API, one must make a preview with an arbitrary amount to fetch the current market price.

Spec:

rpc GetMarketPrice(GetMarketPriceRequest) returns (GetMarketPriceResponse) {
   option (google.api.http) = {
      post: "/v1/market/price"
      body: "*"
    };
}

message GetMarketPriceRequest {
  Market market = 1;
}
message GetMarketPriceResponse {
   double spot_price = 1;
   uint64 min_tradable_amount = 2;
}

[Specs] Make explicit Pset constraint for SwapRequest

The Trade protocol spec must make clear that the inputs of a partial transaction sent within a TradePropose message must contain the RedeemScript/WitnessScript for every P2SH/P2WSH input.

This is because by design the daemon is in charge of adding the network fees and without these info, it simply cannot do its job correctly.

Making this explicit forces both parties to make sure that the constrain is respected:

  • the daemon must reject the partial transaction because it's malformed in case its partial inputs miss those fields
  • the client must enforce this condition to sanitize the transaction before making a TradePropose request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.