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:
- TDH Collateral Guard - Prevents transferring locked NFTs
- 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:
- Go to safe.global
- Select your Safe
- Go to Settings → Modules
- 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:
- Go to revoke.cash
- Connect your Safe wallet
- Look for any ERC-721 approvals on your collateral NFTs
- 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.
- Go to your Safe at safe.global
- Navigate to Settings → Safe Apps
- Search for "Transaction Builder" and open it
- 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]- Review and submit the transaction
- 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).
- Still in Transaction Builder
- 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]- Review and submit
- Have all required signers approve
Step 3: Verify Setup
After both transactions confirm, verify your setup:
Go to Settings → Modules
- You should see the TDH Liquidation Module listed
- Important: This should be the ONLY module
Go to Settings → Safe Apps → Transaction Builder
- Query
getGuard()on your Safe - It should return the TDH Collateral Guard address
- Query
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:
- Open NFT Loans Safe App
- Click "Setup Safe for Borrowing"
- Review the two transactions
- Approve with your Safe signers
- Done!
What the Guard Blocks
Once installed, the Guard will block:
transferFrom- Standard NFT transfersafeTransferFrom- Safe transfer with dataapprove- Approving a spender for a locked NFTsetApprovalForAll- Setting operator approval while any NFTs are lockedburn- 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:
Go to Transaction Builder
To disable Module:
Function: disableModule(address prevModule, address module) prevModule: 0x0000000000000000000000000000000000000001 (sentinel) module: [TDH_LIQUIDATION_MODULE_ADDRESS]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:
- Create a new Safe for borrowing
- Transfer NFTs you want to use as collateral to that Safe
- Set up Guard + Module on that Safe
- Keep your main Safe with other modules/features
Next Steps
Once your Safe is set up: