Skip to content

Safe Wallet Setup Guide

This guide walks you through setting up your Safe wallet to use NFT Loans with Safe Guard Mode. This is the recommended mode for borrowing—it offers lower interest rates because lenders have stronger security guarantees.

Prerequisites

  • A Safe wallet (formerly Gnosis Safe) on Ethereum mainnet
  • Your TDH-bearing NFTs in that Safe
  • The Safe must be part of your 6529 consolidated identity (so TDH accrues)
  • Some ETH for gas fees

Don't have a Safe? Create one at safe.global


Overview

To use Safe Guard Mode, you need to install two components on your Safe:

  1. TDH Collateral Guard - Prevents transferring locked NFTs
  2. TDH Liquidation Module - Allows liquidation on default

Both are required. The Guard protects the NFT during the loan, and the Module ensures the lender can claim it if you default.


Important Security Requirements

Before you begin, ensure your Safe meets these requirements:

1. No Other Modules

Your Safe must have only the TDH Liquidation Module enabled. If you have other modules (like a spending module or recovery module), they could potentially bypass the Guard.

Check your current modules:

  1. Go to safe.global
  2. Select your Safe
  3. Go to Settings → Modules
  4. You should see no modules, or only standard ones you're willing to remove

2. No Existing NFT Approvals

Before taking a loan, revoke any existing approvals on your NFT. Pre-existing approvals could allow transferring the NFT even with the Guard installed.

Check approvals:

  1. Go to revoke.cash
  2. Connect your Safe wallet
  3. Look for any ERC-721 approvals on your collateral NFTs
  4. Revoke any approvals before borrowing

3. No setApprovalForAll

If you've ever called setApprovalForAll for any operator on your NFT collection, revoke it. The Guard blocks new approvals but can't remove existing ones.


Step-by-Step Setup

Step 1: Install the Collateral Guard

The Guard checks every transaction from your Safe and blocks transfers of locked NFTs.

  1. Go to your Safe at safe.global
  2. Navigate to SettingsSafe Apps
  3. Search for "Transaction Builder" and open it
  4. Create a new transaction:
    • To Address: Your Safe's address
    • Value: 0
    • Data: (see below)

Transaction to set Guard:

Function: setGuard(address)
Guard Address: [TDH_COLLATERAL_GUARD_ADDRESS]

Or use this calldata:

0xe19a9dd9000000000000000000000000[GUARD_ADDRESS_WITHOUT_0x]
  1. Review and submit the transaction
  2. Have all required signers approve

Step 2: Enable the Liquidation Module

The Module allows the lending contract to transfer NFTs on valid defaults (and only on valid defaults).

  1. Still in Transaction Builder
  2. Create a new transaction:
    • To Address: Your Safe's address
    • Value: 0
    • Data: (see below)

Transaction to enable Module:

Function: enableModule(address)
Module Address: [TDH_LIQUIDATION_MODULE_ADDRESS]

Or use this calldata:

0x610b5925000000000000000000000000[MODULE_ADDRESS_WITHOUT_0x]
  1. Review and submit
  2. Have all required signers approve

Step 3: Verify Setup

After both transactions confirm, verify your setup:

  1. Go to Settings → Modules

    • You should see the TDH Liquidation Module listed
    • Important: This should be the ONLY module
  2. Go to Settings → Safe Apps → Transaction Builder

    • Query getGuard() on your Safe
    • It should return the TDH Collateral Guard address

Or use the NFT Loans app—it will show your configuration status.


Using the Setup Helper (Coming Soon)

We're building a Safe App that automates this setup:

  1. Open NFT Loans Safe App
  2. Click "Setup Safe for Borrowing"
  3. Review the two transactions
  4. Approve with your Safe signers
  5. Done!

What the Guard Blocks

Once installed, the Guard will block:

  • transferFrom - Standard NFT transfer
  • safeTransferFrom - Safe transfer with data
  • approve - Approving a spender for a locked NFT
  • setApprovalForAll - Setting operator approval while any NFTs are locked
  • burn - Burning a locked NFT
  • Removing the Guard while any loans are active
  • Disabling the Module while any loans are active

The Guard does NOT block:

  • Transferring NFTs that aren't locked as collateral
  • Receiving NFTs
  • Other Safe transactions (ETH transfers, contract calls, etc.)

What the Module Can Do

The Liquidation Module can ONLY:

  • Transfer a specific NFT from your Safe to the lender
  • And ONLY when the loan is validly defaulted (past maturity + grace period)
  • And ONLY when called by the NFT Loans Core contract

The Module CANNOT:

  • Transfer any other assets
  • Execute arbitrary transactions
  • Act before the loan defaults

Removing Guard/Module

While Loans Are Active

You cannot remove the Guard or Module while you have active loans. The Guard will block these transactions.

After All Loans Repaid

Once all your loans are repaid/closed:

  1. Go to Transaction Builder

  2. To disable Module:

    Function: disableModule(address prevModule, address module)
    prevModule: 0x0000000000000000000000000000000000000001 (sentinel)
    module: [TDH_LIQUIDATION_MODULE_ADDRESS]
  3. To remove Guard:

    Function: setGuard(address)
    Guard Address: 0x0000000000000000000000000000000000000000

Troubleshooting

"Safe must have TDH guard installed"

The Guard isn't installed. Follow Step 1 above.

"Safe must have liquidation module enabled"

The Module isn't enabled. Follow Step 2 above.

"Safe must have exactly one module"

You have other modules enabled. Disable them before borrowing, or use Deposit Mode instead.

"NFT has existing approval - revoke before borrowing"

Your NFT has an existing approval. Go to revoke.cash, connect your Safe, and revoke the approval.

"Cannot remove guard with active loans"

You tried to remove the Guard while a loan is active. Repay your loans first.

Transaction stuck/pending

Safe transactions require all signers. Check if other signers need to approve.


Security Considerations

Why can't I have other modules?

Other modules could potentially bypass the Guard. For example, a "spending module" might allow transferring NFTs without going through the Guard's checks. We require exactly one module (ours) for maximum security.

Why the 24-hour activation delay?

Safe Guard loans have a 24-hour waiting period after funding before the ETH is released. This gives time to detect issues:

  • If you transferred the NFT during setup, the loan can be cancelled
  • If something suspicious happens, the lender's funds are protected

What if I want to use other Safe features?

For maximum security, we recommend a dedicated Safe for NFT Loans. You can:

  1. Create a new Safe for borrowing
  2. Transfer NFTs you want to use as collateral to that Safe
  3. Set up Guard + Module on that Safe
  4. Keep your main Safe with other modules/features

Next Steps

Once your Safe is set up:

  1. Create your first loan request →
  2. Understand loan terms and interest →
  3. Learn about additional collateral →

Built for the 6529 community