<aside> ⚠️

Glue Blueprints are part of the Glue Expansions Pack, to start using this blueprint install the Expansions Pack via npm install @glue-finance/expansions-pack.

For more information visit: Expansions Pack

</aside>

ERC721G represents a fundamental reimagining of how NFT royalties should work. While the world moved on from the broken promise of ERC-2981, accepting that creator royalties would forever remain optional and largely ignored, we asked a different question: what if royalty enforcement could be permissionless, marketplace-agnostic, and mathematically guaranteed?

The answer is ERC721G—a new NFT standard that doesn't just suggest royalties should be paid, but ensures they must be paid before tokens can change hands. This isn't achieved through restrictive whitelists or centralized control, but through an elegant deferred payment mechanism that works seamlessly with any marketplace, past, present, or future.

White Paper: https://github.com/lalilulel0x/ERC721G/blob/main/WHITEPAPER.md

The Core Innovation: Deferred Payment Reconciliation

At its heart, ERC721G introduces a revolutionary concept: transfers happen optimistically, but tokens become "locked" until their royalty is reconciled. This works because modern marketplaces like OpenSea execute royalty payments in the same transaction as transfers, just in a different order than traditional smart contracts expect. ERC721G embraces this reality rather than fighting it.

When an NFT transfer occurs without immediate payment, the token doesn't fail to transfer—it transfers successfully but enters a locked state. This locked token cannot be transferred again by marketplaces until its royalty debt is cleared. The owner can still gift it or move it themselves, but marketplace trading is frozen. This creates a powerful incentive: pay royalties or lose liquidity.

The genius lies in what happens when payment arrives. Whether it comes milliseconds after the transfer in the same transaction (OpenSea's pattern) or hours later through a separate payment, the protocol processes it identically. Payments unlock tokens in LIFO order—last locked, first unlocked—ensuring that the most recent transaction's token has priority. This means a marketplace that transfers an NFT and then pays royalty in the same transaction will see that exact token unlock immediately, creating a seamless user experience.

Beyond Traditional Tokens: A Living Price Floor

ERC721G doesn't just enforce royalties—it makes them dynamic and meaningful. Through integration with the GLUE Protocol, every ERC721G collection has access to a living oracle of its own floor price. This floor price isn't speculative or based on marketplace listings; it's derived from actual collateral backing the collection. As revenue flows to GLUE (which always receives a minimum share of royalties), this collateral grows, and so does the floor price. The royalty percentage is then calculated against this floor, creating a self-reinforcing system where successful collections naturally command higher royalties.

This integration also provides flash loan protection. Attackers cannot manipulate GLUE's collateral downward to pay artificially low royalties, because the protocol compares collateral snapshots across transactions. If collateral drops without a corresponding supply increase, the system uses the previous, higher value. This mathematical guarantee ensures that royalty enforcement can never be gamed.

Marketplace Evolution: transferFrom2 and approve2

While the deferred payment system ensures backward compatibility with every existing marketplace, ERC721G also introduces a forward-looking primitive: transferFrom2. This new function represents the evolution that Permit2 brought to ERC20 approvals, but for NFT transfers with native royalty enforcement.

With transferFrom2, marketplaces can execute atomic royalty-paid transfers where the token never enters a locked state. Better yet, marketplaces earn a 1% reward for using this method, creating a natural incentive to adopt the new standard. The companion function approve2 introduces ERC20-style count-based allowances, allowing users to approve a marketplace for "N transfers" rather than per-token or all-or-nothing approvals.

This dual-path approach—supporting both legacy transferFrom with deferred payments and new transferFrom2 with atomic payments—ensures that ERC721G can be adopted by existing collections without breaking any integrations while simultaneously paving the way for a better future.

Approval Seizure: Making Locked Items Unlistable

A critical piece of the enforcement puzzle is what we call "approval seizure." When a token is locked, the protocol returns address(0) from getApproved() for that token, making it appear as if no approval exists. Similarly, if an owner has any locked items, isApprovedForAll() returns false for marketplace operators. This means locked items simply cannot be listed on marketplaces—the UI will show them as unapproved.

This aggressive enforcement creates a clear user experience: "Pay your royalties, then trade." There's no confusion about which items can or cannot be listed. The wallet shows locked items distinctly, and attempting to list them fails at the marketplace level, not during the transaction. Users quickly learn that clearing their locked items is the path back to full liquidity.

Architectural Philosophy: Permissionless and Unstoppable

Throughout ERC721G's design, we maintained an unwavering commitment to permissionlessness. Unlike other royalty enforcement attempts that rely on marketplace whitelists or centralized registries, ERC721G works with any marketplace—even those that haven't been built yet. There's no approval process, no whitelist to maintain, and no way for the protocol to be gatekept.