{"id":48037912,"url":"https://github.com/zients/go-trading-ace","last_synced_at":"2026-04-04T14:00:50.595Z","repository":{"id":264850952,"uuid":"892968599","full_name":"zients/go-trading-ace","owner":"zients","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-23T15:54:01.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-23T18:30:56.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/zients.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-23T07:09:57.000Z","updated_at":"2024-12-23T15:53:45.000Z","dependencies_parsed_at":"2024-12-23T16:29:12.146Z","dependency_job_id":"58665b2b-a9db-484c-a47b-a1d858eebe96","html_url":"https://github.com/zients/go-trading-ace","commit_stats":null,"previous_names":["tsen1220/go-trading-ace","zients/go-trading-ace"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zients/go-trading-ace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fgo-trading-ace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fgo-trading-ace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fgo-trading-ace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fgo-trading-ace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zients","download_url":"https://codeload.github.com/zients/go-trading-ace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zients%2Fgo-trading-ace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-04-04T14:00:30.658Z","updated_at":"2026-04-04T14:00:50.524Z","avatar_url":"https://github.com/zients.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Trading Ace\n\n## Introduction\nWelcome to Go Trading Ace – a Go-based platform that I built to interact with decentralized finance (DeFi) protocols. The goal of this project is to leverage Go to fetch data from the Uniswap smart contracts and create a point-based rewards system for liquidity providers, turning liquidity provision into an engaging incentive activity.\n\nIn this system, I extract data from Uniswap’s smart contracts, focusing on liquidity pools and trading volumes. Based on the liquidity provided by users, I calculate rewards and structure them into a \"share pool\" system. Users earn points for their participation, which are stored and tracked, creating a dynamic incentive system to encourage liquidity provision.\n\nKey Features:\n- Uniswap Integration: The system interacts with Uniswap's Ethereum-based smart contracts to fetch real-time data on liquidity pools and trading volumes.\n- Share Pool Rewards: A point-based reward system where users earn points based on the liquidity they provide. These points are recorded in a decentralized ledger for transparency.\n- Leaderboard System: Users can see where they rank on the leaderboard, showcasing the top contributors to liquidity pools based on their accumulated rewards.\n\nWith Go Trading Ace, I’ve built a platform where developers and DeFi enthusiasts can easily integrate Uniswap data into their applications, develop liquidity incentives, and create engaging user experiences that promote participation in DeFi protocols.\n\n## Getting Started\n\nThese instructions will help you set up the project on your local machine for development and testing purposes.\n\n### Prerequisites\n\nBefore getting started, ensure that you have the following software installed on your machine:\n\n- **Go** (recommended version 1.18 or higher). You can download Go from [Go's official website](https://golang.org/dl/).\n- **Docker** and **Docker Compose** for running the application in containers. You can download these from:\n  - [Docker](https://www.docker.com/get-started)\n  - [Docker Compose](https://docs.docker.com/compose/install/)\n- **migrate** (for handling database migrations). You can install it using:\n  ```\n  brew install golang-migrate\n  ```\n\n  or you can manually install it:\n  ```\n  curl -sSfL https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.tar.gz | tar xz\n  sudo mv migrate /usr/local/bin\n  ```\n- **Infura Key**\n  You can get Infura key from [Infura](https://www.infura.io/).\n\n### Installing and Running the Project\n\n1. Clone the Repository First, clone the repository to your local machine.\n    ```\n    git clone https://github.com/tsen1220/go-trading-ace.git\n    ```\n2. Configure the database, Redis, infura key to connect ethereum using `/config/config.yml`. And here is example key.\n    ```\n    database:\n      host: \"postgres\"\n      user: \"root\"\n      password: \"root\"\n      port: 5432\n      name: \"trading-ace\"\n      sslmode: \"disable\"\n\n    redis:\n      prefix: \"trading-ace:\"\n      host: \"redis\"\n      port: 6379\n    \n    infura:\n      key: \"94b901bec49345789149a20442ce1a3b\"\n    ```\n3. Build and Run with Docker Compose\n    ```\n    docker-compose up --build\n    ```\n4. Run the Project Locally (Without Docker)  \n   If you prefer to run the project locally, follow these steps:  \n\n   - Download the necessary dependencies:  \n     ```bash\n     go mod tidy\n     ```  \n\n   - Run the application:  \n     ```bash\n     go run main.go\n     ```\n\n### Database Migration\n\n1. **Configure Database Connection**\n   \n    Ensure that your database connection details are correctly set in the config.yml file or your environment variables.\n2. **Run Migrations**\n    Run the database migrations to set up the schema in the database:\n    ```\n    migrate -path=migrations -database \"postgres://root:root@localhost:5432/trading-ace?sslmode=disable\" up\n    ```\n3. **Rollback Migrations**\n    If you need to rollback the migrations, you can use:\n    ```\n    migrate -path=migrations -database \"postgres://root:root@localhost:5432/trading-ace?sslmode=disable\" down\n    ```\n\n### Running Tests\nTo run the tests for the project, execute the following command:\n```\ngo test ./...\n```\n\nIf you want to get coverage info:\n```\ngo test ./... -cover\n```\n\n### Swagger API Docs\n\nYou can view the API documentation from the following URL:\n\n```\nhttp://localhost:8080/swagger/index.html\n```\n\nThis will open the interactive Swagger UI, allowing you to explore and test the API endpoints.\n\nIf you want to update the Swagger documentation, follow these steps:\n\n1. Install the latest version of the swag tool:\n\n```\ngo install github.com/swaggo/swag/cmd/swag@latest\n```\n\n2. Generate or update the Swagger documentation:\n\n```\nswag init\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Fgo-trading-ace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzients%2Fgo-trading-ace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzients%2Fgo-trading-ace/lists"}