- lender: the contract that could be used to borrow the funds from. For example
0x60744434d6339a6B27d73d9Eda62b6F66a0a04FAfor anyERC-3156compliant lender contract, or0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2for AAVE. - borrower (optional): who should receive the borrowed tokens. If no value is provided, the order owner’s address will be used as the borrower.
- token: the token that needs to get borrowed.
- amount: how many atoms of the token need to get borrowed (e.g., 1
WETHwould be 10¹⁸).
How a lender protocol can be compatible with CoW Protocol
If the lender supports ERC-3156 then there is no extra smart-contract work needed. If the lender protocol rely on direct repayment from the borrower throughtransferFrom, then the lender protocol could implement the borrower functions as in Aave Borrower or in ERC-3156 wrapper.