-
Notifications
You must be signed in to change notification settings - Fork 254
Adapters v2
- adapters/aave/AaveAssetAdapter
- adapters/aave/AaveDebtAdapter
- adapters/aave/AaveTokenAdapter
- adapters/balancer/BalancerAdapter
- adapters/balancer/BalancerTokenAdapter
- adapters/bancor/BancorAdapter
- adapters/bancor/BancorTokenAdapter
- adapters/compound/CompoundAssetAdapter
- adapters/compound/CompoundDebtAdapter
- adapters/compound/CompoundTokenAdapter
- adapters/curve/CurveAdapter
- adapters/curve/CurveTokenAdapter
- adapters/dmm/DmmAssetAdapter
- adapters/dmm/DmmTokenAdapter
- adapters/dydx/DyDxAssetAdapter
- adapters/dydx/DyDxDebtAdapter
- adapters/idle/IdleAdapter
- adapters/idle/IearnTokenAdapter
- adapters/iearn/IearnAdapter
- adapters/iearn/IearnTokenAdapter
- adapters/maker/ChaiAdapter
- adapters/maker/DSRAdapter
- adapters/maker/MCDAssetAdapter
- adapters/maker/MCDDebtAdapter
- adapters/maker/MKRAdapter (abstract contract)
- adapters/pieDAO/PieDAOPieAdapter
- adapters/pieDAO/PieDAOPieTokenAdapter
- adapters/poolTogether/PoolTogetherAdapter
- adapters/poolTogether/PoolTogetherTokenAdapter
- adapters/synthetix/SynthetixAssetAdapter
- adapters/synthetix/SynthetixDebtAdapter
- adapters/tokenSets/TokenSetsAdapter
- adapters/tokenSets/TokenSetsTokenAdapter
- adapters/uniswap/UniswapV1Adapter
- adapters/uniswap/UniswapV1TokenAdapter
- adapters/uniswap/UniswapV2Adapter
- adapters/uniswap/UniswapV2TokenAdapter
- adapters/zrx/ZrxAdapter
- adapters/ProtocolAdapter (interface)
- adapters/TokenAdapter (interface)
AaveAssetAdapter is ProtocolAdapter
Asset adapter for Aave protocol.
AaveDebtAdapter is ProtocolAdapter
Debt adapter for Aave protocol.
AaveTokenAdapter is TokenAdapter
Token adapter for ATokens.
BalancerAdapter is ProtocolAdapter
Adapter for Balancer protocol.
BalancerTokenAdapter is TokenAdapter
Token adapter for Balancer pool tokens.
BancorAdapter is ProtocolAdapter
Adapter for Bancor pools. Address of SmartToken should be passed.
BancorTokenAdapter is TokenAdapter
Token adapter for SmartTokens. Works with Converters of version 11 and higher.
CompoundAssetAdapter is ProtocolAdapter
Asset adapter for Compound protocol.
CompoundDebtAdapter is ProtocolAdapter
Debt adapter for Compound protocol.
CompoundTokenAdapter is TokenAdapter
Token adapter for CTokens.
CurveAdapter is ProtocolAdapter
Adapter for curve.fi protocol.
CurveTokenAdapter is TokenAdapter
Token adapter for Curve pool tokens. Supports only Compound, Y, bUSD, and sUSDC pools.
DmmAssetAdapter is ProtocolAdapter
Adapter for DeFi Money Market. DMM doesn't have a notion of on-chain debt/borrowing (for now). Therefore, there's no debt-related adapter in here and it was left out on purpose!
DmmTokenAdapter is TokenAdapter
Token adapter for MTokens.
DyDxAssetAdapter is ProtocolAdapter
Asset adapter for dYdX protocol.
DyDxDebtAdapter is ProtocolAdapter
Debt adapter for dYdX protocol.
IdleAdapter is ProtocolAdapter
Adapter for idle.finance protocol.
IdleTokenAdapter is TokenAdapter
Token adapter for IdleTokens.
IearnAdapter is ProtocolAdapter
Adapter for iearn.finance protocol. Deployed twice for v2 and v3 versions of the protocol.
IearnTokenAdapter is TokenAdapter
Token adapter for YTokens.
ChaiAdapter is ProtocolAdapter, MKRAdapter
Adapter for Chai protocol.
DSRAdapter is ProtocolAdapter, MKRAdapter
Adapter for Dai Savings Rate protocol.
MCDAssetAdapter is ProtocolAdapter, MKRAdapter
Asset adapter for Multi-Collateral Dai vaults.
MCDDebtAdapter is ProtocolAdapter, MKRAdapter
Debt adapter for Multi-Collateral Dai vaults.
Base contract for Maker adapters.
Includes all the required constants and pure
functions with calculations.
PieDAOPieAdapter is ProtocolAdapter
Adapter for PieDAO protocol. Supports BTC++ only.
PieDAOPieTokenAdapter is TokenAdapter
Adapter for PieDAO protocol. Supports BTC++ only.
PoolTogetherAdapter is ProtocolAdapter
Adapter for PoolTogether protocol. Supports SAI, DAI, and USDC pools.
PoolTogetherTokenAdapter is TokenAdapter
Token adapter for PoolTogether pools.
SynthetixAssetAdapter is ProtocolAdapter
Asset adapter for Synthetix protocol. Returns SNX collateral (SNX tokens + escrowed rewards), against which synths can be issued.
SynthetixDebtAdapter is ProtocolAdapter
Debt adapter for Synthetix protocol. Returns sUSD debt to the protocol.
TokenSetsAdapter is ProtocolAdapter
Adapter for TokenSets.
TokenSetsTokenAdapter is TokenAdapter
Token adapter for SetTokens.
UniswapV1Adapter is ProtocolAdapter
Adapter for Uniswap V1 protocol.
UniswapV1TokenAdapter is TokenAdapter
Token adapter for Uniswap V1 pool tokens.
UniswapV2Adapter is ProtocolAdapter
Adapter for Uniswap V2 protocol.
UniswapV2TokenAdapter is TokenAdapter
Token adapter for Uniswap V2 pool tokens (pairs).
ZrxAdapter is ProtocolAdapter
Adapter for 0x Staking protocol.
Interface for protocol adapters. Includes all the functions required to be implemented.
NOTE: Adapters inheriting this interface MUST be stateless. Only
internal constant
state variables MUST be used. Onlyinternal
functions SHOULD be used.
adapterType() returns (string)
MUST return "Asset" or "Debt".
tokenType() returns (string)
MUST return token type (default is "ERC20"). Currently supported token types are: "ERC20", "AToken", "Balancer pool token", "CToken", "Curve pool token", "IdleToken", "YToken", "Chai token", "PoolTogether pool", "SetToken", and "Uniswap V1 pool token.
function getBalance(address token, address account) returns (uint256)
MUST return amount of the given token locked on the protocol or owed to the protocol by the given account.
Interface for token adapters. Includes all the functions required to be implemented.
NOTE: Adapters inheriting this interface MUST be stateless. Only
internal constant
state variables MUST be used. Onlyinternal
functions SHOULD be used.
function getMetadata(address token) returns (TokenMetadata)
MUST return TokenMetadata
struct with ERC20-style token info.
function getComponents(address token) returns (Component[])
MUST return array of Component
structs with underlying tokens rates for the given token.
If you have any questions about DeFi SDK, feel free to reach out to us on our Discord server.