All Projects → bonedaddy → go-compound

bonedaddy / go-compound

Licence: Apache-2.0 license
Golang client for compound.finace api and smart contracts

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to go-compound

PancakeSwapBot
PancakeSwap prediction bot
Stars: ✭ 38 (+65.22%)
Mutual labels:  trading, defi
octofi-app-aquafarm
OctoFi - Track your DeFi portfolio, find new investment opportunities, buy and sell directly, and wrap your tentacles around a sea of gains. Hosted on Github Pages.
Stars: ✭ 36 (+56.52%)
Mutual labels:  dapp, defi
coinmarketcap-new-listings-sniper-bot
Sniper bot to buy new tokens listed on Coinmarketcap.
Stars: ✭ 55 (+139.13%)
Mutual labels:  trading, defi
awesome-waves
Curated list of awesome things for development on Waves blockchain.
Stars: ✭ 60 (+160.87%)
Mutual labels:  dapp, defi
defi-dapps-solidity-smart-contracts
This is a Web 3 Smart Contract learning and teaching repo which will be used to teach students all across Pakistan.
Stars: ✭ 241 (+947.83%)
Mutual labels:  dapp, defi
defi-sdk-js
JavaScript/TypeScript wrapper for DeFi SDK
Stars: ✭ 33 (+43.48%)
Mutual labels:  dapp, defi
airswap-web
AirSwap Web App
Stars: ✭ 94 (+308.7%)
Mutual labels:  dapp, defi
core
SIREN Core Smart Contracts
Stars: ✭ 39 (+69.57%)
Mutual labels:  dapp, defi
synthetix-js
[deprecated] Please use https://github.com/Synthetixio/js-monorepo/tree/master/packages/contracts-interface
Stars: ✭ 63 (+173.91%)
Mutual labels:  dapp, defi
Rabby
The game-changing wallet for Ethereum and all EVM chains
Stars: ✭ 562 (+2343.48%)
Mutual labels:  dapp, defi
setprotocol.js
🥞 Javascript library for a collateralized basket of ERC20 tokens
Stars: ✭ 57 (+147.83%)
Mutual labels:  dapp, defi
NFT-Dapp-Boilerplate
A highly scalable NFT and DEFI boilerplate with pre added web3 and different wallets with a focus on performance and best practices
Stars: ✭ 51 (+121.74%)
Mutual labels:  dapp, defi
Setheum
Setheum Network - Islamic Finance DeFi, Multi-Stablecoins, Payments, EVM, DeFi on Rockets to Heaven => 🚀ready for hacking🚀
Stars: ✭ 15 (-34.78%)
Mutual labels:  dapp, defi
PancakeSwapPredictionBot
PancakeSwap V2 Prediction Bot With Machine Learning | Automated Strategy, Auto Betting, Auto Claim
Stars: ✭ 21 (-8.7%)
Mutual labels:  trading, defi
quipuswap-webapp
🌐 🧙‍♂️ Decentralized application UI for Quipuswap protocol.
Stars: ✭ 21 (-8.7%)
Mutual labels:  dapp, defi
uniswap-python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 533 (+2217.39%)
Mutual labels:  trading, defi
compound-borrow-examples
Code examples for borrowing Ethereum assets from the Compound Protocol.
Stars: ✭ 76 (+230.43%)
Mutual labels:  defi, compound-finance
MultiDexArbBot
This is an arbitrage bot that uses existing price aggregators such as 1inch, Paraswap, dex.ag, matcha and more to get the best exchange rates across different decentralized exchanges on different blockchains and ecosystems.
Stars: ✭ 67 (+191.3%)
Mutual labels:  dapp, defi
alcor-ui
Alcor Exchange | First self-listing onchain DEX for eosio tokens;
Stars: ✭ 103 (+347.83%)
Mutual labels:  dapp, defi
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+386.96%)
Mutual labels:  dapp, defi

go-compound

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.

Contents

  • abi contains json abi definitions for various compound smart contracts
  • bindigns contains abigen generated golang bindings for the various abi's
  • client contains a client library to build applications that use the compound.finance API and interact with the smart contracts
  • cmd contains a small command-line client
  • models contains Golang types for the various responses that the API gives. Currently it has types for CTokenService and AccountService responses.
  • pb contains protobuf definitions for the compound APIs. Do not use
  • sampler contains sampler configurations to enable console based monitoring of your compound accounts

Current Capabilities

APIs

Client Library

  • 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

CLI

  • Pretty print full AccountService::AccountResponse information, suitable for piping to jq
  • 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

Monitoring

  • Enables monitoring your account with sampler.
  • Default sampler config located in sampler/sampler.yml however you'll need to replace the addresses as needed.

Long Term Goals

  • 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
    • ???

Links

Support

If you like this application feel free to send me some ETH, or whatever (shit)coins you want to get rid of 0xc7459562777DDf3A1A7afefBE515E8479Bd3FDBD.

Misc Q&A's

  • Q: on the compound token contracts, what's the different between exchangeRateCurrent and exchangeRateStored
  • A: Current calls accrueInterest - stored returns the last computed value
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].