This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arjun-io
force-pushed
the
arjun/add-value-events
branch
from
April 28, 2023 17:46
675975c
to
8fc86a7
Compare
arjun-io
force-pushed
the
arjun/add-value-events
branch
from
April 29, 2023 17:57
5facb22
to
fc2f19e
Compare
arjun-io
force-pushed
the
arjun/param-delegate
branch
from
April 29, 2023 17:58
fe119b5
to
309109c
Compare
arjun-io
force-pushed
the
arjun/add-value-events
branch
from
April 29, 2023 18:00
fc2f19e
to
2dc6fc7
Compare
kbrizzle
reviewed
Apr 30, 2023
if (!positionFee.isZero()) controller().collateral().settleAccount(account, Fixed18Lib.from(-1, positionFee)); | ||
if (!positionFee.isZero()) { | ||
controller().collateral().settleAccount(account, Fixed18Lib.from(-1, positionFee)); | ||
emit PositionFeeCharged(account, latestOracleVersion.version, positionFee); |
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.
nit: should we move these to always call as well like we do for MakeClosed
etc?
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.
Yeah I think that does make more sense, especially since we're emitting 0 value events elsewhere
Unit Test Coverage ReportCoverage after merging arjun/add-value-events into dev2 will be
Coverage Report
|
kbrizzle
approved these changes
May 1, 2023
arjun-io
added a commit
that referenced
this pull request
May 17, 2023
* Add AccessControlledCoordinatorOwner periphery contract * remove funding and position fee updates from param admin * fix integration test * add natspec, test to transfer ownership * Add fee and accumulator events * emit PositionFeeCharged event on 0 value fees
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds 4 new events to the Product contract
PositionFeeCharged(version, amount)
- when a use opens/closes a position which results in a non-zero position feeFundingAccumulated(latestVersion, toVersion, (maker, taker), fee)
- when funding accumulates as part of the settlement accumulation phasePositionAccumulated(latestVersion, toVersion, (maker, taker))
- when position based pnl accumulates as part of the settlement accumulation phasePositionFeeAccumulated(latestVersion, toVersion, (maker, taker), fee)
- when position fees accumulate (to makers) as part of the settlement accumulation phase. Note that the taker amount will (currently) always be 0, but we are including it for consistencyNote that since currently Solidity library events are included in the ABI (issue here) - manual ABI patching will be necessary until the bug is fixed
Also bumps the Product.sol to Solidity version 0.8.19 for contract sizing requirements.
Settlement gas usage before:
After: