Links

NiftyApes: Harberger Style Lending Auctions

V1.0.0, Last updated Aug 18, 2022
Authors Kevin Seagraves, Zach Herring

Abstract

NiftyApes is a decentralized protocol that enables loans on any NFT or collection with terms that continually trend toward true market valuation. It enables on-demand liquidity, purchase financing, and 1-click yield on assets represented by NFTs. We believe this structure will create a more accessible and value-optimal debt market.

1.0 Introduction

NFTs at their base are a certificate of ownership that can represent nearly anything. In the future we will likely see NFTs represent ownership of digital art, video game items, rights to music, cars, residential real estate, commercial real estate, and corporate assets among other things. The current and nascent NFT market has exploded over the last year with some sales volume estimates reaching $41 billion[1] in 2021. However, the vast majority of that value remains illiquid and under-utilized. Some attempts have been made to open the market but difficulty with asset valuation, spot and floor price manipulation, liquidation risk, fragmented liquidity, high friction, high effort, and high latency have kept the NFT collateralized lending market from breaking out.
There are three major mechanisms for unlocking liquidity for NFTs. The mechanisms and the major issues with each are:

1.1 Peer to Peer

In Peer to Peer lending, smart contracts facilitate trustless party-to-counterparty transactions, acting as the intermediary between both as an escrow service. The NFT and liquidity is held in the smart contracts as terms are negotiated and the loan is active. Once the loan is repaid, the liquidity is returned to the lender as the borrower receives their collateral. If the borrower defaults, the collateral is released to the lender.[2]

The drawbacks of Peer to Peer Lending

  1. 1.
    Lending liquidity is unused while in escrow, waiting to execute loans.
  2. 2.
    Loan offers can only occur against individual assets that are already in escrow.
  3. 3.
    There is high friction, effort, and latency for loan origination.
    1. 1.
      The Borrower must first lock their asset in escrow as collateral and then make an ask.
    2. 2.
      Lenders must then be present in the marketplace and discover the opportunity on an asset that they are knowledgeable about, with terms that are within their risk tolerance.
    3. 3.
      Once executed, loan terms are locked for the life of the loan and in order to extend, refinance, or take out another loan the borrower must repay and restart the whole origination process.

1.2 Peer to Pool

In the Peer to Pool model, liquidity is deposited into a smart contract to be available on-demand for the NFT assets. Because every NFT is unique, Peer-to-Pool models base valuations on the lowest priced asset in the associated collection. This is commonly known as “Floor Terms” and is determined via an Oracle. Terms are calculated based on the collection Floor and offered to Borrowers on-demand. Loan terms can be rolling, with an LTV ratio to maintain by the borrower (similar to fungible borrowing on protocols such as Compound or Aave), or with set-terms (Duration, APR) similar to the Peer-to-Peer model.

The drawbacks of the Peer to Pool model

  1. 1.
    Liquidity added to a pool for a single collection can not be utilized in another pool for another collection, leading to high fragmentation and underutilization.
  2. 2.
    On-demand capital waiting for utilization in the liquidity pool is not actively seeking profit. Active APRs are low to facilitate ongoing lending and collateralization ratio. Pool APRs are the average of the APR of time the capital is in active utilization and time it is not in use.
  3. 3.
    Some protocols require a DAO vote to change lending terms which is slow and high friction.
  4. 4.
    Protocols are reliant on price oracles for core utility:
    1. 1.
      Pricing oracles are limited in scope, susceptible to manipulation, and can have a high degree of error depending on the implementation.
    2. 2.
      Furthermore, due to market volatility, they can leave borrowers susceptible to manipulated automatic liquidation.
  5. 5.
    On many protocols a borrower can only receive a fraction of the floor price of their NFTs, leaving much of the value of unique, high-value assets in the NFT market underutilized.

1.3 Floor Perpetuals

