Skip to main content
Version: Next

lending

LendingAssetInfo Objects

@dataclass
class LendingAssetInfo()

LendingAssetInfo The LendingAssetInfo is used to represent a lending position of a user

LendingPortfolio Objects

@dataclass
class LendingPortfolio()

LendingPortfolio The LendingPortfolio is used to represent the lending positions of a user

to_dict

def to_dict() -> dict

Convert Portfolio to the specified dict structure.

LendingInterface Objects

class LendingInterface(ABC)

LendingInterface The LendingInterface can be used to standardize the interface of a lending protocol

__init__

@abstractmethod
def __init__(contracts: list[ContractInterface], tokens: list[TokenInterface],
settings: dict, metric_helper: MetricHelperInterface)

Initialize the Lending protocol

Arguments:


  • contracts List[ContractInterface] - Contracts to be used in the protocol, specified in the configuration
  • tokens List[TokenInterface] - Tokens to be used in the protocol, all tokens for the environment will be passed
  • settings dict - Settings for the protocol, specified in the configuration
  • metric_helper MetricHelperInterface - MetricHelper to be used for the protocol to log metrics

initialize

@abstractmethod
def initialize(agent_addresses: list[str])

Initialize the Lending protocol

Arguments:


  • agent_addresses List[str] - List of agent addresses that will be using the protocol