Fungible Proposal
1. Summary
PWNSimpleLoanFungibleProposal.sol defines the Fungible Proposal type for Simple Loan and implements functions to make an on-chain proposal and accept proposals.
The Fungible Proposal is not tied to a specific collateral or credit amount. The amount of collateral and credit is specified during the proposal acceptance. Interest can be either accruing or fixed.
2. Important links
3. Contract details
PWNSimpleLoanFungibleProposal.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 Fungible Proposal contract defines one event and two errors.
Errors
Errors
Proposal
struct
Proposal
structType | Name | Comment |
---|---|---|
| Corresponding collateral category | |
|
| Address of a loan collateral |
|
| ID of a collateral. Zero if ERC-20 |
|
| Minimal amount of tokens used as a collateral |
|
| |
|
| |
|
| Address of credit asset |
|
| Amount of tokens that are offered per collateral unit with 38 decimals |
|
| Maximum credit limit of credit asset |
|
| Fixed interest amount in credit tokens. It is the minimum amount of interest which has to be paid by a borrower |
|
| Accruing interest APR with 2 decimals |
|
| Loan duration in seconds |
|
| Proposal expiration unix timestamp in seconds |
|
| Allowed acceptor address. Zero address if propsal can be accepted by any account |
|
| Proposer address |
|
| Hash of a proposer specific data, which must be provided during a loan creation |
|
| Flag to determine if a proposal is an offer or loan request |
|
| ID of a loan to be refinanced. Zero if creating a new loan. |
|
| Nonce space of the proposal |
|
| Nonce of the proposal |
|
| Loan type contract |
Last updated