Floor perpetuals are a concept laid out by Dave White in a paper published by Paradigm[3]. At the time of publication, proof-of-concepts have been created, but they still remain in beta, and so how Floor Perpetuals would play out at-scale remains somewhat hypothetical. Below we’ve listed potential drawbacks to the model, but recognize that these may evolve as more Floor Perpetuals are implemented and real-world dynamics emerge.
  1. 1.
    Protocols are reliant on price oracles which are limited in scope, susceptible to manipulation, and have a high degree of error.
  2. 2.
    If the collection appreciates and the floor price rises, the borrower runs the risk of liquidation and losing their collateral.
  3. 3.
    Perpetuals service collection floors and uniquely valuable NFTs in the collection do not benefit from unique pricing.
  4. 4.
    Perpetuals are a high effort, speculative instrument with a complicated user experience.
    1. 1.
      While perpetuals do provide liquidity if both parties accept the degree of error in an index oracle, they are not loans and provide an unfamiliar experience to many users.
In this paper, we introduce Harberger-style lending auctions for perpetually true market value loans, non-fallow, non-fragmented lending capital, standing loan offers on floor terms and individual assets, and lender-based refinancing.

2.0 Harberger Style Lending Auctions & The NiftyApes Protocol

Traditional debt markets prioritize capital efficiency (returns for capital holders) while mostly forgoing allocative efficiency (returns to the lender with the highest desire for returns and borrower exposure to better terms). This leads to a high amount of value capture for loan originators. Existing loans do not benefit from market competition as underlying assets appreciate. Prospective lenders that are willing to offer better terms are locked out of these existing loans and the underlying collateral. Borrowers who might want to refinance experience a high degree of friction for exposure, if refinancing is even allowed by the loan originator at all.
Harberger taxation is a system in which private goods are continuously on auction (meaning anyone can purchase the right to utilize an item at any time). The current “owner” sets the price and cannot refuse an offer to purchase if their price is met. A tax is then paid on the set price of sale. This creates an incentive to set an optimal, true value sell price. If one sets the price high then they will maintain the right to use the good. However, the tax will be higher too. Set the sell-price low and the tax won’t be as much, but there is a higher likelihood of the asset being purchased from the “owner” and another actor takes over the right to utilize the asset.[4]
The NiftyApes protocol is an NFT collateralized lending protocol that establishes a system for more allocative and capital efficient loans on NFTs by applying the Harberger tax concept to lending. Instead of private goods that are always for-sale, NiftyApes facilitates a continuous auction for the right to the interest earned on each loan. Always-on auctions drive value to the borrower by ensuring lenders compete to provide the best terms to the borrower throughout the life of the loan.
If the lender sets the terms of the loan below-market, other lenders will refinance the loan at better terms. Set the terms too high above-market, and the lender might lose money by over-valuing the asset.
As the value in the loan-to-value ratio (LTV) increases, lenders compete to offer better terms to have the right tointerest payments and exposure to the underlying collateral. If the value of the NFT goes down, the terms of the borrower’s loan are not likely to improve but they cannot become worse.

How it works

Lenders deposit funds and passively earn interest while providing on-chain or signature-based loan offers on collection floor terms and individual assets. Borrowers can access instant liquidity through standing loan offers. Upon execution, a borrower’s NFT is entered into escrow and liquidity from the lender is added to their account. As the loan-to-value (LTV) ratio of a loan improves, lenders have the opportunity to offer better terms to the borrower and buy out the loan from the current lender.
This creates an environment in which all actors are incentivized to maintain a true market valuation and terms for a given NFT-based loan.

2.1 Interest Bearing Liquidity

In the NiftyApes protocol, lenders initiate escrow by depositing funds and then making standing offers on loans. These funds are deposited into Compound and continue earning the lender industry-standard yield while waiting for active loans to be executed. This reduces the opportunity cost for lenders making loan offers on NiftyApes.

2.1.1 Deposit Liquidity

Unlike other P2P lending protocols, NiftyApes requires lenders to deposit funds into the protocol as the initial asset in escrow by either party. These funds are supplied to Compound to earn additional interest prior to loan execution and never sit fallow.
Lenders can deposit native ETH, a number of stable ERC20 tokens, or the cToken of any of these assets. The protocol may support many other assets in the future.

2.1.2 Withdraw Liquidity

A lender can withdraw their available balance at any time. This includes all value not in an active loan. Withdrawals can be done in the underlying asset or the cToken of that asset.

2.2 Lending Auctions

2.2.1 Offer Book

