From 45b8169fc1f4b9d6796a57685717412957d387b4 Mon Sep 17 00:00:00 2001 From: Martin Beckmann Date: Wed, 27 Mar 2024 17:21:16 +0100 Subject: [PATCH] Update openapi --- openapi.yml | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/openapi.yml b/openapi.yml index e8f1b38..83c788c 100644 --- a/openapi.yml +++ b/openapi.yml @@ -522,7 +522,74 @@ components: $ref: "#/components/schemas/SigningScheme" signature: $ref: "#/components/schemas/Signature" + feePolicies: + description: | + Any protocol fee policies that apply to the order. + type: array + items: + $ref: "#/components/schemas/FeePolicy" + FeePolicy: + description: | + A fee policy that applies to an order. + type: object + oneOf: + - $ref: "#/components/schemas/SurplusFee" + - $ref: "#/components/schemas/PriceImprovement" + - $ref: "#/components/schemas/VolumeFee" + SurplusFee: + description: | + If the order receives more than limit price, pay the protocol a factor of the difference. + type: object + properties: + kind: + type: string + enum: ["surplus"] + maxVolumeFactor: + description: Never charge more than that percentage of the order volume. + type: number + minimum: 0.0 + maximum: 0.99999 + example: 0.05 + factor: + description: The factor of the user surplus that the protocol will request from the solver after settling the order + type: number + example: 0.5 + PriceImprovement: + description: | + A cut from the price improvement over the best quote is taken as a protocol fee. + type: object + properties: + kind: + type: string + enum: [ "priceImprovement" ] + maxVolumeFactor: + description: Never charge more than that percentage of the order volume. + type: number + example: 0.01 + factor: + description: The factor of the user surplus that the protocol will request from the solver after settling the order + type: number + example: 0.5 + quote: + $ref: "#/components/schemas/Quote" + VolumeFee: + type: object + properties: + kind: + type: string + enum: ["volume"] + factor: + description: The fraction of the order's volume that the protocol will request from the solver after settling the order. + type: number + example: 0.5 + Quote: + type: object + properties: + sell_amount: + $ref: "#/components/schemas/TokenAmount" + buy_amount: + $ref: "#/components/schemas/TokenAmount" Fulfillment: description: | A trade which fulfills an order from the auction.