Skip to content

DeFi SDK Makes Money Lego Work

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

casey-barr/defi-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build status Test status Coverage status Lint status License Discord Twitter Follow

DeFi SDK is an open-source system of smart contracts designed for precise DeFi portfolio accounting. To put it simply, DeFi SDK is the on-chain balanceOf for DeFi protocols.

If you have any questions about DeFi SDK, feel free to reach out to us on our Discord server.

Features

💥Query user assets and debt deposited in DeFi protocols like Maker, Aave, dYdX, etc.

How much debt does 0xdead..beef have on Compound?

📊Get the underlying components of complex derivative ERC20 tokens

How much cUSDC vs ETH does ETHMACOAPY have?

✨Interact with multiple DeFi protocols in a unified way

See How to interact with DeFi SDK contracts

Addresses

AdapterRegistry contract is deployed to the mainnet and its source code is verified on etherscan.

All the deployed contracts' addresses are available here.

How to Add Your Adapter

The full instructions on how to add a custom adapter to the AdapterRegistry contract may be found in our docs.

If you have questions and/or want to add your adapter to Zerion reach out to us on our Discord server.

Security Vulnerabilities 🛡

If you discover a security vulnerability within DeFi SDK, please send us an e-mail at [email protected]. All security vulnerabilities will be promptly addressed.

Dev Notes

This project uses Truffle and web3js for all Ethereum interactions and testing.

Set environment

Rename .env.sample file to .env, and fill in the env variables.

MNEMONIC and INFURA_API_KEY are required for core and adapters tests. PRIVATE_KEY is required for interactiveAdapters tests.

Compile contracts

npm run compile

Run tests

npm run test:core for core tests. npm run test:adapters for adapters tests. npm run test:interactiveAdapters for interactiveAdapters tests.

Run Solidity code coverage

npm run coverage

Currently, unsupported files are ignored.

Run Solidity and JS linters

npm run lint

Currently, unsupported files are ignored.

Run all the migrations scripts

npm run deploy:network, network is either development or mainnet.

Serve docs

npm run docs:serve

License

All smart contracts are released under GNU LGPLv3.

About

DeFi SDK Makes Money Lego Work

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 53.5%
  • Solidity 46.2%
  • Shell 0.3%