Creating a wNFT

This page describes the process of wrapping NFT and fungible token assets using the Pawn Protocol.

wNFT Introduction

The Pawn Protocol supports ERC721, ERC1155, ERC20 assets through a "wrapper" ERC721 contract, AssetWrapper, that simply stores assets returning an NFT to the minter with an associated unique integer-based identifier.

Given Ethereum only supports uint256, the maximum number of such wNFTs is 2**256-1. See the AssetWrapper contract source here for more detail.

1. Login to the Platform

You can begin interacting with the protocol using app.arcade.xyz, which performs MetaMask address based authentication and supports the Pawn Protocol functionality.

πŸ“˜

Note on App Requirements

Ensure you have the latest version of MetaMask installed. Note, you can connect to MetaMask and the app using a hardware wallet, such as a Ledger. Ensure you have the latest firmware installed for Ledger (if connecting to MM via Ledger Live) and you are running an updated MetaMask version.


Navigate to app.arcade.xyz and click Connect Wallet.





You will be prompted to sign a zero-gas payload by MetaMask confirming your wallet address.





Upon logging in, you will be redirected to the My Wallet page, which shows you a representation of all NFTs in your wallet that Arcade supports (see Collections Supported) as well as ERC20s.





To begin the creation of a wNFTwNFT - Acronym representing a "wrapped NFT" created by minting against the AssetWrapper contract on the Pawn protocol., hover over an asset in your wallet until you see the Add as Collateral button and press it.





You should immediately see the NFT highlighted and Added as Collateral. This step simply selects the NFT for addition into a new wNFT, which you will mint as part of the Create Loan Request process. Once you've added all the collateral you intend to deposit in the wNFT, press Create Loan Request to mint the wNFT, and approve / deposit the selected collateral into it.


πŸ“˜

Depositing Multiple Collateral

Remember you can always come back and deposit more collateral into your wNFT. Once you've deposited the first asset, you also mint a new wNFT that your address then owns. Minting, wrapping, unwrapping of wNFTs are all facilitated via the AssetWrapper contract of the Pawn Protocol.





Clicking Create Loan Request will prompt you to add your NFT to the not yet minted wNFT. You can also add additional ERC20 collateral to your bundle at any point. Click "Confirm" on an NFT in the modal, MetaMask will prompt you for an approval to the AssetWrapper contract, mints the wNFT wrapping your asset.





Once the approval transaction is complete, a green check mark will appear next to your asset in the Approval modal confirming the asset is ready to be deposited into a wNFT. To save on gas, we combine the creation of a Loan Request with the creation of a wNFT.



πŸ“˜

Approvals stick between sessions

If you were to exit your session and return at a later time, you will not be prompted for an approval again on the same asset if it was already approved in the past but not deposited into a wNFT.





With an asset confirmed, you have the minimum necessary (one asset) to create a loan request using the wNFT wrapping the asset as collateral. Click Set Loan Terms to establish the terms of your loan request. Once you click Finalize on the terms, the following actions on chain actions will take place as evidenced by MetaMask prompts.

  1. Approve app.arcadexyz - You will be prompted to approve app.arcade.xyz to spend from the Asset Wrapper (an NFT instance or wNFT) on your behalf.
  2. Mint wNFT - You will pay gas to Asset Wrapper to mint a wNFT and deposit your asset(s) that you confirmed in the prior step as an atomic transaction.
  3. Sign Loan Terms - You will be prompted to make a signed payload request against Origination Controller for the terms of the loan that attests your wallet against the terms.




Once you are done with the MetaMask prompted transactions you will see a Success modal.





Navigating to My Loans, you will see your new loan request. Expanding "View Details" will allow you to view the contents of the wNFT you minted into collateral.




What’s Next