An offer book is the list of offers available for a loan on an NFT collection or individual token. It is an offer book, and not an order book, because only one offer can be executed synchronously at a time. There is no true offer depth as a borrower can select any order from the offer book at any time - and the borrower can switch between offers at any time.
The NiftyApes protocol is strictly unopinionated and does not have a conception of what a “Top Offer” is in the offer book. This is because the Offer parameters can be drastically different and it is up to the borrower to assess their needs.
Once a loan is initiated, the protocol can determine a “Top Offer” by evaluating the current loan terms and assessing which offers, if any, have better terms.
NiftyApes provides two offer books. A centralized signature-based offer book and a decentralized on-chain offer book.
The signature-based offer book is managed by the NiftyApes core team and is served via the NiftyApes API and frontend interface. NiftyApes core believes this centralized offer book is necessary due to high gas costs on Ethereum Mainnet.
The decentralized on-chain offer book is a fully open, decentralized, trustless, permissionless, protocol that is fully accessible to any user anywhere in the world. This decentralized offer book costs gas in order to place and remove offers but it enables completely programmatic execution of loans. An algorithmic trading system could develop a lending strategy on a collection or set of assets and offer loans programmatically.

2.2.2 Offers

As long as there is a contract address and NFT id (or future NFT id) a loan can be offered to any asset in existence at any time. Offers can be made in the signature-based offer book via the NiftyApes API or NiftyApes frontend interface, or in the on-chain offer book via direct interaction with the NiftyApes protocol. This data set can provide a true market value signal for assets during their entire life cycle, even before they are even minted.
Offers consist of the following terms:
  1. 1.
    Amount
    1. 1.
      Amount of underlying asset
  2. 2.
    Asset
    1. 1.
      Type of asset
  3. 3.
    Interest rate
    1. 1.
      Interest rate is offered as a cumulative value over the duration of the loan, but is accumulated in wei per second and can be repaid pro-rata by the borrower at any time.
  4. 4.
    Duration
    1. 1.
      Denominated in seconds
  5. 5.
    Fixed terms
    1. 1.
      Fixed terms indicates whether this loan is a lending auction and can be refinanced or a fixed term traditional style loan
  6. 6.
    Floor term
    1. 1.
      Floor term indicates whether this offer applies to all NFTs in a collection or to an individual NFT
Floor Term Offers
Floor term offers allow lenders to make an offer for floor terms on an entire collection. For example, with one action a lender can make an offer of 50,000 DAI at 5% interest for 90 days to all 10,000 Bored Apes in the Bored Apes Yacht Club.
The number of times a floor offer can be executed against corresponds with the amount of liquidity the lender has locked in the NiftyApes protocol. For example, if the lender has 500,000 DAI locked in NiftyApes, they can facilitate 10 loans in the Bored Apes Yacht Club collection.
Individual NFT Term Offers
Individual NFT term offers allow lenders to make an offer for an individual NFT. For example, a lender offers 70,000 DAI at 4% interest for 180 days for Bored Ape #4269.
Borrowers also have the ability to make offers on individual assets they own and request loans.
Canceling Loan Offers
Floor term offers and individual NFT term offers can be removed from the on-chain offer book via a transaction. Signature-based offers are also canceled via an on-chain transaction. This is to ensure that the signature can never be used via the protocol. A signature-based offer could simply be deleted in the centralized data base, but if a copy of the signature were saved anywhere else it could still be used on chain.

2.2.3 Loan Execution

Loan execution occurs when a user supplies an offer from the signature-based offer book or an offer from the on-chain offer book and the lender has sufficient liquidity to fill the loan. The NFT is locked into escrow in the NiftyApes contract and funds are moved from the lender’s balance to the borrower’s wallet.
Loan Execution By Borrower
Borrowers can accept any offer from either on-chain or signature-based offer books.
Loan Execution By Lender
Lenders can accept an offer by the borrower in either on-chain or signature-based offer books.

2.2.4 Refinancing

