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.
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.
abi
contains json abi definitions for various compound smart contractsbindigns
containsabigen
generated golang bindings for the various abi'sclient
contains a client library to build applications that use the compound.finance API and interact with the smart contractscmd
contains a small command-line clientmodels
contains Golang types for the various responses that the API gives. Currently it has types forCTokenService
andAccountService
responses.pb
contains protobuf definitions for the compound APIs. Do not usesampler
contains sampler configurations to enable console based monitoring of your compound accounts
- Complete AccountService calls
- Complete CTokenService calls
- Access to APIs via Golang programs, and not having to deal with raw http calls
- Watch account health, signalling and printing on different account health states
- Retrieve supply interest earned for a particular token
- Retrieve total supply interest earned
- Retrieve borrow interest owed for a particular token
- Borrow from any compound contract
- Get borrow rate for any compound contract
- Retrieve list of liquidatable addresses
- Pretty print full
AccountService::AccountResponse
information, suitable for piping tojq
- Retrieve account health
- Retrieve supply interest earned for a particular token
- Retrieve total supply interest earned
- Retrieve borrow interest owed for a particular token
- Retrieve a list of addresses that can be liquidated
- Enables monitoring your account with sampler.
- Default sampler config located in
sampler/sampler.yml
however you'll need to replace the addresses as needed.
- Enable persisting retrieve data locally in a DB for fast lookups
- Enable report generation of your holdings
- Enable the
MarketHistoryService
API - Enable graphing of
MarketHistoryService
metrics - Enable arbitrage between uniswap and compound
- Enable things like spotting interest rate arbitrages
- Repayment arbitrages
- ???
- API Docs
- Compound GitHub
- Compound App
- Compound Website
- comproi
- Defi Saver Compound Manager
- chiragkhatri.me/compound-liquidator
- azizjalel.com/liquidator
- Compound Liquidation Calculator
- aleth.io (analytics)
- zeroin (compound management)
If you like this application feel free to send me some ETH, or whatever (shit)coins you want to get rid of 0xc7459562777DDf3A1A7afefBE515E8479Bd3FDBD
.
- Q: on the compound token contracts, what's the different between
exchangeRateCurrent
andexchangeRateStored
- A: Current calls accrueInterest - stored returns the last computed value