{"id":19830498,"url":"https://github.com/guzus/tribe3-v1-liquidation-bot","last_synced_at":"2026-01-22T06:38:47.382Z","repository":{"id":191219125,"uuid":"684114367","full_name":"guzus/tribe3-v1-liquidation-bot","owner":"guzus","description":"simple liquidation bot for tribe3 v1 beta","archived":false,"fork":false,"pushed_at":"2023-09-02T07:03:17.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-18T09:53:16.161Z","etag":null,"topics":["arbitrum","defi","foundry","liquidation","long-tail","mev-bot","nft-perp","python","solidity","tribe3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guzus.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-28T13:38:49.000Z","updated_at":"2025-06-12T08:19:12.000Z","dependencies_parsed_at":"2023-08-28T21:49:59.149Z","dependency_job_id":"a6ca792b-f1f6-49c7-b75b-f0887fbb27f5","html_url":"https://github.com/guzus/tribe3-v1-liquidation-bot","commit_stats":null,"previous_names":["guzus/tribe3-v1-liquidation-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guzus/tribe3-v1-liquidation-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzus%2Ftribe3-v1-liquidation-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzus%2Ftribe3-v1-liquidation-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzus%2Ftribe3-v1-liquidation-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzus%2Ftribe3-v1-liquidation-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guzus","download_url":"https://codeload.github.com/guzus/tribe3-v1-liquidation-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guzus%2Ftribe3-v1-liquidation-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28657065,"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":["arbitrum","defi","foundry","liquidation","long-tail","mev-bot","nft-perp","python","solidity","tribe3"],"created_at":"2024-11-12T11:23:51.585Z","updated_at":"2026-01-22T06:38:47.348Z","avatar_url":"https://github.com/guzus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tribe3 v1 Liquidation bot\n\n## Overview\n\n**Tribe3 v1 beta** (see [here](https://arbiscan.io/address/0x4309727ecf49205b441de39f68939b17222b98e3#code) for implementation) is vAMM based NFT perpetual exchange on Arbitrum. It has a liquidation mechanism that allows liquidators to profit by rectifying undercollateralized positions.\n\nThis bot is designed to capture liquidation opportunities and liquidate positions on Tribe3 v1.\n\n## Running the bot\n\n1. Deploy `LiquidationReader` contract on Arbitrum\n2. Run `Arbitrum node` (see [here](https://docs.arbitrum.io/node-running/quickstart-running-a-node) for instructions)\n3. Configure `.env` file\n4. Run the `bot` on **Python 3.10+**\n\n```shell\ncd bot\npip install -r requirements.txt\npython3 run.py\n```\n\nFor optimal performance of this bot, it's crucial to minimize the latency of the eth_call function. It is recommended to run both the Arbitrum full node and the bot on the same machine.\n\n## Algo\n\n```python\n\"\"\"\n1. get a list of EOAs that have sent ETH to Tribe3 ClearingHouse contract by using arbiscan API\n\n2. loop infinitely(in my case it took 300 ms per cycle):\n    \n    eth_call to smart contract(LiquidationReader) to get a trader address and pool address of undercollateralized position\n    \n    if there's any:\n        \n        send a transaction to liquidate the position\n\n        send telegram notification (success / failure)\n\"\"\"\n```\n\n## More Optimizations that could have been done\n\n- Compare gas fee and a profit of liquidating a position, and only liquidate if the profit is greater than the gas fee\n\n- Save gas fee by creating ordering contract. e.g. only pass the address of trader to the ordering contract, and let the ordering contract call the liquidation contract with every(eight) pool addresses. This way, we can save gas fee by optimizing calldata.\n\n- `eth_call` faster so that we can run eth_call faster than block creation speed(250ms / block).\n\n## Important Note\n\nPlease be aware that since Tribe3 v1 beta is closed, the code provided here might require modifications to be applicable to other protocols.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguzus%2Ftribe3-v1-liquidation-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguzus%2Ftribe3-v1-liquidation-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguzus%2Ftribe3-v1-liquidation-bot/lists"}