What is Dyve?

Broadly, Dyve is a borrowing platform that allows Lenders to list their NFTs on the platform under certain conditions and for borrowers to borrow said listed NFTs under those conditions

A Lender can list their NFTs with these set conditions:

  1. duration: the length of time the NFT can be borrowed for (in seconds)
  2. fee: the amount to be paid to the lender for borrowing the NFT
  3. collateral: the amount to be posted to the Dyve contract as insurance in the event that the borrower does not return an eligible NFT from the same collection before the duration ends
  4. currency: the type of ERC20 token to be used (Zero address for native ETH)

The platform consists of 2 systems that are used. Which system is used is dependent on the phase of the order. The 2 phases for the order are: Before the Borrow (BtB) and After the Borrow (AtB)

Before the Borrow (BtB)

This system consists of a hybrid off-chain/on-chain system where taker orders match maker orders to execute borrow orders for NFTs.

It is a non-custodial exchange where orders require approval of the token being transferred in a trade.

Off-chain orders ("Maker orders") are EIP-712 signatures that are stored off-chain.

A borrow order consists of a bilateral exchange of the sum of the listed fee, listed collateral and protocol fee against a NFT token (e.g., ERC-721, ERC-1155).

How are orders matched?

Borrow orders exist as a combination of taker/order and bid/ask. Hence, there are four primary orders:

MakerBid — a passive order that exists off-chain where the user wishes to borrow a NFT for the total sum of collateral, fee and protocol fee while under a certain borrow duration MakerAsk — a passive order that exists off-chain where the user wishes to lend a NFT under certain conditions (ie: listed fee, listed collateral, duration, currency) TakerBid — an order that is executed on-chain that matches the MakerAsk, e.g., the taker accepts the offer from the maker and borrows the NFT for the amount of ERC20 specified (Lender fee + collateral) under the duration listed TakerAsk — an order that is executed on-chain that matches the MakerBid, e.g., the taker accepts the offer from the maker and lends the NFT for the amount of ERC20 specified (fee + collateral) under the duration offered

After the Borrow (AtB)

Once a maker order is matched with the taker order and the borrow order is executed, the appropriate funds are distributed accordingly and an order is made on-chain, thus moving it into the second phase, After the Borrow.

This system is fully on-chain where the specifications of the borrow order are stored in a mapping indexed by the order hash

The specifications of the borrow order can be found in the Order document