Skip to content

Conversation

@newtectonics
Copy link
Contributor

No description provided.

"""

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.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@iwyrkore iwyrkore Jun 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@newtectonics I would think so. Shouldn't it just be a list of Positions instead of separate lists of tokens and balances?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants