Simple Request
1. Summary
PWNSimpleLoanSimpleRequest.sol defines Simple Request for the Simple Loan type.
2. Important links
3. Contract details
PWNSimpleLoanSimpleRequest.sol is written in Solidity version 0.8.16
Features
Make Simple Request
Create Simple Loan terms from Simple Request
Provides a function to encode Simple Request
Inherited contracts, implemented Interfaces and ERCs
Functions
View Functions
Events
The PWN Simple Loan Simple Request contract inherits events from the Simple Loan Request contract and does not define any additional custom events or errors.
Simple Request Struct
Type | Name | Comment |
---|---|---|
|
| 0 -> ERC-20 1 -> ERC-721 2 -> ERC-1155 |
|
| Address of an asset used as a collateral. |
|
| Token id of an asset used as a collateral, in case of ERC20 should be 0. |
|
| Amount of tokens used as a collateral, in case of ERC721 should be 0. |
|
| Address of an loaned asset. |
|
| Amount of tokens which is requested as a loan. |
|
| Amount of tokens which act as a lenders loan interest. Borrower has to pay back a borrowed amount + yield. |
|
| Loan duration in seconds. |
|
| Request expiration unix timestamp in seconds. |
|
| Address of a borrower. This address has to sign a request for it to be valid. |
|
| Address of a lender. Only this address can accept a request. If the address is zero address, anybody with a loan asset can accept the request. |
|
| Additional value to enable identical requests in time. Without it, it would be impossible to make a request, which was once revoked. Nonce can be used to create a group of requests, where accepting one request will make other requests in the group invalid. |
Last updated