Technical Deep Dive
This section walks through the mechanics of the Checks Platform, from the creation of an NFT Check to its eventual redemption, and highlights how automation and customization are achieved at each step.
Minting an NFT Check (Creation)
A user (or dApp) initiates the creation of a new NFT Check by calling the platform's minting function (for example, createCheck(...)
). The call includes parameters defining the check's terms:
Type of agreement (payment, vesting, escrow, etc.)
Involved parties (payer, payee/beneficiary addresses)
Asset and amount to lock
Condition parameters (timestamp for release, vesting schedule data, oracle condition ID, etc.)
Optional settings like enabling yield or requiring KYC verification
The contract then mints a new ERC-721 token to represent this agreement. The NFT Check token is assigned a unique token ID and is directly transferred to the designated beneficiary (the payee) upon creation, unless the scenario requires a different custody.
At the moment of minting, the contract interacts with the ERC-6551 registry to obtain the token-bound account for this NFT. If it's the first time this NFT ID is created, a new minimal proxy account is deployed for it.
The specified asset (for example, USDC stablecoin or an ERC-20 project token) is then transferred from the creator's wallet into the NFT's token-bound account. This funds the check.
Example Scenario
If Alice wants to pay Bob 1,000 USDC after 30 days:
Alice mints a check to Bob
1,000 USDC moves from Alice to the check's escrow account
The NFT's metadata reflects key info like the amount, asset, and unlock date
Bob holds the NFT Check which guarantees him the future payment
Alice has given up control of the funds (now held by the NFT's smart account)
The creation process logs an event for transparency
Distribution Strategy Execution
Once an NFT Check is live (minted and funded), it autonomously enforces the specified distribution strategy. The strategy logic can either be embedded in the NFT's own contract (selected by an enum or parameters) or attached via a strategy module contract that the NFT invokes.
In either case, the effect is that the NFT knows under what conditions to release or move the funds in its account. Several scenarios exist:
Simple Timed Release
The NFT contract will include a timestamp (unlock time) and disallow any withdrawal until that time. It might emit an event that it's "post-dated" until a specific block time.
Internally, when the unlock time is reached, the beneficiary can call a claim()
function. This will instruct the NFT's token-bound account to transfer the funds to the beneficiary's wallet.
The NFT can then either be burned (marking it redeemed) or retained as a record (with a flag that it's redeemed).
Vesting Schedules
The NFT might not allow a one-time claim of all tokens, but rather track how much has vested at the current time. For example, if 25% of tokens vest each quarter, every block the contract can calculate:
(Capped to 100%)
The beneficiary can periodically call a claim function to withdraw the funds that have become available. The NFT's account will then transfer out that portion to the beneficiary.
The NFT remains until all tokens are claimed (or the schedule ends), at which point it might auto-burn or become an empty shell NFT. The Checks Platform might provide a frontend to automate claiming or even allow setting up an auto-claim (via a bot or Gelato task) so that vested tokens get delivered as they unlock.
Escrow with Conditions
For an escrow with a condition, such as a milestone verification, the NFT will listen for a fulfillment signal. For instance, the condition could be encoded as: "Oracle XYZ must confirm EventID #123 as true."
The platform could use an oracle listener contract or subscribe to the oracle's callback. When the oracle (like UMA's optimistic oracle) posts the verification that Event #123 occurred, the NFT Check's contract is notified and immediately triggers release of funds.
The key is that the NFT contract has the authority to move the funds out of its TBA only when the predefined condition returns true.
Auto-Investment
For checks with Auto-Investment enabled, the NFT's funds are automatically deposited into a yield strategy immediately after creation, provided the user has opted in during the setup process.
In practice, the NFT's token-bound account calls into a Yield Facet of the diamond which in turn interacts with an ERC-4626 vault. For example, the 1,000 USDC in the check's account could be deposited into a Yearn or Aave adapter contract.
The NFT's account would receive yield-bearing tokens (aTokens or vault shares) representing its claim. Over time, the NFT's account balance in base assets grows.
When it's time to release funds to the beneficiary, the NFT will first withdraw from the yield contract back to USDC, then transfer to the user. All these steps are encoded so that the end-user sees a seamless operation.
The auto-compounding is handled either by the yield source (Yearn vaults auto-compound by design) or by periodic calls from a keeper contract that harvest and re-deposit rewards.
Redemption (Settlement)
When the conditions for an NFT Check are satisfied (time has elapsed, or vesting period complete, or external condition met), the final step is redemption.
The beneficiary (or in some cases the issuer, depending on terms) calls the appropriate function on the contract to settle the check. For a simple payment or completed escrow, this will transfer the full balance from the NFT's account to the beneficiary's address.
The NFT might then be burned or flagged as redeemed to indicate it's settled and prevent reuse. If the check had an expiration and expired without being claimed, there could be a different redemption path where the original payer can reclaim the funds.
Throughout redemption, the platform ensures atomic operations: the NFT's account either transfers the correct amount or the transaction reverts (so no partial funds get stuck). Logs are emitted for transparency of who redeemed and what amount.
In the case of partial vesting claims, the NFT will keep track of what's been paid out, and the remaining balance stays for future claims. When fully redeemed, that NFT Check's life cycle is over.
Automation & Customization
A powerful aspect of the Checks Platform is the ability to automate complex workflows and allow customization of the financial logic:
Multi-Signature Approvals
NFT Checks can be configured to require multiple signatures for certain actions. For example, a large escrow payment might need both the payer and payee (or an arbitrator) to sign off before release.
This is implemented by requiring multiple valid signatures on the claim transaction or by a separate "approval" transaction by a second party contract. The platform can use standards like ERC-1271 (contract signatures) to allow a Gnosis Safe (multisig wallet) to be a party.
Milestone-Based Triggers
NFT Checks will integrate oracles to trigger based on real-world events. The platform is designed to be oracle-agnostic: one could use Chainlink data feeds (for price-based triggers), or UMA's optimistic oracle (for subjective criteria), or custom oracles (for enterprise data).
The milestone triggers can even be multi-step: e.g., release 50% of funds at milestone 1 (design prototype completed), then the remaining 50% at milestone 2 (final product delivered), each verified by an oracle or a multi-sig approval from the paying party.
Custom Logic Modules
Not every use-case will be covered by built-in strategies, so the Checks Platform allows developers to create custom distribution contracts that extend the protocol.
For example, a developer could write a new Strategy contract that implements a novel payment curve (say, exponential release over time, or a performance-indexed payout where amount depends on some index).
This contract can be registered with the Checks Platform, and then users minting new checks can opt to use that strategy (if it's been audited/approved). The NFT's token-bound account would then delegate calls to that strategy contract for executing the distribution.
In essence, after minting, an NFT Check functions as an autonomous agent on-chain: its logic (internal or via a strategy module) will monitor conditions and move funds when appropriate, all while the participants can observe or even intervene (if multi-sig) according to the preset rules.
Last updated