Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article covers ERC6809, a proposal for Non-Fungible Key Bound Tokens (NFKBTs) that incorporate protection into the token contract itself. Two auxiliary wallets control transfers, approvals, emergency asset recovery, and reconfiguration.
This article translates, summarizes, and supplements the following proposal.
Overview
A Non-Fungible Key Bound Token (NFKBT) is a type of Key Bound Token (KBT, the general term for a token bound to keys). It is an interface standard for adding optional security to the asset itself while maintaining compatibility with ERC721.
It defines APIs for use in smart contracts, particularly the basic behavior of addBindings.
addBindings binds two KeyWallets (KeyWallet1 and KeyWallet2) to the NFKBT. These KeyWallets control whether a SafeTransfer, a process for securely transferring NFTs, is permitted.
In this process, the NFKBT establishes a secure approve state so that it can be used by the user or an on-chain third party such as a smart contract.
At the core of NFKBT are two authorization functions, allowTransfer and allowApproval.
A KeyWallet calls these functions to give the HoldingWallet, which actually holds the assets, prior permission to call the conventional ERC721 functions transferFrom and approve.
Rather than transferring or approving assets directly, the allow functions let a KeyWallet specify the conditions under which a transfer or approval is permitted.
Potential use cases include individuals who want additional security for their NFTs, as well as consignment or temporary custody arrangements involving third-party wallets, brokers, banks, insurers, or galleries. NFKBT improves resistance to theft and fraud by building protection into the asset itself while retaining self-custody.
Terminology
| Term | Description |
|---|---|
| KeyWallet | A wallet authorized to determine how assets may be used, including whether transfers or approvals are permitted. Two are assumed in this article (KeyWallet1 and KeyWallet2). |
| HoldingWallet | The wallet holding the NFT assets. It can call transferFrom and approve when authorized by a KeyWallet. |
| SafeTransfer | A general term for a secure transfer. In this article, it refers to the secure transfer process controlled by a KeyWallet. |
| DefaultBehaviors | The conventional ERC721 default behavior when addBindings is not used. |
| DefaultValues | Default values supplied to a function. Users or dApps can supply custom or default values. |
Main functions and parameters
| Function | Purpose | Main parameters |
|---|---|---|
addBindings |
Bind KeyWallet1 and KeyWallet2 to the NFKBT and activate asset-level security. | |
allowTransfer |
Give prior permission for a transfer under specified conditions. Called by a KeyWallet. | _tokenId (target token ID), _time (time condition), _address (permitted recipient address), _anyToken (whether any token is permitted) |
allowApproval |
Give prior permission for an approval. Called by a KeyWallet. | _time (time condition), _numberOfTransfers (permitted number of transfers) |
safeFallback |
If unauthorized access to the HoldingWallet is suspected, one KeyWallet can move the assets to the other KeyWallet for safekeeping. | |
resetBindings |
If unauthorized access to either KeyWallet is suspected, a KeyWallet can reset security settings so they can be configured again. | Caller: KeyWallet1 or KeyWallet2 |
transferFrom/approve |
Conventional ERC721 functions. The HoldingWallet can call them after a KeyWallet grants prior permission through an allow... function. |
(Compliant with ERC721) |
Motivation
Blockchain users vary widely in age, background, and learning pace. Self-custodied assets have the significant advantage of giving users complete control, but also the serious drawback that assets may be unrecoverable after mistakes, key exposure, or fraud. The US Federal Trade Commission (FTC) received more than 46,000 reports of cryptocurrency fraud between January 2021 and March 2022, with consumer losses exceeding $1 billion. Such losses tend to prompt stricter regulation, which can conflict with the core values of this field. Both centralized and decentralized approaches have attempted to improve security, but no definitive solution had combined the advantages of both while avoiding their disadvantages.
The proposal therefore shifts the focus from how to protect a wallet to how to protect the asset itself. Wallets are free to create; the assets are what hold value. This idea led to KBT, a design intended to let users apply security to assets on an entirely optional basis and to the extent they choose. When these features are properly enabled, asset-level protection continues to operate even if a seed phrase or private key is exposed.
NFKBT (Non-Fungible Key Bound Token) is a type of KBT (Key Bound Token) that provides an interface for adding optional protection to assets themselves while maintaining compatibility with ERC721.
ERC6809 proposes a standardized API for smart contracts.
addBindings registers two KeyWallets (KeyWallet1 and KeyWallet2) with the NFKBT. These KeyWallets control whether a SafeTransfer, a process for securely transferring NFTs, is permitted.
The function also securely configures NFKBT approvals for use by the user or an on-chain third party such as a smart contract.
NFKBT uses two authorization functions: allowTransfer and allowApproval.
A KeyWallet calls these functions to give the HoldingWallet, which holds the assets, prior permission to execute the ERC721 functions transferFrom and approve.
The HoldingWallet holds the assets, while the KeyWallets determine the transfer and approval conditions.
If addBindings is not used, the token behaves like a conventional ERC721 token.
The intended use cases include not only individuals who want additional protection for their NFTs, but also consignment arrangements involving third-party wallets, brokers, banks, insurers, or galleries.
| Benefit | Description |
|---|---|
| Fully decentralized | Enabling protection does not give a third party access to the assets. This is consistent with self-custody. |
| Scalability | No geographical restrictions or account creation are required. It also avoids the constraints of distributing and stocking dedicated hardware. |
| Optional use | Protection can be enabled, disabled, or fine-tuned to suit the user's preferences. |
| Retained default behavior | Without addBindings, behavior is the same as conventional ERC721. Even after activation, behavior can be adjusted with default or custom values. |
| Enhanced protection | allowTransfer (_tokenId, _time, _address, _anyToken) and allowApproval (_time, _numberOfTransfers) require prior authorization through a KeyWallet. The additional safeFallback and resetBindings functions, when used appropriately, can prevent risks and problems common to conventional ERC721. |
| Safe recovery and reconfiguration | If unauthorized access to the HoldingWallet is suspected, one KeyWallet can move the assets to the other KeyWallet (safeFallback). If a KeyWallet is suspected of being compromised, the settings can be reset and new KeyWallets bound (resetBindings). The design does not rely on a single point of failure. |
| Preservation of anonymity | Users can interact pseudonymously on-chain without supplying personal or shipping information. |
| Low cost | Costs depend on on-chain transaction fees (GWEI), making this a practical standalone protection mechanism. |
| Low environmental impact | No central server or manufacturing or shipping of physical devices is needed, and the design is consistent with Ethereum's transition to PoS. |
Specification
ERC6809 defines the IKBT721 interface for implementing Non-Fungible Key Bound Tokens (NFKBTs). It maintains compatibility with ERC721 while introducing a dual protection structure involving KeyWallets and a HoldingWallet, adding security features to the assets (tokens) themselves.
Interface
interface IKBT721 {
event AccountSecured(address indexed _account, uint256 _noOfTokens);
event AccountResetBinding(address indexed _account);
event SafeFallbackActivated(address indexed _account);
event AccountEnabledTransfer(
address _account,
uint256 _tokenId,
uint256 _time,
address _to,
bool _anyToken
);
event AccountEnabledApproval(
address _account,
uint256 _time,
uint256 _numberOfTransfers
);
event Ingress(address _account, uint256 _tokenId);
event Egress(address _account, uint256 _tokenId);
struct AccountHolderBindings {
address firstWallet;
address secondWallet;
}
struct FirstAccountBindings {
address accountHolderWallet;
address secondWallet;
}
struct SecondAccountBindings {
address accountHolderWallet;
address firstWallet;
}
struct TransferConditions {
uint256 tokenId;
uint256 time;
address to;
bool anyToken;
}
struct ApprovalConditions {
uint256 time;
uint256 numberOfTransfers;
}
function addBindings(
address _keyWallet1,
address _keyWallet2
) external returns (bool);
function getBindings(
address _account
) external view returns (AccountHolderBindings memory);
function resetBindings() external returns (bool);
function safeFallback() external returns (bool);
function allowTransfer(
uint256 _tokenId,
uint256 _time,
address _to,
bool _allTokens
) external returns (bool);
function getTransferableFunds(
address _account
) external view returns (TransferConditions memory);
function allowApproval(
uint256 _time,
uint256 _numberOfTransfers
) external returns (bool);
function getApprovalConditions(
address account
) external view returns (ApprovalConditions memory);
function getNumberOfTransfersAllowed(
address _account,
address _spender
) external view returns (uint256);
function isSecureWallet(address _account) external returns (bool);
function isSecureToken(uint256 _tokenId) external returns (bool);
}Events
AccountSecured
event AccountSecured(address _account, uint256 _amount);Emitted when a wallet is secured by calling addBindings.
The user registers two KeyWallets by calling addBindings.
This event indicates that the protected account (_account) has been secured.
The second argument represents the token balance when protection is enabled.
Parameters
_account- Address of the secured account.
_amount- Number of tokens held when protection is enabled.
AccountResetBinding
event AccountResetBinding(address _account);Emitted when resetBindings is called.
If one KeyWallet is compromised, this function resets the registration. This event signals that the KeyWallet settings associated with the account have been reset.
Parameters
_account- Address of the account whose settings were reset.
SafeFallbackActivated
event SafeFallbackActivated(address _account);Emitted when safeFallback is called.
If the HoldingWallet is compromised, one KeyWallet can move all the assets to the other KeyWallet. This event indicates that the asset migration has been initiated.
Parameters
_account- Address of the account being processed.
AccountEnabledTransfer
event AccountEnabledTransfer(
address _account,
uint256 _tokenId,
uint256 _time,
address _to,
bool _anyToken
);Emitted when allowTransfer is called.
The event is emitted when a KeyWallet permits transfers under specified conditions. It indicates authorization to transfer a particular token ID, within a given period, to a particular recipient, or to transfer any token.
Parameters
_account- Account for which permission was configured.
_tokenId- Target token ID (0 means no restriction).
_time- Validity period of the permission (block time).
_to- Address to which transfers are permitted.
_anyToken- Flag indicating whether any token can be transferred.
AccountEnabledApproval
event AccountEnabledApproval(
address _account,
uint256 _time,
uint256 _numberOfTransfers
);Emitted when allowApproval is called.
The event is emitted when a KeyWallet authorizes approvals based on a specified time period and number of transfers.
Parameters
_account- Account for which approval permission was configured.
_time- Approval expiration time (block time).
_numberOfTransfers- Permitted number of transfers (0 means unlimited).
Ingress
event Ingress(address _account, uint256 _tokenId);Emitted when an account newly holds tokens. It announces that the specified account has received a token for the first time.
Parameters
_account- Account of the new holder.
_tokenId- ID of the received token.
Egress
event Egress(address _account, uint256 _tokenId);Emitted when an account has disposed of all its tokens.
It announces that the specified account has transferred all the tokens it held and is no longer a holder.
Parameters
_account- Account that ceased holding tokens.
_tokenId- ID of the last token transferred.
Structs
AccountHolderBindings
struct AccountHolderBindings {
address firstWallet;
address secondWallet;
}A struct for managing the two KeyWallets bound to an account.
It stores two KeyWallets as security settings associated with a HoldingWallet.
Parameters
firstWallet- First registered KeyWallet.
secondWallet- Second registered KeyWallet.
TransferConditions
struct TransferConditions {
uint256 tokenId;
uint256 time;
address to;
bool anyToken;
}A struct defining the conditions for permitting transfers.
It stores the token to transfer, validity period, recipient, and whether arbitrary tokens are permitted, as configured by allowTransfer.
Parameters
tokenId- Target token ID.
time- Deadline for permitted transfers (block time).
to- Address to which transfers are permitted.
anyToken- Whether transfers of arbitrary tokens are permitted.
ApprovalConditions
struct ApprovalConditions {
uint256 time;
uint256 numberOfTransfers;
}A struct defining the conditions for permitting approvals.
It stores the approval validity period and transfer count limit configured by allowApproval.
Parameters
time- Expiration time of the approval.
numberOfTransfers- Number of authorized transfers.
Functions
addBindings
function addBindings(address _keyWallet1, address _keyWallet2) external returns (bool);Registers two KeyWallets and secures an account.
It binds the caller (the holder account) to KeyWallet1 and KeyWallet2, placing the account under protection.
Upon registration, the AccountSecured event is emitted.
The operation reverts in the following cases.
- The caller is not a holder.
- Protection has already been enabled.
- Both KeyWallets have the same address.
- The caller has the same address as either KeyWallet.
- A KeyWallet is
0x0(an invalid address). - A wallet has already been registered as a KeyWallet for another holder.
Arguments
_keyWallet1- First KeyWallet.
_keyWallet2- Second KeyWallet.
Return value
booltrueon success,falseon failure.
getBindings
function getBindings(address _account) external view returns (AccountHolderBindings memory);Retrieves the KeyWallet information associated with an account.
It returns the KeyWallet1 and KeyWallet2 addresses registered for _account in an AccountHolderBindings struct.
This allows callers to identify the KeyWallets bound to the account.
Arguments
_account- Address of the account whose KeyWallet information is requested.
Return value
AccountHolderBindings- Struct containing
firstWalletandsecondWallet.
- Struct containing
resetBindings
function resetBindings() external returns (bool);Resets the existing KeyWallet settings.
It is used when one KeyWallet has been compromised or become unusable.
A KeyWallet (_keyWallet1 or _keyWallet2) calls it to reset the KeyWallet settings of the associated holder.
The holder can then use addBindings again to configure new KeyWallets.
On success, the AccountResetBinding event is emitted.
Calls from addresses other than the KeyWallets revert.
Return value
booltrueon success,falseon failure.
safeFallback
function safeFallback() external returns (bool);Moves assets to a safe KeyWallet when unauthorized access to the HoldingWallet occurs.
If the holder account is compromised, either KeyWallet can call this function to move the assets to the other KeyWallet.
This allows the KeyWallets to evacuate the assets even if the HoldingWallet has been completely taken over.
After execution, the SafeFallbackActivated event is emitted.
Calls from addresses other than the KeyWallets revert.
Return value
booltrueon success,falseon failure.
allowTransfer
function allowTransfer(
uint256 _tokenId,
uint256 _time,
address _to,
bool _anyToken
) external returns (bool);Allows a KeyWallet to authorize particular transfer conditions in advance.
It is used before a call to transferFrom or safeTransferFrom to authorize specified token transfer conditions.
This permission allows the HoldingWallet to securely execute transfers that satisfy the conditions.
The parameters can be configured flexibly, and zero values can remove restrictions.
_tokenId = 0No token ID restriction._time = 0No expiration restriction._to = 0x0No recipient restriction._anyToken = truePermit transfers of all tokens.
Once the conditions are configured, the AccountEnabledTransfer event is emitted.
The function reverts if called by an address other than a KeyWallet or if the token is not owned by the holder.
Arguments
_tokenId- Token ID permitted for transfer.
_time- Expiration time of transfer permission (block time).
_to- Address to which transfers are permitted.
_anyToken- Whether transfers of arbitrary tokens are permitted.
Return value
booltrueon success,falseon failure.
getTransferableFunds
function getTransferableFunds(address _account) external view returns (TransferConditions memory);Retrieves the transfer permission conditions of a specified account.
It returns the conditions configured by allowTransfer (token ID, expiration, recipient, and permission to transfer arbitrary tokens) in a TransferConditions struct.
Callers can use this information to determine the conditions under which a transfer can be executed.
Arguments
_account- Account whose transfer conditions are requested.
Return value
TransferConditions- Struct containing the configured transfer conditions.
allowApproval
function allowApproval(
uint256 _time,
uint256 _numberOfTransfers
) external returns (bool);Allows a KeyWallet to authorize approval conditions in advance.
It is used before approve or setApprovalForAll, permitting a specified number of transfers within a specified period.
Setting _numberOfTransfers to 0 permits unlimited transfers during that period.
Once configured, the AccountEnabledApproval event is emitted.
Calls from addresses other than a KeyWallet revert.
Arguments
_time- Expiration time of the approval (block time).
_numberOfTransfers- Number of authorized transfers (0 means unlimited).
Return value
booltrueon success,falseon failure.
getApprovalConditions
function getApprovalConditions(address _account) external view returns (ApprovalConditions memory);Retrieves the approval conditions of an account.
It returns the approval conditions configured by allowApproval in an ApprovalConditions struct.
The struct includes the expiration time (time) and the permitted number of transfers (numberOfTransfers).
Arguments
_account- Address of the account whose conditions are requested.
Return value
ApprovalConditions- Struct containing the approval conditions.
getNumberOfTransfersAllowed
function getNumberOfTransfersAllowed(
address _account,
address _spender
) external view returns (uint256);Retrieves the number of transfers that a specified account permits a particular spender to execute.
It is used to check the count limit established by allowApproval.
The function allows callers to determine how many transfers the spender can still execute.
Arguments
_account- Holder account that configured the approval.
_spender- Address that received the approval.
Return value
uint256- Remaining number of transfers.
isSecureWallet
function isSecureWallet(address _account) external returns (bool);Determines whether security features are enabled for a specified account.
If KeyWallets have been configured with addBindings, this function returns true.
It returns false for an ordinary wallet or one without configured KeyWallets.
Arguments
_account- Account to check.
Return value
bool- Security activation state (
true= enabled,false= disabled).
- Security activation state (
isSecureToken
function isSecureToken(uint256 _tokenId) external returns (bool);Determines whether a particular token is protected.
It returns true for tokens belonging to an account secured by addBindings.
It returns false for ordinary ERC721 tokens.
Arguments
_tokenId- Token ID to check.
Return value
bool- Protection status (
true= protected,false= unprotected).
- Protection status (
Additional notes
NFKBT's technical decisions emphasize providing security features that users can employ in a self-custodial setting while maintaining consistency and compatibility with ERC721. By inheriting ERC721 functionality, NFKBT satisfies the requirements of existing NFT-compatible dApps and can be used without requiring adjustments to the existing ecosystem. Users can consequently choose whether to use NFKBT with conventional behavior or with its security features enabled. This allows implementation to proceed immediately without requiring changes to the existing decentralized ecosystem.
To make the functions convenient for both developers and users, allowTransfer and allowApproval return a bool on success and revert on failure.
This decision follows common ERC721 behavior.
Compatibility
KBT (Key Bound Token) is designed for compatibility with existing token standards and wallets. Existing tokens and wallets remain functional and unaffected when NFKBT is introduced. Because NFKBT complies with ERC721, it can be used conventionally when security features are not enabled, and even when enabled, its design does not obstruct existing workflows.
Tests
The test suite is located in the assets directory.
The average gas usage is as follows.
| Function | Average gas usage (as reported in the proposal) |
|---|---|
addBindings |
155,096 |
resetBindings |
30,588 |
safeFallback |
72,221 (depends on the number of NFTs held by the holder) |
allowTransfer |
50,025 |
allowApproval |
44,983 |
These values indicate the approximate average cost of executing each function.
In particular, safeFallback varies in gas usage because the number of assets transferred depends on the number of NFTs held.
Reference implementation
The implementation is located in the assets directory.
The following is a flow diagram.
This diagram shows the sequence of representative operations (addBindings, allowTransfer, allowApproval, safeFallback, and resetBindings) among the HoldingWallet, KeyWallet1, KeyWallet2, and the IKBT721 contract.
Step 1: Securing the wallet (addBindings)
- The HoldingWallet (the account holding the NFTs) calls
addBindingsto enable security features. - It supplies two KeyWallet addresses (
_keyWallet1and_keyWallet2) as arguments. - The contract registers these settings, and the HoldingWallet is treated as a secured account.
- On success, the
AccountSecuredevent is emitted.
As a result, NFKBT security is enabled for the HoldingWallet, and KeyWallet1 and KeyWallet2 are bound to it.
Step 2: Configuring transfer permissions (allowTransfer)
- Either KeyWallet (1 or 2) calls
allowTransfer. - It supplies the following four parameters.
_tokenIdID of the target NFT (0 permits all)._timeDeadline for permitted transfers._toPermitted transfer recipient._anyTokenWhether transfers of all tokens are permitted.
- The contract registers the conditions and emits the
AccountEnabledTransferevent.
The HoldingWallet can now execute transferFrom under the specified conditions.
Step 3: Configuring approval permissions (allowApproval)
- A KeyWallet calls
allowApproval. - It supplies the following parameters.
_timeExpiration time of the approval._numberOfTransfersPermitted number of transfers (0 means unlimited).
- The contract stores the conditions and emits the
AccountEnabledApprovalevent.
The HoldingWallet can now execute approve or setApprovalForAll within the specified period and transfer count.
Step 4: Transferring or approving tokens (transferFrom / approve)
- The HoldingWallet calls
transferFromorapprove. - The contract checks the authorization conditions configured in advance.
- If the conditions are met, the operation executes; otherwise, it reverts.
- On execution, the standard
TransferorApprovalevent is emitted.- With
transferFrom, the permitted count decreases by one, and approval is revoked when the count reaches zero. approveandsetApprovalForAllsimilarly apply time and count restrictions.
- With
Step 5: Moving assets when unauthorized access is detected (safeFallback)
- If a KeyWallet detects unauthorized access to the HoldingWallet, it calls
safeFallback. - The contract moves the assets held by the HoldingWallet to the other KeyWallet.
- When processing is complete, the
SafeFallbackActivatedevent is emitted.
Even if the HoldingWallet is taken over, the assets can be moved to a KeyWallet for safekeeping.
Step 6: Replacing KeyWallets (resetBindings)
- If KeyWallet1 or KeyWallet2 determines that there is a problem with the other KeyWallet, it calls
resetBindings. - The contract clears the KeyWallet settings, allowing the HoldingWallet to call
addBindingsagain. - When processing is complete, the
AccountResetBindingevent is emitted.
New KeyWallets can now be registered, avoiding a single point of failure.
Overall workflow summary
| Step | Caller | Function | Purpose | Result |
|---|---|---|---|---|
| 1 | HoldingWallet | addBindings |
Register KeyWallets | Activate security features |
| 2 | KeyWallet | allowTransfer |
Permit transfer conditions | Authorize conditional transfers |
| 3 | KeyWallet | allowApproval |
Permit approval conditions | Authorize conditional approvals |
| 4 | HoldingWallet | transferFrom / approve |
Actually transfer or approve tokens | Execute operations subject to the conditions |
| 5 | KeyWallet | safeFallback |
Recover assets when the HoldingWallet is compromised | Move assets to a KeyWallet |
| 6 | KeyWallet | resetBindings |
Reset KeyWallets | Allow registration of new KeyWallets |
Through this workflow, NFKBT implements direct asset protection entirely in a smart contract. Users can control security at the token level rather than the wallet level, responding flexibly and on-chain to problems such as key exposure or wallet takeover.
Security
KeyWallet design (why three wallets are used)
NFKBT requires registering two KeyWallets when calling addBindings.
It therefore operates with the following three-wallet configuration.
| Type | Description |
|---|---|
| HoldingWallet | Wallet that actually holds the tokens (NFKBTs). |
| KeyWallet1 | First wallet for protection, authorization, and recovery operations. |
| KeyWallet2 | Second wallet for the same operations. |
The reasons for adopting a three-wallet configuration are as follows.
- Reduce gas costs by registering both wallets at the same time.
- Prevent configuration errors that can occur when adding KeyWallets individually.
- Prevent abuse of security functions such as
safeFallback.
If KeyWallets could be added across multiple operations, the design would not only introduce configuration errors and additional gas costs but could also allow abuse of safeFallback.
NFKBT therefore requires both KeyWallets to be registered together.
Responses to potential scenarios
NFKBT defines the actions users should take depending on which wallet has been compromised.
| Scenario | Potential situation | Recommended action | Function |
|---|---|---|---|
| HoldingWallet compromised | The wallet holding assets has been taken over or is inaccessible. | Recover the assets using a KeyWallet. | safeFallback |
| KeyWallet1 or KeyWallet2 compromised | One protection wallet has been taken over or is inaccessible. | Reset the security settings using a KeyWallet. | resetBindings |
If the HoldingWallet is compromised (safeFallback)
If the HoldingWallet is compromised or becomes inaccessible, the user can call safeFallback from either KeyWallet to move the assets to the other KeyWallet.
Calling safeFallback securely moves the NFKBTs from the HoldingWallet to a KeyWallet.
This mechanism allows users to protect assets before they reach an attacker, even if the HoldingWallet has been taken over.
In particular, it is important that the NFKBTs are not sent to the KeyWallet that calls the function.
If the assets were transferred to the calling KeyWallet, an attacker who had stolen that wallet could steal all the NFKBTs at once.
For this reason, safeFallback always moves assets to the other KeyWallet.
If a KeyWallet is compromised (resetBindings)
If KeyWallet1 or KeyWallet2 is compromised, call resetBindings from the remaining KeyWallet.
Calling resetBindings clears the KeyWallet information registered in the contract, and the NFKBT temporarily behaves like a conventional ERC721 token.
This enables reconfiguration with new KeyWallets (addBindings).
Only KeyWallets are permitted to call this function.
If the HoldingWallet could call resetBindings, an attacker who took over the HoldingWallet could immediately disable protection and freely transfer the NFKBTs.
To prevent this, permission to call resetBindings is restricted to the KeyWallets.
If two of the three wallets are compromised simultaneously, there is nothing the NFKBT owner can do. However, if only one is compromised, NFKBT gives the owner a second chance to recover. This is a significant advantage not provided by conventional NFT standards.
Security design of allowTransfer
allowTransfer is a function for securely transferring NFKBTs, allowing the user to specify detailed transfer conditions.
A dApp can also supply default values (Default Values) to reproduce conventional ERC721 behavior (Default Behaviors).
This flexibility lets users choose a suitable security level, from secure transfers with strict restrictions to unrestricted transfers.
Parameters and behavior
The function accepts four parameters, whose combinations provide different levels of protection.
| Parameter | Type | Description |
|---|---|---|
_tokenId |
uint256 |
ID of the target NFKBT. Restricts transfers to a particular token. |
_time |
uint256 |
Period during which transfers are permitted (in units of blocks). Specified relative to the current timestamp. |
_address |
address |
Address to which transfers are permitted. |
_anyToken |
bool |
If true, disables restrictions and behaves like conventional ERC721. |
When _anyToken is false, transfers must satisfy all three of the conditions above (token ID, expiration, and recipient).
When _anyToken is true, transfers can be made in the same way as conventional ERC721.
Caller requirements
allowTransfer must be called by KeyWallet1 or KeyWallet2.
This prevents the HoldingWallet from transferring assets arbitrarily, reducing the risk of assets being moved without the user's knowledge.
Security design of allowApproval
allowApproval enhances security when a third party (a dApp or smart contract) is authorized to use NFKBTs.
It is designed to prevent unauthorized token operations, such as draining attacks by malicious dApps.
Parameters and behavior
The function accepts two parameters, whose combinations provide flexible control over the scope of permission.
| Parameter | Type | Description |
|---|---|---|
_time |
uint256 |
Approval validity period (in units of blocks). The approval becomes invalid after the specified time. |
_numberOfTransfers |
uint256 |
Number of transfers an approved third party can execute. 0 means unlimited. |
Users can thus explicitly limit how long and how many times third parties can operate on their assets.
Caller requirements
allowApproval must also be called by KeyWallet1 or KeyWallet2.
The HoldingWallet cannot simply call approve directly; requiring prior authorization from a KeyWallet provides protection.
Conclusion
This article covered ERC6809, a proposal for NFKBTs that incorporate protection directly into the token contract and let two auxiliary wallets control transfers, approvals, emergency asset recovery, and reconfiguration. I hope it was useful.

