Safe Guard Mode Explained
Safe Guard Mode is the recommended way to borrow on NFT Loans. It provides the strongest security guarantees for lenders, which means better terms for you as a borrower.
How It Works
The Setup
Your Safe wallet gets two components:
TDH Collateral Guard
- Installed as a Guard on your Safe
- Checks every transaction before execution
- Blocks transfers of locked NFTs
TDH Liquidation Module
- Installed as a Module on your Safe
- Can execute NFT transfers on valid defaults
- Only callable by the NFT Loans contract
During a Loan
┌─────────────────────────────────────────┐
│ Your Safe Wallet │
│ │
│ ┌─────────┐ │
│ │ Your │ ← Guard blocks transfers │
│ │ NFT │ │
│ └─────────┘ │
│ │
│ Guard: TDHCollateralGuard ✓ │
│ Module: TDHLiquidationModule ✓ │
└─────────────────────────────────────────┘
│
│ If you try to transfer NFT
▼
❌ BLOCKED by Guard
│
│ If loan defaults + liquidation called
▼
✓ Module transfers NFT to lenderThe 24-Hour Activation Delay
Safe Guard loans have a security feature: a 24-hour waiting period before funds are released.
Why?
The delay protects lenders from setup manipulation:
- Borrower sets up Safe correctly ✓
- Borrower accepts loan offer
- NFT gets locked, loan enters "Pending Activation"
- 24-hour window opens
- If borrower transferred NFT before accepting, it's detected
- If anything suspicious happens, loan can be cancelled
- After 24 hours, loan activates and borrower receives ETH
Timeline
You Accept Offer
│
▼
[PENDING_ACTIVATION] ─── NFT locked, ETH escrowed
│
│ 24 hours
▼
Anyone calls activateLoan()
│
▼
[ACTIVE] ─── ETH sent to you, interest starts accruing
│
│ Loan duration
▼
Maturity ─── You should repay by now
│
│ 24-hour grace period
▼
Default ─── Liquidation enabledWhat Can Cancel During Waiting Period
- You no longer own the NFT
- NFT lock was somehow bypassed
- Guard was removed (shouldn't be possible, but checked)
If any of these are true, anyone can call cancelPendingLoan and the lender's ETH is returned.
What the Guard Blocks
When you have locked NFTs, the Guard blocks:
Direct Transfers
transferFrom(from, to, tokenId)safeTransferFrom(from, to, tokenId)safeTransferFrom(from, to, tokenId, data)
Approvals for Locked NFTs
approve(spender, tokenId)- blocked for locked tokenssetApprovalForAll(operator, approved)- blocked if you have ANY locked NFTs
Destructive Actions
burn(tokenId)- blocked for locked tokens
Guard/Module Removal
setGuard(newGuard)- blocked while you have active loansdisableModule(module)- blocked for liquidation module while loans active
What's NOT Blocked
- Transferring NFTs that aren't locked
- Receiving NFTs
- Approving non-locked NFTs (if you have no setApprovalForAll lock)
- All other Safe transactions (ETH, other tokens, contract calls)
What the Module Can Do
The Liquidation Module is very limited:
It CAN
- Transfer a specific NFT from your Safe to the lender
- But ONLY when called by NFT Loans Core
- And ONLY when the loan is validly defaulted
It CANNOT
- Transfer any other assets
- Execute any other transactions
- Act before default conditions are met
- Be called by anyone except NFT Loans Core
Liquidation Conditions
For a liquidation to succeed:
- Loan status must be ACTIVE
- Current time > maturity + grace period
- Called through NFT Loans Core (not directly)
Security Requirements
Why Only One Module?
Other Safe modules might allow bypassing the Guard. For example:
- A "recovery module" could transfer NFTs
- A "spending module" could approve operators
We require your Safe have ONLY the TDH Liquidation Module to ensure the Guard can't be bypassed.
Why Check Existing Approvals?
The Guard blocks NEW approvals, but can't revoke existing ones. If you approved OpenSea before installing the Guard, they could still transfer your NFT.
Before borrowing: Revoke all approvals on your collateral NFT at revoke.cash
Why the Activation Delay?
Without it, a malicious borrower could:
- Accept a loan offer
- In the same transaction, have a pre-existing approval transfer the NFT
- Receive the loan principal
- NFT is gone, lender is stuck
The 24-hour delay ensures time to detect such attacks.
Advantages of Safe Guard Mode
| Benefit | Details |
|---|---|
| No Deposit | You don't need to put up 20% ETH |
| Lower Rates | Lenders face less risk, so charge less |
| True Lock | NFT is genuinely locked, not just "promised" |
| TDH Preserved | NFT stays in your wallet, TDH accrues |
| Transparent | Anyone can verify the Guard is installed |
Disadvantages
| Drawback | Details |
|---|---|
| Safe Required | Must have a Safe wallet |
| Setup Complexity | Need to install Guard + Module |
| Module Restrictions | Can't have other modules |
| 24hr Delay | Wait a day after acceptance to receive funds |
| Dedicated Safe | Recommended to use a separate Safe |
Setting Up
See the Safe Setup Guide for step-by-step instructions.
FAQ
Can I use my main Safe with other modules?
Not recommended. Other modules could bypass the Guard. Use a dedicated Safe for borrowing.
What if I need funds urgently?
The 24-hour delay is non-negotiable for security. If you need instant funds, use Deposit Mode (but you'll need 20% deposit and pay higher rates).
Can I have multiple active loans?
Yes! Each NFT can secure one loan. You can have multiple NFTs locked simultaneously.
What if the Guard has a bug?
This is a smart contract risk. The Guard is open-source and (will be) audited. But no code is guaranteed bug-free.
Can the protocol steal my NFT?
The Module can only transfer NFTs to lenders on valid defaults. The protocol owner cannot trigger arbitrary transfers. The Timelock adds additional protection on admin functions.