{"id":18359640,"url":"https://github.com/starkware-libs/stark-perpetual","last_synced_at":"2026-01-22T12:07:04.145Z","repository":{"id":38994783,"uuid":"384045617","full_name":"starkware-libs/stark-perpetual","owner":"starkware-libs","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-22T10:15:13.000Z","size":5533,"stargazers_count":56,"open_issues_count":2,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T04:17:12.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cairo","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starkware-libs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit/ABDK_StarkWare_Perpetual_V3_1_v_1_0.pdf","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-08T07:53:44.000Z","updated_at":"2025-03-11T03:49:39.000Z","dependencies_parsed_at":"2023-11-22T11:30:29.195Z","dependency_job_id":"7912d413-d199-4afb-add4-c8a9d07d2919","html_url":"https://github.com/starkware-libs/stark-perpetual","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/starkware-libs/stark-perpetual","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fstark-perpetual","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fstark-perpetual/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fstark-perpetual/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fstark-perpetual/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starkware-libs","download_url":"https://codeload.github.com/starkware-libs/stark-perpetual/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starkware-libs%2Fstark-perpetual/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28662844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T22:23:50.622Z","updated_at":"2026-01-22T12:07:04.126Z","avatar_url":"https://github.com/starkware-libs.png","language":"Cairo","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StarkEx Perpetual Resources\n\n## Overview\n​\nThis repository contains the Cairo code and a collection of tools used by StarkEx Perpetual,\nStarkWare's scalability solution for derivatives trading.\nIf you are not familiar with StarkEx, you can read more about it [here](https://docs.starkware.co/starkex/).\n\nNote: The Cairo code that proves spot trading, can be found [in another repo](https://github.com/starkware-libs/starkex-for-spot-trading).\n\nIf you are not familiar with the Cairo language, you can find more details about it [here](https://www.cairo-lang.org/).\n\nThe Cairo code is published to allow a permissionless audit of StarkEx business logic,\nas enforced by the StarkEx smart-contract\n\n\n## Repository Contents\n​\n**src/starkware/cairo/dex**, **src/services/exchange/cairo**, **src/services/perpetual/cairo**\nThe full Cairo program that StarkEx Perpetual executes.\nIt includes a Python file, *generate_program_hash_test.py*, that calculates the hash of the\nCairo code and compares it to the pre-calculated value found at *program_hash.json*\n​\n\n**src/starkware/crypto/starkware/crypto/signature**, **src/services/perpetual/public**\nThe Python implementation of the cryptographic primitives used by StarkEx.\nThese implementations, or equivalent implementations in other languages such as JS, are used by StarkEx user's wallets in order to generate and sign on orders.\n\n\n### Usage:\n​\n1. Run the repo's tests by running the command:\\\n    `docker build .`\n\n2. Verify that the same hash is used by StarkEx on Mainnet by running the script\n*src/services/extract_cairo_hash.py* in the following way:\\\n    `./src/services/exchange/extract_cairo_hash.py --main_address \u003cchecksummed_main_address\u003e --node_endpoint \u003cyour_node_endpoint\u003e `\n​\n\nYou can find the relevant addresses and current versions for the\ndifferent StarkEx deployments [here](https://docs.starkware.co/starkex/deployments-addresses.html).\n\nWhen comparing the hash, please make sure you checkout the tag that corresponds to the\ndeployed version from this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarkware-libs%2Fstark-perpetual","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarkware-libs%2Fstark-perpetual","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarkware-libs%2Fstark-perpetual/lists"}