MagnifyCashV1
Git Source Inherits: IMagnifyCashV1, Ownable, Pausable, ERC721Holder, ERC1155Holder
Unique identifier for lending desks
Unique identifier for loans
Mapping to store lending desks
Mapping to store loan configs of lending desks
Mapping to store loans
The address of the ERC721 to generate obligation notes for borrowers
The address of the lending desk ownership ERC721
The basis points of fees that the borrower will pay for each loan
The address of the platform wallet
Creates a new lending desk
Emits an {NewLendingDeskInitialized} event.
Parameters
Name | Type | Description |
---|---|---|
|
| The ERC20 that will be accepted for loans in this lending desk |
|
| The initial balance of this lending desk |
|
| Loan config for each NFT collection this lending desk will support |
Creates a new lending configuration
Emits an {LendingDeskLoanConfigsSet} event.
Parameters
Name | Type | Description |
---|---|---|
|
| Identifier for the lending desk |
|
| Loan config for each NFT collection this lending desk will support |
Removes a new lending configuration
Emits an {LendingDeskLoanConfigsSet} event.
Parameters
Name | Type | Description |
---|---|---|
|
| Identifier for the lending desk |
|
| Address for the NFT collection to remove supported config for |
This function is called to add liquidity to a lending desk
Emits an {LendingDeskLiquidityDeposited} event.
Parameters
Name | Type | Description |
---|---|---|
|
| The id of the lending desk |
|
| The balance to be transferred |
This function is called to cash out a lending desk
Emits an {LendingDeskLiquidityWithdrawn} event.
Parameters
Name | Type | Description |
---|---|---|
|
| The id of the lending desk to be cashout |
|
| Amount to withdraw from the lending desk |
This function can be called by the lending desk owner in order to freeze it
Emits an {LendingDeskStateSet} event.
Parameters
Name | Type | Description |
---|---|---|
|
| ID of the lending desk to be frozen |
|
| Whether to freeze or unfreeze |
This function can be called by a borrower to create a loan
Emits an {NewLoanInitialized} event
Parameters
Name | Type | Description |
---|---|---|
|
| ID of the lending desk related to this offer |
|
| The NFT collection address to be used as collateral |
|
| ID of the NFT to be used as collateral |
|
| Loan duration in hours |
|
| Amount to ask on this loan in ERC20 |
|
|
This function can be called by anyone to get the remaining due amount of a loan
Parameters
Name | Type | Description |
---|---|---|
|
| ID of the loan |
This function can be called by the obligation note holder to pay a loan and get the collateral back
Emits an {LoanPaymentMade} event.
Parameters
Name | Type | Description |
---|---|---|
|
| ID of the loan |
|
| The amount to be paid, in erc20 tokens |
|
| Whether to resolve the loan or not. If true, _amount is ignored. |
This function is called by the lending desk key owner in order to liquidate a loan and claim the NFT collateral
Emits an {LiquidatedOverdueLoan} event.
Parameters
Name | Type | Description |
---|---|---|
|
| ID of the loan |
Allows the admin of the contract to modify loan origination fee.
Emits an {LoanOriginationFeeSet} event.
Parameters
Name | Type | Description |
---|---|---|
|
| Basis points fee the borrower will have to pay to the platform when borrowing loan |
Allows the admin of the contract to set the platform wallet where platform fees will be sent to
Emits an {PlatformWalletSet} event.
Parameters
Name | Type | Description |
---|---|---|
|
| Wallet where platform fees will be sent to |
Allows the admin of the contract to pause the contract as an emergency response.
Emits either a {Paused} or {Unpaused} event.
Parameters
Name | Type | Description |
---|---|---|
|
| Whether to pause or unpause |
Event that will be emitted every time a lending desk is created
Event that will be emitted every time a lending desk config is created
Event that will be emitted every time a lending desk config is removed
Event that will be emitted every time liquidity is added to a lending desk
Event that will be emitted every time there is a cash out on a lending desk
Event that will be emitted every time a lending desk is frozen// unfrozen
Event that will be emitted every time a new offer is accepted
Event that will be emitted every time a borrower pays back a loan
Event that will be emitted every time a loan is liquidated when the obligation note holder did not pay it back in time
Event that will be when the contract is deployed
Event that will be emitted every time an admin updates loan origination fee
Event that will be emitted every time an admin updates the platform wallet
Last updated