Post-conditions allow/deny mode #1359
Replies: 3 comments 7 replies
-
I am all for security, and prefer the deny mode. A dry run tool/button "See what transfers will happen?" could be helpful to verify the expected transfers by running the function as read-only as proposed in stacks-network/stacks-core#1641 |
Beta Was this translation helpful? Give feedback.
-
I think that wallet should allow developer to choose which mode he want to use. |
Beta Was this translation helpful? Give feedback.
-
I'm personally not sure whether we should support "allow" mode in the long run, for the security reasons that @jasperjansz cites and with the optimism that we may iron out these issues with surfacing data about SIP-010 tokens and the like. However, I'm inclined to suggest that we do support this mode in the short-to-medium run given @psq's apparent need for it – and combined with the general philosophy of supporting more possibilities so we can then learn from their real-world usage. Right now, it seems that we frame post conditions in the UI the exact same whether the transaction is taking place in "allow" or "deny" mode. This itself is confusing since in "allow" mode, the data shown in the UI is simply guidance (and the contract might do whatever it wants in reality). I believe @philipdesmedt mentioned that he uses post conditions and "allow" mode for Arkadiko so the user has a best guess as to what will happen, but his contracts also have more flexibility for their actual execution. I suggest we do two things differently for "allow" mode:
|
Beta Was this translation helpful? Give feedback.
-
This discussion is about the post-conditions mode in the web wallet. We're looking to get feedback from developers to help decide our implementation.
Context: Post-conditions are a tool to protect users from bugs in contracts that make unexpected transfers from their account. The web wallet can evaluate post-conditions in two modes:
Read more about how post-conditions work here.
When we first drafted the designs for transaction signing in the web wallet, we decided the web wallet would evaluate post-conditions in deny mode always. This would mean that unless an app specifies post-conditions, no transfers can be made from the user's account. We would show the specified post-conditions and the user would learn that the transfers that show up on this screen are always what will happen, a boost to user experience and security:
The flipside is that an app developer would always need to specify post-conditions.
Discussion: We would like to learn about any difficulties of stricly deny mode would cause you as a developer, what your preferred method of evaluating post conditions would be and why. Besides the web wallet being in strictly allow or deny mode, there's also the option of enabling the app to set the mode and the wallet showing a warning if the app chose allow mode.
Beta Was this translation helpful? Give feedback.
All reactions