You can generate loan offer signatures from a smart contract instead of a wallet.
Here is a simple how-to:
-
Write your own smart contract and implement the signature validation method of EIP-1271:
- isValidSignature(bytes32 hash,bytes memory _signature) public view override returns (bytes4)
-
Implement the following methods in your smart contract
// Approve for the x2y2 lending contract
- approveERC20
- approveERC721
- approveAllERC721
// Withdraw assets
- withdrawETH
- withdrawERC20
- withdrawERC721
- withdrawERC1155
- When making calls to the Make new offer endpoint, set your contract address as lender.