{"id":51794996,"url":"https://github.com/dfinity/oisy-trade","last_synced_at":"2026-07-21T02:06:20.513Z","repository":{"id":365935866,"uuid":"1193504760","full_name":"dfinity/oisy-trade","owner":"dfinity","description":"Order book DEX","archived":false,"fork":false,"pushed_at":"2026-07-20T13:26:51.000Z","size":1920,"stargazers_count":9,"open_issues_count":15,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T14:11:41.358Z","etag":null,"topics":["br-protected-2"],"latest_commit_sha":null,"homepage":"https://dfinity.github.io/oisy-trade/","language":"Rust","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/dfinity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-27T09:48:25.000Z","updated_at":"2026-07-20T12:14:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dfinity/oisy-trade","commit_stats":null,"previous_names":["dfinity/oisy-trade"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dfinity/oisy-trade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Foisy-trade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Foisy-trade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Foisy-trade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Foisy-trade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinity","download_url":"https://codeload.github.com/dfinity/oisy-trade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Foisy-trade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35705777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-21T02:00:06.728Z","response_time":109,"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":["br-protected-2"],"created_at":"2026-07-21T02:06:19.715Z","updated_at":"2026-07-21T02:06:20.505Z","avatar_url":"https://github.com/dfinity.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OISY TRADE\n\n[![CI](https://github.com/dfinity/oisy-trade/actions/workflows/ci.yml/badge.svg)](https://github.com/dfinity/oisy-trade/actions/workflows/ci.yml)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Rust](https://img.shields.io/badge/Rust-stable-orange.svg)](https://www.rust-lang.org/)\n[![Internet Computer](https://img.shields.io/badge/Internet%20Computer-mainnet-blueviolet.svg)](https://internetcomputer.org/)\n\n\u003e OISY TRADE is an order-book DEX on the [Internet Computer](https://internetcomputer.org/).\n\n📖 **[Full documentation →](https://dfinity.github.io/oisy-trade/)**\n\n## Table of Contents\n\n- [Key Features](#key-features)\n- [Architecture](#architecture)\n- [Deployment](#deployment)\n- [Usage](#usage)\n- [Development](#development)\n\n\u003ca id=\"key-features\"\u003e\u003c/a\u003e\n## ✨ Key Features\n\n- **CEX-like experience** — deposit once, trade as much as you want, withdraw anytime\n- **Fully onchain order book** — central limit order book (CLOB) running entirely within a single canister\n- **Permissionless trading** — any principal can trade on any active pair, no allowlisting required\n\n\u003ca id=\"architecture\"\u003e\u003c/a\u003e\n## 🏗️ Architecture\n\n- **Single canister**: all order book state, matching, and settlement live in one canister.\n- **Synchronous matching engine**: token transfers only happen at the deposit/withdrawal edges; the matching engine operates entirely on internal balances, with no async complexity.\n- **Event-sourced state**: every state change is recorded in an append-only log in stable memory and replayed on upgrade, providing full auditability and simpler upgrades.\n\nSee the [design document](https://dfinity.github.io/oisy-trade/development/design.html) for the full architecture.\n\n\u003ca id=\"deployment\"\u003e\u003c/a\u003e\n## 🚀 Deployment\n\n| Environment         | Canister ID                                                                                                  | Listings          |\n|---------------------|--------------------------------------------------------------------------------------------------------------|-------------------|\n| 🚀 Production | [`sy2xe-miaaa-aaaar-qb7sq-cai`](https://dashboard.internetcomputer.org/canister/sy2xe-miaaa-aaaar-qb7sq-cai) | \u003cul\u003e\u003cli\u003eICP/ckUSDT\u003c/li\u003e\u003cli\u003e\u003cem\u003eMore to come soon!\u003c/em\u003e\u003c/li\u003e\u003c/ul\u003e |\n| 🧪 Staging | [`proc5-daaaa-aaaar-qb5va-cai`](https://dashboard.internetcomputer.org/canister/proc5-daaaa-aaaar-qb5va-cai) | Trade test tokens |\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## 📘 Usage\n\nWalk through the main OISY TRADE flows against the staging canister using only the [`icp` CLI](https://cli.internetcomputer.org/): discover trading pairs, approve OISY TRADE as an ICRC-2 spender, deposit, place a limit order, check its status, and withdraw.\n\nSee the [Getting Started walkthrough](https://dfinity.github.io/oisy-trade/usage/for-users.html).\n\n\n### 🤖Agents\n\nTalk to your agent to interact with OISY TRADE 😎.\n\n\u003e Buy 0.01 SOL at a limit price of 0.037 ETH per SOL\n\n![Agent placing an order](docs/src/usage/agent_place_order.png?raw=true \"Agent placing an order\")\n\nSee the [Agents guide](https://dfinity.github.io/oisy-trade/usage/for-agents.html).\n\n\u003ca id=\"development\"\u003e\u003c/a\u003e\n## 🛠️ Development\n\n### Prerequisites\n\nInstall [`mise`](https://mise.jdx.dev/) and then run `mise install` from the repository root to set up Rust, `just`, and other pinned tools defined in [`mise.toml`](mise.toml).\n\nAdditionally:\n\n- [icp CLI](https://cli.internetcomputer.org/)\n- [Docker](https://docs.docker.com/get-docker/) with `buildx` (only for `just docker-build`)\n\n### Build\n\nList all available recipes with `just`.\n\n| Command             | Description                                |\n|---------------------|--------------------------------------------|\n| `just lint`         | Run linter                                 |\n| `just build`        | Build the canister WASM (native)           |\n| `just docker-build` | Build the canister WASM reproducibly       |\n| `just test`         | Run unit and integration tests             |\n| `just ci`           | Run all checks, build, and tests           |\n\n### Reproducible build\n\n`just docker-build` produces `wasms/oisy_trade_canister.wasm.gz` that is byte-identical regardless of host platform, as long as Docker is available. The build runs inside a `linux/amd64` container with a digest-pinned base image and a pinned Rust toolchain; on Apple Silicon it transparently runs under Rosetta/QEMU.\n\nCI verifies reproducibility by building the same commit twice on different runner images (`ubuntu-22.04` and `ubuntu-24.04`) and asserting the SHA-256 hashes match.\n\nTo verify a tagged release against the canister deployed on the IC, check out the tag and run:\n\n```bash\njust docker-build\nsha256sum wasms/oisy_trade_canister.wasm.gz\n```\n\nThe resulting hash should match both the SHA-256 published in the GitHub Release notes and the canister's module hash on the IC.\n\n### Deploy to staging\n\nRequires the [icp CLI](https://cli.internetcomputer.org/) with an identity that has deployment permissions.\nBy default the `hsm` identity is used; override with `just deploy \u003cidentity\u003e`. Pass an optional second argument to read the identity's unlock secret (HSM PIN or encrypted-PEM password) from a file and run non-interactively:\n\n```bash\njust deploy                                   # default: hsm, interactive unlock\njust deploy dev                               # non-hsm identity, interactive unlock\njust deploy hsm ~/.config/icp/hsm.pin         # non-interactive with PIN file\n```\n\n### Releasing\n\nReleases are cut from `main` with [release-plz](https://release-plz.dev/) in two manual steps:\n\n1. **Open the release PR.** Run the [`Release`](.github/workflows/release.yml) workflow (Actions → Release → *Run workflow*). It opens a PR that bumps the crate versions and updates the changelogs from the [conventional commits](https://www.conventionalcommits.org/) made since the last release.\n2. **Merge the release PR.** Review and merge it. Merging triggers the [`Publish`](.github/workflows/publish.yml) workflow, which:\n   - tags the released crates,\n   - builds `oisy_trade_canister.wasm.gz` reproducibly from the tagged commit and publishes a GitHub Release with the WASM, its SHA-256, the candid interface, and the deployment status, and\n   - publishes `oisy_trade_types` to [crates.io](https://crates.io/).\n\nThe pipeline does not deploy — releasing and deploying are separate steps.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Foisy-trade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinity%2Foisy-trade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Foisy-trade/lists"}