You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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)
The text was updated successfully, but these errors were encountered: