IMagnifyCashV1
Git Source
Last updated
Git Source
Last updated
Creates a new lending desk
Emits an {NewLendingDeskInitialized} event.
Parameters
Name | Type | Description |
---|---|---|
Creates a new lending configuration
Emits an {LendingDeskLoanConfigsSet} event.
Parameters
Name | Type | Description |
---|---|---|
Removes a new lending configuration
Emits an {LendingDeskLoanConfigsSet} event.
Parameters
This function is called to add liquidity to a lending desk
Emits an {LendingDeskLiquidityDeposited} event.
Parameters
This function is called to cash out a lending desk
Emits an {LendingDeskLiquidityWithdrawn} event.
Parameters
This function can be called by the lending desk owner in order to freeze it
Emits an {LendingDeskStateSet} event.
Parameters
This function can be called by a borrower to create a loan
Emits an {NewLoanInitialized} event
Parameters
This function can be called by anyone to get the remaining due amount of a loan
Parameters
This function can be called by the obligation note holder to pay a loan and get the collateral back
Emits an {LoanPaymentMade} event.
Parameters
This function is called by the desk owner in order to liquidate a loan and claim the NFT collateral
Emits an {LiquidatedOverdueLoan} event.
Parameters
Allows the admin of the contract to modify loan origination fee.
Emits an {LoanOriginationFeeSet} event.
Parameters
Allows the admin of the contract to set the platform wallet where platform fees will be sent to
Emits an {PlatformWalletSet} event.
Parameters
Allows the admin of the contract to pause the contract as an emergency response.
Emits either a {Paused} or {Unpaused} event.
Parameters
Struct used to store loans
Struct used to store loan config set by the shop owner for an NFT collection
Struct used to store lending desks on this contract
LendingDeskStatus used to store lending desk status
Active Default status when a lending desk is created
Frozen Used when a lender pauses or 'freezes' their desk
LoanStatus used to store loan status
Active Default status when a loan is issued
Resolved Used when a loan is fully paid back by borrower
Defaulted Used when a loan is liquidated by lender
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_erc20
address
The ERC20 that will be accepted for loans in this lending desk
_depositAmount
uint256
The initial balance of this lending desk
_loanConfigs
LoanConfig[]
Loan config for each NFT collection this lending desk will support
_lendingDeskId
uint256
Identifier for the lending desk
_loanConfigs
LoanConfig[]
Loan config for each NFT collection this lending desk will support
_lendingDeskId
uint256
Identifier for the lending desk
_nftCollection
address
Address for the NFT collection to remove supported config for
_lendingDeskId
uint256
The id of the lending desk
_amount
uint256
The balance to be transferred
_lendingDeskId
uint256
The id of the lending desk to be cashout
_amount
uint256
Amount to withdraw from the lending desk
_lendingDeskId
uint256
ID of the lending desk to be frozen
_freezed
bool
Whether to freeze or unfreeze
_lendingDeskId
uint64
ID of the lending desk related to this offer
_nftCollection
address
The NFT collection address to be used as collateral
_nftId
uint64
ID of the NFT to be used as collateral
_duration
uint32
Loan duration in hours
_amount
uint256
Amount to ask on this loan in ERC20
_maxInterestAllowed
uint32
_loanId
uint256
ID of the loan
_loanId
uint256
ID of the loan
_amount
uint256
The amount to be paid, in erc20 tokens
_resolve
bool
Whether to resolve the loan or not. If true, _amount is ignored.
_loanId
uint256
ID of the loan
_loanOriginationFee
uint256
Basis points fee the borrower will have to pay to the platform when borrowing loan
_platformWallet
address
Wallet where platform fees will be sent to
_paused
bool
Whether to pause or unpause