-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: twap-like function for balance #1
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job!
We need to find a better name for this, since as we discussed, we're not talking about price. Maybe TWAB?
You're missing a mamushi format pass! Don't format there's a bug with 0.3.10 files.
Regarding the organisation of unit tests what I like to do is (will document this later):
- one folder per contract/module (i.e.
RewardsHandler.vy
goes intotests/unitary/rewards_handler
- in the folder, one file per function, both internal and externals (i.e.
tests/unitary/rewards_handler/test_<function_name>
) - one test per branch (happy path is called
test_default_behavior
)
Pull Request Summary
.pre-commit-config.yaml
andpyproject.toml
to use a 120 character line width.contracts/TWAP.vy
for time-weighted rate tracking using trapezoidal interpolation.contracts/RewardsHandler.vy
to integrate time-weighted rate calculations.tests/unitary/test_twap.py
to validate the TWAP functionality and correctness.