Lending Vaults
Lending Vaults
Lotus Lending Vaults instances of Vault V2 with an enabled LotusV2Adapter which enables lending to Lotus market tranches.
Vault V2 are feature rich and designed to be future proof, see breakdown.
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