Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify which keyword usage is in which keyword scope #1523

Open
erights opened this issue Aug 17, 2020 · 2 comments
Open

Clarify which keyword usage is in which keyword scope #1523

erights opened this issue Aug 17, 2020 · 2 comments
Labels
audit-zestival Vulnerability assessment of ERTP + Zoe Zoe package: Zoe

Comments

@erights
Copy link
Member

erights commented Aug 17, 2020

With a lot of our uses of various keyword records, it is often not clear, or easy to forget, which keyword namespace these keywords are relative to. Here in particular, the from and the to are wrt two different seats that have two different keyword namespaces. However, having fromLosses default to toGains is only correct if the keyword namespaces agree. This will be easy to miss under maintenance --- that the absence of this argument means that the keyword namespaces of these two seats cannot evolve independently.

Altogether, I'm surprised by how big calcNewAllocations is, and how big its caller, trade, is.

_Originally posted by @erights in #1414 (comment)

@katelynsills katelynsills added the Zoe package: Zoe label Aug 17, 2020
@katelynsills
Copy link
Contributor

Let's investigate using a helper to compare the keywords of the seats in swap. Or somehow declare that a contract has consistent keywords. Consider assertions of using the same keywords in different seats.

@katelynsills
Copy link
Contributor

Perhaps shouldn't be able to use the defaulting in trade without some assertion of the keywords of the seats being the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audit-zestival Vulnerability assessment of ERTP + Zoe Zoe package: Zoe
Projects
None yet
Development

No branches or pull requests

4 participants