Skip to content

CHIP-0044: Clawback Standard v2#150

Merged
danieljperry merged 9 commits intomainfrom
clawback-v2
Aug 12, 2025
Merged

CHIP-0044: Clawback Standard v2#150
danieljperry merged 9 commits intomainfrom
clawback-v2

Conversation

@Rigidity
Copy link
Contributor

@Rigidity Rigidity commented Mar 5, 2025

No description provided.

@Yakuhito
Copy link
Contributor

Yakuhito commented Mar 5, 2025

Awesome! I like the idea that the receiver wallet can treat the coins as 'owned' after the delay, even without spending the clawback coin (which only needs to be spent when the value being sent is needed for a transaction - in the same transaction)

In the code, I see that the memo format is sender_puzzle_hash seconds. I would like to propose receiver_puzzle_hash sender_puzzle_hash seconds instead, as that:

  • would allow wallets to be notified when they're the recipient of a clawback transaction, since the hint becomes receiver_puzzle_hash
  • would allow blockchain observers to fully build the clawback puzzle from the parent spend (without the receiver having to send their puzzle hash)
  • would support CATs and NFTs, since receiver_puzzle_hash would be the hash of the 'custody' (inner) puzzle, which gets wrapped by the outer puzzles (and you can still add a memo to the CREATE_COINs only if the clawback is for CATs/NFTs, which anyone can determine knowing the three values)

@Rigidity
Copy link
Contributor Author

Rigidity commented Mar 5, 2025

Awesome! I like the idea that the receiver wallet can treat the coins as 'owned' after the delay, even without spending the clawback coin (which only needs to be spent when the value being sent is needed for a transaction - in the same transaction)

Well, this is true but it would require spending the coin twice do to current limitations (the receiver isn't part of the inner puzzle and so would rather have to push it through to themselves and then spend it).

In the code, I see that the memo format is sender_puzzle_hash seconds. I would like to propose receiver_puzzle_hash sender_puzzle_hash seconds instead

The hint goes before the proposed memo structure, although you raise a good point which is that the hint should always be included so the receiver can find the coin, even for XCH.

@Rigidity
Copy link
Contributor Author

Rigidity commented Mar 5, 2025

I've clarified the intended memo structure in the CHIP

@Rigidity
Copy link
Contributor Author

Rigidity commented Mar 6, 2025

I've updated the CHIP to include the revised implementation of clawback v2, which uses a p2_1_of_n puzzle rather than p2_condition_options. This means that only the clawback coin needs to be spent, rather than an additional coin which sends a message to prove ownership. Additionally, it only reveals the spend path that's needed on-chain, saving on CLVM cost. All of the functionality is the same, and more tests have been written.

@Rigidity Rigidity mentioned this pull request Mar 6, 2025
@danieljperry danieljperry changed the title Clawback Standard v2 CHIP-44: Clawback Standard v2 Mar 6, 2025
@danieljperry
Copy link
Contributor

This CHIP is now a Draft and has been assigned CHIP-44. It describes how to implement a new form of clawback coins by using ASSERT_BEFORE. Wallet devs will likely be interested in this standard. Please leave your reviews here, and feel free to discuss in the #chips channel of our Discord.

@danieljperry danieljperry changed the title CHIP-44: Clawback Standard v2 CHIP-0044: Clawback Standard v2 Mar 6, 2025
Copy link
Contributor

@richardkiss richardkiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a risk here in that the old standard, you could send money to pay a debt and not have to worry about a typo in the address. If you brick your coin to an unspendable public key, you can come back in a day or a year or a century and claw it back, as long as it hasn't been "clawed forward" by anyone.

This new standard has a finite time for clawback, even in the case of a bricked coin. You might consider coming up with a name that can't be confused with the unbrickable "clawback". Maybe "clawback_until" or "vesting_payment" or something.

@danieljperry
Copy link
Contributor

We will discuss this CHIP in a public Zoom call on April 3 at 10 AM EDT. See the #chips channel in our Discord for more info.

@danieljperry
Copy link
Contributor

Here is the recording of the discussion for this CHIP:
https://youtu.be/-kGkp7lXWJQ

@danieljperry
Copy link
Contributor

This CHIP is now in Review status. Please leave your reviews here.

@danieljperry
Copy link
Contributor

This CHIP is now in Last Call. If no further changes are required in the next two weeks, then it will be moved to Final status.

@danieljperry
Copy link
Contributor

This CHIP is now Final. No further changes are allowed.

@danieljperry danieljperry requested a review from BrandtH22 August 11, 2025 05:56
Copy link
Contributor

@BrandtH22 BrandtH22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@danieljperry danieljperry merged commit 0113534 into main Aug 12, 2025
5 checks passed
@danieljperry danieljperry deleted the clawback-v2 branch August 12, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants