Conversation
credmark/cmf/types/pool.py
Outdated
| """ | ||
|
|
||
| tokens: Tokens = DTOField(description="The tokens that are stored in the pool.") | ||
| balances: List[float] = DTOField(description="The balances that are stored in the pool.") |
There was a problem hiding this comment.
An open question is do we want a Pool object to have a list of positions that get more attributes as they get more specific?
There was a problem hiding this comment.
There was a problem hiding this comment.
@newtectonics I would think so. Shouldn't it just be a list of Positions instead of separate lists of tokens and balances?
There was a problem hiding this comment.
I would prefer this flat structure of lists of value, instead of embedding object. This would make it easier to be converted to a pandas' data frame.
There was a problem hiding this comment.
The problem is keeping the lists in sync (matching indices) and adding more attributes as @newtectonics mentioned. Also, even looping through them you need to do a zip or more complicated loop handling.
There was a problem hiding this comment.
@newtectonics This seems to be a Contract containing a Portfolio which is a list of Positions (amount (float) and asset (Token)). Should we not reuse those DTOs here?
No description provided.