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

IncreaseDebt and decreasedebt events are removed they are used by backend . #292

Open
harsh-98 opened this issue Oct 5, 2024 · 9 comments
Assignees

Comments

@harsh-98
Copy link
Collaborator

harsh-98 commented Oct 5, 2024

image
@lekhovitsky
Copy link
Collaborator

@harsh-98 they were always coming in pair with nearly identical events in the pool:

borrowedAmound and repaidAmount here, however, refer to debt principal, so interest etc. is not included. Exact transfer amounts can be extracted from Transfer events if the underlying token.

@harsh-98
Copy link
Collaborator Author

harsh-98 commented Oct 6, 2024

One pool can have many credit managers. And pools and credit managers are synced separately in backend. Since we have events for withdraw/addcollateral in multicall, it will be nice to still have increase/decrease debt to keep events consistent for all creditfacade operations. The backend already supports.

@lekhovitsky
Copy link
Collaborator

The code is frozen so can't add them anyways.

@lekhovitsky
Copy link
Collaborator

One pool can have many credit managers.

Still can map pool events uniquely to multicalls since they are emitted in the same tx (between StartMulticall and FinishMulticall events, in an extreme case if one tx performs multiple multicalls).

@harsh-98
Copy link
Collaborator Author

harsh-98 commented Oct 6, 2024

frozen for security audit?

can u add later?

@lekhovitsky
Copy link
Collaborator

The audit is completed, so more like terminally frozen unless we discover a critical security vulnerability.

@harsh-98
Copy link
Collaborator Author

harsh-98 commented Oct 6, 2024

One pool can have many credit managers.

Still can map pool events uniquely to multicalls since they are emitted in the same tx (between StartMulticall and FinishMulticall events, in an extreme case if one tx performs multiple multicalls).

Can do. But all four application(gearbox-ws,go-liquidator,third-eye,gpointbot) already supports increaseDebt/decreaseDebt. It will be messy to track on pools and send the info to credit manager logic.

@harsh-98
Copy link
Collaborator Author

harsh-98 commented Oct 6, 2024

There is another problem, that i have mentioned in the governance repo. The creditFacade is not set on creditmanager initialization. Gearbox-protocol/governance#11. Previously SetCreditFacade emit has emitted when cm was initialized and creditFacade was set. Now both are missing. Atleast creditFacade field should be set.

@harsh-98
Copy link
Collaborator Author

harsh-98 commented Oct 6, 2024

One pool can have many credit managers.

Still can map pool events uniquely to multicalls since they are emitted in the same tx (between StartMulticall and FinishMulticall events, in an extreme case if one tx performs multiple multicalls).

Can do. But all four application(gearbox-ws,go-liquidator,third-eye,gpointbot) already supports increaseDebt/decreaseDebt. It will be messy to track on pools and send the info to credit manager logic.

This i will do, as it saves gas for the user. So, worth the effort. But consider the not-initialized creditFacade field on credit manager.

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