<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mojopuzzler.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Securing_spend_with_announcements_-_overview</id>
	<title>Securing spend with announcements - overview - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mojopuzzler.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Securing_spend_with_announcements_-_overview"/>
	<link rel="alternate" type="text/html" href="https://mojopuzzler.org/mediawiki/index.php?title=Securing_spend_with_announcements_-_overview&amp;action=history"/>
	<updated>2026-05-25T07:57:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://mojopuzzler.org/mediawiki/index.php?title=Securing_spend_with_announcements_-_overview&amp;diff=2444&amp;oldid=prev</id>
		<title>Gneale: Created page with &quot;==== Return to: Insightful_Comments ==== &lt;h1&gt;1.&lt;/h1&gt;Dan Perry on Keybase 20211220  10:59pm EST The parameters you pass into the puzzle (&quot;defconstant&quot; and &quot;TARGET_AMOUNT&quot; in your example) are the puzzle's solution. If you curry one of these parameters, you are hard-coding it into the solution, and therefore into the puzzle as well.  You won't always know what all of these values will be at the time of the coin's creation, so currying them isn't always an option. Any p...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mojopuzzler.org/mediawiki/index.php?title=Securing_spend_with_announcements_-_overview&amp;diff=2444&amp;oldid=prev"/>
		<updated>2023-11-18T01:35:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==== Return to: &lt;a href=&quot;/mediawiki/index.php/Insightful_Comments&quot; title=&quot;Insightful Comments&quot;&gt;Insightful_Comments&lt;/a&gt; ==== &amp;lt;h1&amp;gt;1.&amp;lt;/h1&amp;gt;Dan Perry on Keybase 20211220  10:59pm EST The parameters you pass into the puzzle (&amp;quot;defconstant&amp;quot; and &amp;quot;TARGET_AMOUNT&amp;quot; in your example) are the puzzle&amp;#039;s solution. If you curry one of these parameters, you are hard-coding it into the solution, and therefore into the puzzle as well.  You won&amp;#039;t always know what all of these values will be at the time of the coin&amp;#039;s creation, so currying them isn&amp;#039;t always an option. Any p...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==== Return to: [[Insightful_Comments]] ====&lt;br /&gt;
&amp;lt;h1&amp;gt;1.&amp;lt;/h1&amp;gt;Dan Perry on Keybase 20211220  10:59pm EST&lt;br /&gt;
The parameters you pass into the puzzle (&amp;quot;defconstant&amp;quot; and &amp;quot;TARGET_AMOUNT&amp;quot; in your example) are the puzzle's solution. If you curry one of these parameters, you are hard-coding it into the solution, and therefore into the puzzle as well.&lt;br /&gt;
&lt;br /&gt;
You won't always know what all of these values will be at the time of the coin's creation, so currying them isn't always an option. Any part of the solution that has not been curried has to be supplied when the coin is spent. (In order to spend a coin, you must provide the original puzzle, a valid solution, and usually a signature)&lt;br /&gt;
&lt;br /&gt;
While a farmer cannot change the puzzle (because doing so would change the puzzlehash), a farmer can attempt to change any of the non-curried values in the solution. You should make sure that if those values do get changed, the spend will fail. The way you do this is with announcements, which are covered in the chialisp docs: https://chialisp.com/docs/coins_spends_and_wallets&lt;br /&gt;
&lt;br /&gt;
This video shows you how to use announcements to secure your coins: https://www.youtube.com/watch?v=_SBGfMZhRd8&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h1&amp;gt;2.&amp;lt;/h1&amp;gt;gneale notes 20211221&lt;br /&gt;
Technique for securing multiple coin spends with announcements commonly uses creating puzzlehash announcement while assert a coin announcement.&lt;br /&gt;
&lt;br /&gt;
See:&lt;br /&gt;
https://github.com/geoffwalmsley/CreatorNFT/blob/912ce88d75f89357141260aad2dd1626038f7d60/clsp/creator_nft.clsp#L64&lt;br /&gt;
 	       (list CREATE_PUZZLE_ANNOUNCEMENT payment_info) ;; Announce the p2 coin id&lt;br /&gt;
 (list ASSERT_COIN_ANNOUNCEMENT (sha256 payment_info (sha256tree new_state))) ;; Assert the p2_coin spend&lt;br /&gt;
&lt;br /&gt;
See also:&lt;br /&gt;
https://github.com/xch-gallery/nft-companion/blob/3ec7748f3cd6834ea97fd46fde6d119f30ab566b/ownable_singleton/clsp/ownable_singleton.clsp#L27&lt;br /&gt;
          (list CREATE_PUZZLE_ANNOUNCEMENT payment_id) ; Inform the payment coin of this spend&lt;br /&gt;
          (list ASSERT_COIN_ANNOUNCEMENT (sha256 payment_id new_owner_pubkey)) ; Assert that the payment coin is being spent and validate the owner&lt;/div&gt;</summary>
		<author><name>Gneale</name></author>
	</entry>
</feed>