{"id":15659137,"url":"https://github.com/bonedaddy/go-compound","last_synced_at":"2025-07-14T06:02:37.983Z","repository":{"id":39850558,"uuid":"200724580","full_name":"bonedaddy/go-compound","owner":"bonedaddy","description":"Golang client  for compound.finace api and smart contracts","archived":false,"fork":false,"pushed_at":"2023-04-04T21:13:14.000Z","size":32720,"stargazers_count":23,"open_issues_count":5,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-05T17:21:33.393Z","etag":null,"topics":["blockchain","bot","compound-finance","dapp","defi","ethereum","golang","trading"],"latest_commit_sha":null,"homepage":"","language":"Go","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/bonedaddy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["postables"]}},"created_at":"2019-08-05T20:31:56.000Z","updated_at":"2024-09-14T10:29:48.000Z","dependencies_parsed_at":"2024-06-19T17:10:14.357Z","dependency_job_id":"c199121b-dd82-43c7-9d1e-e14e5cf45f88","html_url":"https://github.com/bonedaddy/go-compound","commit_stats":null,"previous_names":["postables/go-compound"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bonedaddy/go-compound","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonedaddy%2Fgo-compound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonedaddy%2Fgo-compound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonedaddy%2Fgo-compound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonedaddy%2Fgo-compound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonedaddy","download_url":"https://codeload.github.com/bonedaddy/go-compound/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonedaddy%2Fgo-compound/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265248537,"owners_count":23734254,"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":["blockchain","bot","compound-finance","dapp","defi","ethereum","golang","trading"],"created_at":"2024-10-03T13:15:13.882Z","updated_at":"2025-07-14T06:02:37.960Z","avatar_url":"https://github.com/bonedaddy.png","language":"Go","funding_links":["https://github.com/sponsors/postables"],"categories":[],"sub_categories":[],"readme":"# go-compound\n\n\u003e **WARNING: this code deals with money both by making blockchain calls and returning information that can be used to lose/gain money. Please use cautiously and dont come complaining if you end up losing money.**\n\n`go-compound` is a Golang client, and library for interacting with the compound.finace API, and interacting with the compound contracts, allowing for the creation of bots trading with the Compound protocol.\n\n# Contents\n\n* `abi` contains json abi definitions for various compound smart contracts\n* `bindigns` contains `abigen` generated golang bindings for the various abi's\n* `client` contains a client library to build applications that use the compound.finance API and interact with the smart contracts\n* `cmd` contains a small command-line client\n* `models` contains Golang types for the various responses that the API gives. Currently it has types for `CTokenService` and `AccountService` responses.\n* `pb` contains protobuf definitions for the compound APIs. Do not use\n* `sampler` contains [sampler](https://github.com/sqshq/sampler) configurations to enable console based monitoring of your compound accounts\n\n# Current Capabilities\n\n## APIs\n\n* Complete [AccountService](https://compound.finance/developers/api#AccountService) calls\n* Complete [CTokenService](https://compound.finance/developers/api#CTokenService) calls\n\n## Client Library\n\n* Access to APIs via Golang programs, and not having to deal with raw http calls\n* Watch account health, signalling and printing on different account health states\n* Retrieve supply interest earned for a particular token\n* Retrieve total supply interest earned\n* Retrieve borrow interest owed for a particular token\n* Borrow from any compound contract\n* Get borrow rate for any compound contract\n* Retrieve list of liquidatable addresses\n\n## CLI\n\n* Pretty print full  `AccountService::AccountResponse` information, suitable for piping to `jq`\n* Retrieve account health\n* Retrieve supply interest earned for a particular token\n* Retrieve total supply interest earned\n* Retrieve borrow interest owed for a particular token\n* Retrieve a list of addresses that can be liquidated\n\n## Monitoring\n\n![](https://gateway.temporal.cloud/ipfs/QmZeLP8oN93H9DgCTp8G3C7cpPfw2xZ1rDeSFsLwa1ftTe)\n\n* Enables monitoring your account with [sampler](https://github.com/sqshq/sampler).\n* Default sampler config located in `sampler/sampler.yml` however you'll need to replace the addresses as needed.\n\n# Long Term Goals\n\n* Enable persisting retrieve data locally in a DB for fast lookups\n* Enable report generation of your holdings\n* Enable the `MarketHistoryService` API\n* Enable graphing of `MarketHistoryService` metrics\n* Enable arbitrage between uniswap and compound\n  * Enable things like spotting interest rate arbitrages\n  * Repayment arbitrages\n  * ???\n\n# Links\n\n* [API Docs](https://compound.finance/developers/api)\n* [Compound GitHub](https://github.com/compound-finance/)\n* [Compound App](https://app.compound.finance/)\n* [Compound Website](https://compound.finance/)\n* [comproi](https://www.comproi.com/#)\n* [Defi Saver Compound Manager](https://defisaver.com/compound/manage)\n* [chiragkhatri.me/compound-liquidator](https://chiragkhatri.me/compound-liquidator/)\n* [azizjalel.com/liquidator](https://azizjalel.com/comp/index2.php)\n* [Compound Liquidation Calculator](https://azizjalel.github.io/compoundcalc/)\n* [aleth.io (analytics)](https://aleth.io/)\n* [zeroin (compound management)](https://beta.zerion.io)\n\n# Support\n\nIf you like this application feel free to send me some ETH, or whatever (shit)coins you want to get rid of `0xc7459562777DDf3A1A7afefBE515E8479Bd3FDBD`.\n\n# Misc Q\u0026A's\n\n* Q: on the compound token contracts, what's the different between `exchangeRateCurrent` and `exchangeRateStored`\n* A: Current calls accrueInterest - stored returns the last computed value\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonedaddy%2Fgo-compound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonedaddy%2Fgo-compound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonedaddy%2Fgo-compound/lists"}