How does it work?
By hooking themint, transfer, and transferFrom functions of the NFT contract into the Rules Engine with a policy that tracks when each NFT was last transferred and enforces minimum hold periods before allowing new transfers.
Let’s break that down further.
When an NFT is minted, the Rules Engine records a timestamp indicating when it becomes eligible for transfer (20 days later). For subsequent transfers, a new hold period begins (10 days) to prevent rapid flipping while still allowing legitimate trading. The system uses a mapped tracker to store the “unlock timestamp” for each NFT, checking against the current block timestamp before allowing any transfer. If the NFT is still within its hold period, the transaction reverts. This is particularly useful for:- Community building: Encourage longer-term ownership and engagement
- Anti-speculation: Prevent immediate flipping and price manipulation
- Fair distribution: Give all holders equal opportunity to participate in the ecosystem
Implementation
The policy uses a Mapped Tracker to store unlock timestamps for each NFT. You’ll need to:- Set the initial hold period for mints (20 days = 1,728,000 seconds)
- Set the hold period for transfers (10 days = 864,000 seconds)
- Ensure your NFT contract implements standard ERC-721 transfer functions
- Optionally, adjust hold periods based on your community needs
Policy JSON
It’s critical that you add the rule to both the
transfer and transferFrom functions to ensure
the hold time requirement cannot be bypassed through allowance-based transfers.