Obligation Receipt

The ObligationReceipt contract is used to handle rights and obligations of NFTs held in collateral by the borrower. The holder of an obligation receipt receives the underlying NFT when the loan is repaid and is able to control rights delegation; for example, to receive airdrops or gain access to token-gated events.

Methods

setDelegate()

function setDelegate(uint256 tokenId, address to, bool value)

Sets delegation rights for the underlying of a given obligation receipt tokenId to a given address.

Parameter Name
Type
Description

tokenId

uint256

tokenId of the obligation receipt which is linked to a specific loan

to

address

target address for rights delegation

value

bool

true to grant delegation rights, false to remove

View Methods

exists()

function exists(uint256 tokenId)

Checks if there exists an obligation receipt for a given tokenId.

Parameter Name
Type
Description

tokenId

uint256

tokenId of the obligation receipt which is linked to a specific loan

Returns true if the tokenId exists.

getLoan()

function getLoan(uint256 tokenId)

Retrieves loan data for a given tokenId.

Parameter Name
Type
Description

tokenId

uint256

tokenId of the obligation receipt which is linked to a specific loan

Return

Parameter Name
Type
Description

loan

DataTypes.TokenizedLoan memory

tokenized loan data consisting of the collatateral address, tokenId and loan id

ABI

Obligation Receipts ABI
Redeemable ABI

Last updated