SPB Git

Repository Public

execution-mandate-approval-sheet.json 11.4 KB 372 lines json

1{2  "mandateId": "4b9d1c2e-3f40-4a5b-8c6d-000000000101",3  "mandate": {4    "v": 1,5    "mandateId": "4b9d1c2e-3f40-4a5b-8c6d-000000000101",6    "principal": {7      "kind": "agent",8      "id": "9f8e7d6c-5b4a-4c3d-8e2f-000000000201"9    },10    "accounts": [11      {12        "kind": "venue_account",13        "venue": "hyperliquid",14        "network": "mainnet",15        "account": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8"16      }17    ],18    "venues": [19      "hyperliquid"20    ],21    "networks": [22      "mainnet"23    ],24    "instruments": [25      "hyperliquid:ETH",26      "hyperliquid:BTC"27    ],28    "marketKinds": [29      "perp"30    ],31    "orderTypes": [32      "market",33      "limit",34      "stop",35      "take_profit"36    ],37    "maxCapitalUsd": "5000.50",38    "maxOrderNotionalUsd": "2000.00",39    "maxPositionNotionalUsd": "8000",40    "maxLeverage": "3",41    "maxDailyLossUsd": "250.50",42    "floorEquityUsd": "2500.0",43    "createdAt": 1794000000,44    "notBefore": 1794000000,45    "notAfter": 1795209600,46    "frequency": {47      "perMinute": 5,48      "perHour": 30,49      "perDay": 12050    },51    "maxSlippageBps": 150,52    "maxFeeUsd": "5.0",53    "stopConditions": [54      {55        "kind": "signer_unreachable_gte",56        "ms": 12000057      },58      {59        "kind": "loss_gte",60        "usd": "1000.0"61      },62      {63        "kind": "drawdown_gte",64        "bps": 150065      },66      {67        "kind": "data_stale_gte",68        "ms": 3000069      },70      {71        "kind": "consecutive_rejects_gte",72        "count": 573      }74    ],75    "mode": "live",76    "strategySha256": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",77    "label": "Tendance BTC/ETH — été"78  },79  "hash": "93d1bd79102b5f14a7099d9517c11676554d57bdef8bcfebf6e466eff4d2d794",80  "mode": "live",81  "enforcement": [82    {83      "field": "v",84      "enforcedBy": "not_applicable",85      "signerField": null,86      "note": "version of the trading mandate; the signer shape has its own"87    },88    {89      "field": "mandateId",90      "enforcedBy": "signer",91      "signerField": "mandateId",92      "note": "the derivative mandate carries the same id: one id for the pair"93    },94    {95      "field": "principal",96      "enforcedBy": "signer_partial",97      "signerField": "agentId",98      "note": "recorded by the signer for the audit trail; the signer cannot verify who calls it — the API binds the principal to the mandate"99    },100    {101      "field": "accounts",102      "enforcedBy": "signer",103      "signerField": "account, agentAddress, authorizationId",104      "note": "the signer signs for this one venue account only"105    },106    {107      "field": "venues",108      "enforcedBy": "signer",109      "signerField": "venue",110      "note": "the shape is for hyperliquid only"111    },112    {113      "field": "networks",114      "enforcedBy": "signer",115      "signerField": "network",116      "note": "the venue network of the authorization"117    },118    {119      "field": "instruments",120      "enforcedBy": "signer",121      "signerField": "instruments[].instrument",122      "note": "the signer refuses an order or a leverage change on any other instrument; a cancel is bounded by the instruments of the venue authorization, which may be wider"123    },124    {125      "field": "marketKinds",126      "enforcedBy": "signer",127      "signerField": null,128      "note": "structural: this shape signs perpetual orders only"129    },130    {131      "field": "orderTypes",132      "enforcedBy": "api_only",133      "signerField": null,134      "note": "the signer signs any order type the venue adapter can build; the allowed types are checked by the API"135    },136    {137      "field": "maxCapitalUsd",138      "enforcedBy": "signer_partial",139      "signerField": "maxGrossExposure",140      "note": "enforced as worst-case gross exposure ≤ capital × leverage; the capital itself (collateral on the venue) is not capped by the signer"141    },142    {143      "field": "maxOrderNotionalUsd",144      "enforcedBy": "signer",145      "signerField": "maxOrderNotional",146      "note": "size × highest named price of one order, reduce-only orders included"147    },148    {149      "field": "maxPositionNotionalUsd",150      "enforcedBy": "signer",151      "signerField": "instruments[].maxPositionNotional",152      "note": "worst case per instrument, from the signer's own read of the venue account and its own prices"153    },154    {155      "field": "maxLeverage",156      "enforcedBy": "signer",157      "signerField": "instruments[].maxLeverage",158      "note": "the signer refuses an order that can add exposure while the venue's leverage setting is higher, and never sets a higher one"159    },160    {161      "field": "maxDailyLossUsd",162      "enforcedBy": "api_only",163      "signerField": null,164      "note": "the signer has no daily-loss limit; it only knows the floor"165    },166    {167      "field": "floorEquityUsd",168      "enforcedBy": "signer",169      "signerField": "floorEquity",170      "note": "below the floor the signer signs reduce-only orders and cancels only (the venue's own account value)"171    },172    {173      "field": "createdAt",174      "enforcedBy": "signer",175      "signerField": "createdAt",176      "note": "must be current at approval"177    },178    {179      "field": "notBefore",180      "enforcedBy": "signer_partial",181      "signerField": "createdAt",182      "note": "the signer has no start time: it signs from the approval on, and accepts an approval only while createdAt is within 10 minutes before and 2 minutes after its own clock; the start itself is checked by the API"183    },184    {185      "field": "notAfter",186      "enforcedBy": "signer",187      "signerField": "expiresAt",188      "note": "after it the signer signs only cancels and reduce-only orders for 24 h, then nothing"189    },190    {191      "field": "frequency",192      "enforcedBy": "signer_partial",193      "signerField": "maxOrdersPerDay, maxOrdersPerHour",194      "note": "per day and per hour are enforced by the signer (orders that can add exposure; the venue authorization's own daily count applies as well); per minute is enforced by the API only"195    },196    {197      "field": "maxSlippageBps",198      "enforcedBy": "signer_partial",199      "signerField": "maxPriceDeviationBps",200      "note": "the signer enforces a price band around its own mid on every price of an order — except a reduce-only trigger order, whose trigger may rest between one third and three times the mid, its worst price then being held within the band of the trigger; realised slippage is checked by the API"201    },202    {203      "field": "maxFeeUsd",204      "enforcedBy": "api_only",205      "signerField": null,206      "note": "the signer does not see venue fees"207    },208    {209      "field": "stopConditions",210      "enforcedBy": "api_only",211      "signerField": null,212      "note": "declarative conditions are evaluated by the API; the signer only stops on the floor, the expiry, a revocation and its own halt"213    },214    {215      "field": "mode",216      "enforcedBy": "not_applicable",217      "signerField": null,218      "note": "the signer has no notion of paper or live: a mandate reaches it only when it is live (a paper mandate is never compiled); the venue network is the row `networks`"219    },220    {221      "field": "strategySha256",222      "enforcedBy": "signer_partial",223      "signerField": "strategySha256",224      "note": "recorded by the signer for the audit trail; the signer cannot verify what code runs"225    },226    {227      "field": "label",228      "enforcedBy": "api_only",229      "signerField": null,230      "note": "a display name; not part of the signer shape"231    }232  ],233  "derived": [234    {235      "field": "maxGrossExposure",236      "value": "15001.5",237      "from": "maxCapitalUsd × maxLeverage"238    },239    {240      "field": "maxDailyTurnover",241      "value": "240000",242      "from": "maxOrderNotionalUsd × frequency.perDay"243    },244    {245      "field": "instruments[].maxLeverage",246      "value": "3",247      "from": "maxLeverage (the same for every instrument)"248    },249    {250      "field": "maxPriceDeviationBps",251      "value": "150",252      "from": "maxSlippageBps"253    }254  ],255  "principalDescriptor": null,256  "kind": "directional",257  "passkey": true,258  "signer": {259    "shape": "SPW-VENUE-MANDATE-v1",260    "accountId": "6e0f8a44-1b7c-4f1e-9d55-0000000000b1",261    "mandate": {262      "v": 1,263      "mandateId": "4b9d1c2e-3f40-4a5b-8c6d-000000000101",264      "authorizationId": "7c2a9e10-4d3b-4e8f-9a6c-000000000301",265      "keyId": "spw-0123456789abcdef",266      "venue": "hyperliquid",267      "network": "mainnet",268      "account": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",269      "agentAddress": "0x90f79bf6eb2c4f870365e785982e1f101e93b906",270      "strategySha256": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",271      "agentId": "9f8e7d6c-5b4a-4c3d-8e2f-000000000201",272      "instruments": [273        {274          "instrument": "hyperliquid:ETH",275          "maxLeverage": 3,276          "maxPositionNotional": "8000"277        },278        {279          "instrument": "hyperliquid:BTC",280          "maxLeverage": 3,281          "maxPositionNotional": "8000"282        }283      ],284      "maxOrderNotional": "2000",285      "maxGrossExposure": "15001.5",286      "maxOrdersPerDay": 120,287      "maxOrdersPerHour": 30,288      "maxDailyTurnover": "240000",289      "floorEquity": "2500",290      "maxPriceDeviationBps": 150,291      "createdAt": 1794000000,292      "expiresAt": 1795209600,293      "ackSha256": "c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"294    },295    "hash": "139cfab95ce6645564f4fb48004087ed3554d862993861818b89bbe5f6354d9e",296    "acknowledgement": {297      "locale": "en",298      "sha256": "c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3",299      "version": "fixture",300      "title": "Jurisdiction acknowledgement (fixture)",301      "text": "fixture text of the acknowledgement"302    },303    "warning": "fixture warning",304    "enforcedBySigner": [305      "fixture"306    ],307    "trustedBySigner": [308      "fixture"309    ],310    "notEnforced": [311      "fixture"312    ],313    "windDown": {314      "seconds": 86400,315      "text": "fixture"316    },317    "options": {318      "challenge": "E5z6uVzmZFVk9PtIAECH7TVU2GKZOGGBi4m75fY1TZ4",319      "rpId": "wallet.example.test",320      "timeout": 120000,321      "userVerification": "required",322      "allowCredentials": [323        {324          "id": "Y3JlZC0x",325          "type": "public-key",326          "transports": [327            "internal",328            "hybrid"329          ]330        }331      ]332    }333  },334  "binding": {335    "domain": "SPW-TRADING-MANDATE-APPROVAL-v1",336    "intent": {337      "v": 1,338      "kind": "trading_mandate_approval",339      "mandateId": "4b9d1c2e-3f40-4a5b-8c6d-000000000101",340      "tradingMandateHash": "93d1bd79102b5f14a7099d9517c11676554d57bdef8bcfebf6e466eff4d2d794",341      "principal": "agent:9f8e7d6c-5b4a-4c3d-8e2f-000000000201",342      "mode": "live",343      "signer": {344        "shape": "SPW-VENUE-MANDATE-v1",345        "mandateHash": "139cfab95ce6645564f4fb48004087ed3554d862993861818b89bbe5f6354d9e"346      },347      "nonce": "0d5a7b52-6f1e-4d0a-9a51-000000000031",348      "createdAt": 1794000000000,349      "expiresAt": 1794000300000350    },351    "hash": "55ccbf24adfa39b58a01ca29d16111a284e827cd9afb75f839b14c26c103712c",352    "options": {353      "challenge": "Vcy_JK36ObWKAcop0WERooToJ82a-3X4ObFMJsEDcSw",354      "rpId": "wallet.example.test",355      "timeout": 120000,356      "userVerification": "required",357      "allowCredentials": [358        {359          "id": "Y3JlZC0x",360          "type": "public-key",361          "transports": [362            "internal",363            "hybrid"364          ]365        }366      ]367    },368    "expiresAt": 1794000300000369  },370  "note": "two passkey prompts (fixture)"371}372
Files main
Menu

Theme