{"id":27429418,"url":"https://github.com/byteball/oswap-triangular-arb","last_synced_at":"2025-04-14T14:17:41.226Z","repository":{"id":177626154,"uuid":"660113595","full_name":"byteball/oswap-triangular-arb","owner":"byteball","description":"Triangular arbitrage among Oswap pools","archived":false,"fork":false,"pushed_at":"2024-10-17T07:09:10.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T14:17:33.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byteball.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-29T09:19:36.000Z","updated_at":"2024-10-17T07:09:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"88e56ee7-671e-4398-8a04-7ed12b0963db","html_url":"https://github.com/byteball/oswap-triangular-arb","commit_stats":null,"previous_names":["byteball/oswap-triangular-arb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Foswap-triangular-arb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Foswap-triangular-arb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Foswap-triangular-arb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byteball%2Foswap-triangular-arb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byteball","download_url":"https://codeload.github.com/byteball/oswap-triangular-arb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248894940,"owners_count":21179153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2025-04-14T14:17:40.615Z","updated_at":"2025-04-14T14:17:41.216Z","avatar_url":"https://github.com/byteball.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Autonomous agent and bot for triangular arbitrage among Oswap pools\n\nThe bot finds triangles among Oswap pools, such as AB-BC-CA (where A, B, and C are tokens), and looks for opportunities to make money by trading along the triangle, e.g.:\n\n1. swap A to B via pool AB\n1. swap B received in the previous step to swap it to C via pool BC\n1. swap C received in the previous step to swap it to A via pool CA\n\nIf the amount of A received in the final step is greater than the input amount in the first step, an arbitrage opportunity exists, and the bot trades.\n\nThe trades are executed by an AA that stores the trading capital and ensures that either all 3 trades succeed or none, and that it earns a profit. The AA is triggered by the companion bot when it sees an opportunity for a profitable arbitrage.\n\n\n## Usage\n\nThe base AA is already deployed (see its addresses by opening `oswap-triangular-arb.oscript` in VS Code with [Oscript plugin](https://marketplace.visualstudio.com/items?itemName=obyte.oscript-vscode-plugin)), deploy your personal arbitrage AA by indicating your address in the `owner` field of your `conf.json` and running\n```bash\nnode deploy.js\n```\nThis deploys an arb AA whose capital is in GBYTE and all triangles must have two GBYTE pairs. Edit the `deploy.js` script to deploy a bot with a different main asset.\n\nRun the bot:\n```bash\nnode run.js oswap-triangular-arb 2\u003eerrlog\n```\n\nAdd some money to your arb AA and a small amount (for network fees) to the bot's balance.\n\n\n### Run tests\n```bash\nyarn test\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteball%2Foswap-triangular-arb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyteball%2Foswap-triangular-arb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyteball%2Foswap-triangular-arb/lists"}