Lendable NFTs — The Owned by 0xG peeks into the future

Chef Bud
4 min readApr 10, 2022

--

Screenshot of the three tokens of The Owned

I had the privilege of reviewing the smart contracts of 0xG’s latest NFT collection The Owned before its release. It is a very interesting collection that rather than having the goal of profit it offers an exploration into what NFTs really are and some of the possibilities that exist with them. I previously explored how NFT’s don’t always act the way that one would expect in my previous article, and 0xG takes us further down the road of interesting possibilities.

Mechanics

For 7 days, 0xG has offered that via his web app, qualified accounts (accounts that hold ASH) can borrow the second token of this collection (aptly titled Borrowed) for a duration of 10 minutes. It is a no-cost transaction and users must only pay for gas. Once this transaction is complete users will be able to see the transfer on Etherscan showing the token being transferred first back to the token owners’ wallet and then to their own

The token transfers as seen on Etherscan from one of the many “Borrow” method calls

Also, the token will be present in the OpenSea collection of the borrower and OpenSea will declare their ownership. In fact, any app that checks for ownership of an NFT will assign it to the borrower.

Users who borrow the The Owned however will find that they are not able to sell or transfer this NFT.

Borrowed showing as owned by me after I borrowed for 10 minutes

Response

The response to this collection has been really interesting to watch. In under four days there have been 215 borrows resulting in 430 transfers, all of the same token. This NFT is certainly moving more than most. The token has been borrowed by 183 unique addresses and some addresses have borrowed more than once (1 address borrowed 13 times!)

Lending of NFTs

To understand how 0xG was able to achieve this we can look at the spec for ERC-721 which is the non-fungible token standard. All ERC-721 tokens must implement a ownerOf method to determine the owner of a particular token. In The Owned, this method is overwritten from the OpenZeppelin reference contract in order to achieve the lending behavior.

Custom override of the ownerOf method

Notice in the code block above that rather than pointing to the standard _owners mapping it is pointing to the _holders mapping, which is a custom storage space for this contract.

When a token is borrowed, the _holders mapping is updated while keeping the original _owners mapping in-tact. Also, in this contract in order to transfer there is a requirement that the sender of the transaction must be the ERC-721 owner (not just a holder) in order to move the token. This prevents any borrowers from running off with the NFT.

Custom hook that ensures that one is the actual owner (not just a holder) of a token before allowing a transfer

There is also another mapping in this contract called _lendingExpires which denotes when the lending period is up. When lending the token the owner may specify for how long the rental is or if there is no time guarantee at all.

Once this time is expired, the owner of the token may call claim to assign themselves back as the holder.

Implications and Future Work

The Owned is a clever collection showing how lending of NFTs might be done. There are many use-cases that one could imagine for NFTs that are lent for a time-period:

  • Monthly memberships to a service
  • Rights to watch a film over the next three days
  • Rights to a piece of art for a year
  • Trustless lending of an NFT to a friends without having to reveal your keys or worry about them transferring it

And building on top of the work that 0xG has done, one could even make a contract where someone who has been lent the NFT has the ability to lend to another user within the duration of their period.

Conclusion

The Owned is another NFT collection that demonstrates that NFTs are more than just images on the blockchain and through utilizing the immense flexibility afforded by the underlying smart contracts can have some really interesting features and applications.

It is almost certain that in the future there will be many NFTs that follow the lending/renting pattern as there is obvious utility in the possible applications of this feature.

--

--