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

Track Order Execution on closeEpoch and executeEpoch #142

Closed
lucasvo opened this issue Jul 27, 2021 · 0 comments
Closed

Track Order Execution on closeEpoch and executeEpoch #142

lucasvo opened this issue Jul 27, 2021 · 0 comments

Comments

@lucasvo
Copy link
Member

lucasvo commented Jul 27, 2021

Epochs are either fully executed in closeEpoch or in executeEpoch depending on whether 100% fulfillment of the orders is possible. If yes, closeEpoch increases the epoch count is increased by one in lastEpochExecuted. If not, execution happens at a later point and the subgraph triggers should not be run until executeEpoch is called.

When the epoch is executed, we should iterate over all investors with pending orders and update how much of their oder has been filled (the result of calcDisburse) and create a Tinlake Transactoin object that tracks the new investment.

When such an event occurs, we should create a Transaction object for each investor with a pending order as described in #143

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

No branches or pull requests

2 participants