one_delta.lending

Documentation for eth_defi.one_delta.lending Python module.

1delta proxy functions to interact with lending pool.

  • Supply collateral to lending pool

  • Withdraw collateral from lending pool

Functions

supply(one_delta_deployment, *, token, ...)

Supply collateral to Aave

withdraw(one_delta_deployment, *, token, ...)

Withdraw collateral from Aave

supply(one_delta_deployment, *, token, amount, wallet_address)

Supply collateral to Aave

Parameters
  • one_delta_deployment (eth_defi.one_delta.deployment.OneDeltaDeployment) – 1delta deployment

  • token (web3.contract.contract.Contract) – collateral token contract proxy

  • collateral_amount – amount of collateral to be supplied

  • wallet_address (str) – wallet address of the user

  • amount (int) –

Returns

multicall contract function to supply collateral

Return type

web3.contract.contract.ContractFunction

withdraw(one_delta_deployment, *, token, atoken, amount, wallet_address)

Withdraw collateral from Aave

Parameters
  • one_delta_deployment (eth_defi.one_delta.deployment.OneDeltaDeployment) – 1delta deployment

  • token (web3.contract.contract.Contract) – collateral token contract proxy

  • atoken (web3.contract.contract.Contract) – aToken contract proxy

  • collateral_amount – amount of collateral to be withdrawn

  • wallet_address (str) – wallet address of the user

  • amount (int) –

Returns

multicall contract function to withdraw collateral

Return type

web3.contract.contract.ContractFunction