A loan can be refinanced by any party at any time. This encourages the terms of the loan to trend toward true market valuation as the LTV of the loan improves.
Lenders compete for loans with better LTVs and borrowers experience automatic refinancing with better terms over the life of their loan. This results in a more equitable and value optimal debt market.
Refinancing by Borrower
Borrowers can accept any offer in the order book and refinance at any time as long as the new offer amount is equal to or greater than the remaining principal plus interest earned by the lender and protocol so far. All remaining payments and interest will accrue to the new lender.
Refinancing by Lender
A lender can refinance a loan at any time as long as the terms of the offer are at parity plus “1” of the current loan, and as long the lender has a sufficient balance to fill the loan amount. New lenders will need to provide the remaining principal, interest earned to far, and a premium to buy out the loan. Current lenders do not need to pay origination premiums or supply additional capital. All remaining payments and interest will accrue to the new lender.

2.3 Refinancing Premiums

Four premiums have been implemented in the protocol's refinancing flow to drive value to borrowers and create a positive-sum game for lenders.
The majority of these premiums are paid to lenders when their offers are being refinanced on NiftyApes. The premiums implemented in the protocol are upgradable and, in the future, will be set according to community governance.

2.3.1 Loan Origination Premium

The first time a loan is refinanced, an origination premium of 00.50% (or 50 Basis Points) of the Principal amount loaned is paid by the Refinancer to the Loan Originator.
This is to compensate the Loan Originator for the initial work of pricing the asset and providing on-demand capital to borrowers.
Example Origination Premium
A loan is originated at:
100Ξ for 10,000 seconds at 10% interest rate
00.50Ξ origination fee

2.3.2 Term Premium

Lenders can refinance any loan at any time if they provide terms at parity plus 1. Offers with improvements of as little as plus 1 second duration, plus 1 WEI principal, or minus 1 WEI interestRatePerSecond will result in a successful refinance. However, the protocol compares the refinance terms with the current loan to see if there is a combined improvement of plus 00.25% (25 basis points) in aggregate between the Principle, Duration, and Interest terms.
If the refinance offer fails this check, a flat premium equal to 25 basis points of the Principal is paid by the Refinancer to the Protocol treasury as a Term Premium.
Example Refinance
Current Loan
Refinance Offer
%% Change
100 Eth
100.10 ETH
+00.10%
10,000 Seconds
10,010 Seconds
+00.10%
10% Interest
9.96% Interest
+00.04%
Net Improvement: +00.24%
Term Premium: 00.25% of Principal

2.3.4 Interest Premium

Lenders are guaranteed a minimum of 00.25% interest accrued per loan.
When a refinance offer is made, the protocol checks the amount of interest earned by the Current Lender. The delta between the amount earned and the 00.25% minimum must be paid to the Current Lender by the Refinancer in order to assume control of the loan.
Once the Refinance has occurred, the Interest Premium countdown is reset for the new Lender.
This creates a Dutch Auction across all active loans for refinancing. As more interest accumulates, the Interest Premium declines closer and closer to 0. Refinancers must weigh the declining Interest Premium with the competition to refinance.
Example Interest Premium
Current Loan
100Ξ for 10,000 seconds at 10% interest rate
Interest Premium
0.25Ξ at second 0
Interest Earned
0.001Ξ interest charged per second
Interest Premium
At second 0, the interest premium is 00.25Ξ
At second 100 the interest premium is ~00.15Ξ
At second 250, the interest premium is 00.00​Ξ

2.3.5 Default Premium

Since a lender can refinance any loan at any time, as a loan goes to default each individual lender has an incentive of the true market value (tmv), minus the principal (p) of the loan, minus interest earned by the lender (lie) and protocol (pie), minus the 00.25% default premium (prem), minus gas costs (gas).
We anticipate a bottom-of-the-stack MEV auction to be the last lender in the last block of the active loan in order to gain this default profit incentive. Since this is a greedy action the protocol will charge a 00.25% default premium.
If a lender participates in the MEV auction but fails to be the last lender they will be refinanced and have a max cost of the default premium + gas.
Example Profit Incentive
Asset tmv = 200Ξ
p = 100Ξ
lie = 9.9999Ξ
pie = 0.25Ξ
prem = 0.25Ξ
gas = 0.0025Ξ
Profit Incentive = 200Ξ - 100Ξ - 9.9999Ξ - 0.25Ξ - 0.25Ξ - 0.0025Ξ = 89.4976Ξ
This creates a strong incentive for lenders to be the last lender in a defaulting loan with a tmv that is greater than the repayment cost.

