List Proposal
1. Summary
PWNSimpleLoanListProposal.sol defines the List Proposal type for Simple Loan and implements functions to make an on-chain proposal and accept proposals.
The List Proposal can define a list of acceptable collateral ids or a whole collection. Interest can be either accruing or fixed.
2. Important links
3. Contract details
PWNSimpleLoanListProposal.sol is written in Solidity version 0.8.16
Features
Provides
acceptProposal
function andmakeProposal
for on-chain proposalsDefines the
Proposal
struct
Inherited contracts, implemented Interfaces and ERCs
Functions
View Functions
Events
The PWN Simple Loan List Proposal contract defines one event and one error.
Errors
Proposal
struct
Proposal
structcollateralCategory
Corresponding collateral category
address
collateralAddress
Address of a loan collateral
bytes32
collateralIdsWhitelistMerkleRoot
Merkle tree root of a set of whitelisted collateral ids
uint256
collateralAmount
Amount of a collateral. Zero if ERC-721
bool
checkCollateralStateFingerprint
address
creditAddress
Address of credit asset
uint256
creditAmount
Amount of credit asset
uint256
availableCreditLimit
Maximum credit limit of credit asset
uint256
fixedInterestAmount
Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower
uint24
accruingInterestAPR
Accruing interest APR with 2 decimals
uint32
duration
Loan duration in seconds
uint40
expiration
Proposal expiration unix timestamp in seconds
address
allowedAcceptor
Allowed acceptor address. Zero address if propsal can be accepted by any account
address
proposer
Proposer address
bytes32
proposerSpecHash
Hash of a proposer specific data, which must be provided during a loan creation
bool
isOffer
Flag to determine if a proposal is an offer or loan request
uint256
refinancingLoanId
ID of a loan to be refinanced. Zero if creating a new loan.
uint256
nonceSpace
Nonce space of the proposal
uint256
nonce
Nonce of the proposal
address
loanContract
Loan type contract
Last updated