Lending Vaults

Lending Vaults

Lotus Lending Vaults instances of Vault V2arrow-up-right with an enabled LotusV2Adapter which enables lending to Lotus market tranches.

Vault V2arrow-up-right are feature rich and designed to be future proof, see breakdownarrow-up-right.

The LotusV2Adapter implements logic to enable Lotus lending.

function allocate(bytes memory data, uint256 assets, bytes4, address) external returns (bytes32[] memory, int256) {
    LotusPosition memory position = abi.decode(data, (LotusPosition));
    ...
    ILotus(lotus).supply(position.marketParams, position.trancheIndex, assets, 0, address(this), hex"", hex"");
    ...
}

function deallocate(bytes memory data, uint256 assets, bytes4, address) external returns (bytes32[] memory, int256) {
    LotusPosition memory position = abi.decode(data, (LotusPosition));
    ...
    ILotus(lotus).withdraw(position.marketParams, position.trancheIndex, assets, 0, address(this), address(this), hex"");
    ...
}

Last updated