2.4 Improved Term Drawdown & Liquidity Slashing

As loans are refinanced, a borrower may have access to more liquidity than was originally available when the loan was initiated. The NiftyApes smart contract does not automatically enforce draw down of more capital because it would force a higher interest payment to be made by the borrower. However, a borrower may choose to draw down more value from the loan if desired.
If a borrower attempts to draw down additional capital but the refinancing lender has not maintained sufficient liquidity to serve their refinancing offer, the remaining available balance of the lender will be added to the amount drawn on the loan and the current interest earned on the loan (the lender's profit) will be slashed. Lenders can only be slashed if the last action taken on the loan is a lender refinance, they can only be slashed once on a given set of terms, and they will begin to accrue interest again after being slashed. This incentivizes the lender to maintain sufficient liquidity on the protocol to serve their refinanced loan offers while also allowing the lender to utilize their liquidity across many loans, i.e. creating more offers than total liquidity they have deposited in the protocol. Rather than enforcing strict fractional reserve requirements, the protocol incentivizes lenders to maintain reasonable liquidity reserves for refinanced loans in order to not be slashed.
A borrower may also experience a better interest rate or longer duration on their loan after refinancing. A lower interest rate is in the clear best interest of the borrower to automatically accept and update. Likewise, a longer duration does not enforce a higher interest payment. The interest rate per second does not change and the borrower would pay more interest if they utilize the additional time, but if they repay their loan at the original loan duration they would pay no additional interest.

2.5 Loan Payback

Loans accrue interest per second. The equation is:
Interest rate per second = (Amount * Interest Rate) / Duration in seconds
Payments can be made at any time during the lifespan of the loan with payments first paid toward principal and then applied to interest.

2.3.1 Repayments

Full Repayment
Loans can be repaid in full at any time during the loan with no penalty. Upon full repayment borrowers receive their NFT from escrow and regain full ownership.
Partial Repayment
Loans can be partially repaid at any time with further interest accumulation adjusted to the new amount borrowed.

2.6 Asset Seizure

Assets can be seized by a lender as soon as the loan duration ends and the loan has not been paid back in full.

2.7 NFT Ownership

Borrowers, utilizing traditional 30-year mortgages, live in the houses that also serve as collateral for the mortgage. Similarly, it is important that borrowers, while using NFTs as collateral, should retain access to the communities, benefits, and underlying provenance those NFTs provide.
Any platform or protocol can query the owner of an NFT with a lien at any time. If an NFT owner is queried on a ERC721 contract and the address of the NiftyApes contract is returned, an ownerOf query can be made to the NiftyApes contract to identify the owner.
As an example: In the future, the NiftyApes protocol could be integrated with NFT marketplaces, enabling a Buy-Now, Pay-Later feature. Borrowers could combine funds in their wallet with liquidity on NFT collateral to enable purchase financing. The ownerOf function will return the borrower as the owner of the NFT, even as the NFT is held in escrow until the full repayment is made.

3.0 Implementation & Architecture

NiftyApes is a ledger of agreements between Ethereum accounts that allows for peer to peer style lending with incentive alignment for true market term valuations.

3.1 Contracts

NiftyApes is a system of smart contracts that enables borrowing and lending with NFTs as collateral with permissionless refinancing. These contracts are Liquidity.sol, Offers.sol, Lending.sol, and SigLending.sol. Together they enable Harberger Style Lending Auctions.

Offer struct

struct Offer { // offer creator address creator; // offer loan duration uint32 duration;

// the expiration timestamp of the offer in a unix timestamp in seconds uint32 expiration;
// is loan offer fixed terms or open for auction bool fixedTerms;
// is offer for single NFT or for every NFT in a collection bool floorTerm;
// whether or not this offer was made by a lender or a borrower bool lenderOffer;
// offer NFT contract address address nftContractAddress;
// offer NFT ID uint256 nftId; // ignored if floorTerm is true
// offer asset type address asset;
// offer loan amount uint128 amount;
// offer interest rate per second. (Amount * InterestRate) / MAX-BPS / Duration uint96 interestRatePerSecond;
}
LoanAuction Struct
struct LoanAuction { // The original owner of the nft. address nftOwner;
// end timestamp of loan uint32 loanEndTimestamp;
// Last timestamp this loan was updated uint32 lastUpdatedTimestamp;
// Whether or not the loan can be refinanced bool fixedTerms;
// The current lender of a loan address lender;
// interest rate of loan in basis points uint96 interestRatePerSecond;
// the asset in which the loan has been denominated address asset;
// beginning timestamp of loan uint32 loanBeginTimestamp;
// refinanceByLender was last action, enables slashing bool lenderRefi;
// cumulative interest of varying rates paid by new lenders to buy out the loan auction uint128 accumulatedLenderInterest;
// cumulative interest of varying rates accrued by the protocol. uint128 accumulatedPaidProtocolInterest;
// The maximum amount of tokens that can be drawn from this loan uint128 amount;
// amount withdrawn by the nftOwner. This is the amount they will pay interest on, with this value as minimum uint128 amountDrawn;
// This fee is the rate of interest per second for the protocol uint96 protocolInterestRatePerSecond;
// the accumulated by the current lender that is eligible for slashing uint128 slashableLenderInterest;
// cumulative unpaid protocol interest. Accrues per lender period of interest.
uint128 unpaidProtocolInterest; }
Function Interface
Liquidity.sol
getCAsset(asset)
getCAssetBalance(account, cAsset)
supplyErc20(asset, amount)
supplyCErc20(cAsset, amount)
withdrawErc20(asset, amount)
withdrawCErc20(cAsset, amount)
supplyEth()
withdrawEth(amount)
assetAmountToCAssetAmount(asset, amount)
cAssetAmountToAssetAmount(cAsset, amount)
Offers.sol
getOfferHash(offer)
getOfferSigner(offer, signature) getOfferSignatureStatus(signature) withdrawOfferSignature(offer, signature) getOffer(nftContractAddress, nftId, offerHash, floorTerm) createOffer(offer) removeOffer(nftContractAddress, nftId, offerHash, floorTerm)
Lending.sol
getLoanAuction(nftContractAddress, nftId)
executeLoanByBorrower(nftContractAddress, nftId, offerHash, floorTerm)
executeLoanByLender(nftContractAddress, nftId, offerHash, floorTerm)
refinanceByBorrower(nftContractAddress, nftId, floorTerm, offerHash, expectedLastUpdatedTimestamp)
refinanceByLender(offer, expectedLastUpdatedTimestamp)
drawLoanAmount( nftContractAddress, nftId, drawAmount)
repayLoan(nftContractAddress, nftId)
repayLoanForAccount(nftContractAddress, nftId, expectedLoanBeginTimestamp)
partialRepayLoan(nftContractAddress, nftId, amount)
seizeAsset(nftContractAddress, nftId)
ownerOf(nftContractAddress, nftId)
calculateInterestAccrued(nftContractAddress, nftId)
calculateInterestPerSecond(amount, interestBps, duration)
checkSufficientInterestAccumulated(nftContractAddress, nftId)
checkSufficientTerms(nftContractAddress, nftId, amount, interestRatePerSecond, duration)
SigLending.sol

3.2 Market Dynamics

Offer dynamics
Offers can be placed as floor terms for an entire collection or terms for an individual NFT. Offers can be made on-chain using the createOffer() function or off-chain via a EIP712 compliant signature of the offer. The off-chain offerbook will hold offers from both on chain and off-chain offer books. The on-chain offer book will only have offers made on chain. The offer book queried will depend on how the user is accessing and interacting with the protocol.
Offers can be placed into the offer book at any time with nearly arbitrary terms. Potential lenders have the incentive to offer their true market valuation terms of the loan because they may have to serve the loan at any time. Offering a higher collateralization ratio or other higher risk terms is not a rational action. Given sufficient offer volume, this drives the terms of the loan toward true market valuation prior to loan execution.
Refinance dynamics
Borrowers can refinance their loan at any time with any loan in the offerbook that can cover the cost of their current loan (remainingPrincipal + interestAccrued + relevantPremiums).
Lenders can refinance any loan at any time if they provide terms at parity plus 1 with the current terms and pay relevant premiums. Parity plus 1 means that all terms are at least equal to current terms and one term (amount, interest rate, or duration) is better than the current terms.
A lender has the incentive of the potential interest earned for the time they provide capital and maintain the top offer position with the loan minus gas fees. Lenders are guaranteed to make at least 25 basis points in interest or via the Interest Premium.
Lenders can also refinance loans they currently have the top offer on in order to maintain control of the loan and interest earnings.
Refinancing prior to default is an additional game. As a loan moves toward default each lender has an incentive of:
Incentive = trueMarketValueOfAsset - principal - interestEarnedSoFar - premiumsCost - gasFees
Even if a loan is 90% collateralized this leaves a 10% gain to potentially be made inside of a single block. If coupled with a flash loan a lender only needs to have the gas and Default Premium expense on hand. This MEV auction could occur on the final block of an asset before it heads into default. Multiple lenders could compete to have the last refinance transaction take place in the last block where the loan is active.
The dynamics of this MEV auction could provide numerous benefits to borrowers, lenders, protocol and ecosystem.
For borrowers, escalating competition in the final moments before a loan expires could provide opportunities to refinance, avoid default, or bring the total amount drawn down closer to fair-market valuation. Borrowers could deploy MEV bots of their own to maximize the benefits of escalating lending competition.
To lenders, the benefits of seizing an asset with a lower LTV far outweigh any potential cost to the lenders, with each failed refinance bid being repaid by the next bidder in the block.The only cost paid by a refinanced auction participant would be the Default Premium and Gas.
The ecosystem benefits from additional pricing data, with MEV dynamics functioning as a hyper competitive auction for the asset used as collateral, providing pricing data up-to-the-point of true-market value from multiple motivated buyers.
The protocol benefits from more accurate pricing data described above. Additionally, the Default Premium could provide many multiples of the total interest earned contributed to the protocol treasury.
In the future, if incentives are aligned via protocol governance a block producer may act to perfectly organize each refinance offer to execute and accumulate value via Default Premiums to the protocol.

4.0 Summary

In conclusion, NFTs as an asset class introduce a unique challenge for lenders looking to provide liquidity to NFT owners. Models, up until this point, have created a high degree of liquidity fragmentation and relied on either peer-to-peer market-making or manipulatable floor-price oracles.
The NiftyApes protocol introduces a novel open-offer mechanism that allows for pools of capital to express different valuation theses across the entirety of the NFT asset class. Integrations with Compound mean opportunity cost for this capital is minimal. And the Harberger Style Lending Auctions mechanism drives appraisals to real-market value by creating lender competition through the entire lifespan of the loan.
  • Harberger Style Lending Auctions (HSLA)
    • HSLAs allow lenders to compete on loan terms of any NFTs.
    • HSLAs allow borrowers to frictionlessly refinance loans on NFTs at any time in the loan’s history.
    • HSLAs allow lenders to price and place offers on loans during the lifespan of the loan, driving market competition continuously throughout the entirety of the loan.
  • Offers
    • Offers consist of amount, asset, interest rate, duration, fixed terms, and floor term.
    • Offers can be made on-chain, requiring gas or on a centralized database using signed meta-transactions.
  • Lending
    • NFTs are locked in escrow as collateral in the NiftyApes smart contracts
    • Once repaid, NFTs are returned to the borrower, or, in the event of a default, seized by the lender at the time of default.
  • Refinancing
    • Borrowers can refinance at any time for free
    • Current lenders can offer better terms to the borrower to remain market competitive penalty-free.
    • Secondary lenders can refinance the loan by offering better terms and paying a 0.50% penalty to the loan originator
    • At a future date, the protocol could introduce an additional fee, flowing to the protocol treasury

5.0 Acknowledgements

We would like to thank our mentors, advisors, friends who have provided invaluable advice on designing the NiftyApes protocol. We would especially like to thank our early advisors and contributors in no particular order: Lane Rettig, James Duncan, Ben Lakoff, VapeApe, Daniel Kurka, Alcibiades, Cyrus Younessi, William Star, Geoff Hamilton, Sean O’Connor, as well as Spencer Noon and the team at Variant, and Sean Lippel and the team at Fintech Collective. The feedback and support they have provided in designing the protocol has been invaluable, and we are incredibly grateful for their contributions.

6.0 Appendix

Last modified 24d ago