-
Notifications
You must be signed in to change notification settings - Fork 3
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/get opn migration #31
Merged
Merged
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
Fuel is now spent directly on mint rather than at check-in or invalidation post Economics 2.1 migration so this means that currenReservedFuel will always be 0 post-migration. This fix sets this to zero after the migration takes place and ensures that it is not counted upwards from version 2.1 onwards.
Previous version would double count events as we use the same event factory address so we need to keep the EventImplementation singular (or place an endBlock at the top of each EventImplementation V2 mapping). These combines the two to toggle behaviour depending on the upgrade block.
The migration of GET to OPN is on a 1:1000 ratio. We chose to historically represent all fuel as OPN therefore multiplying all GET readings by 1e3.
We refer to the dark days as the timeline between v2.1 and v2.2 of the contracts. Due to the change in our fuel pricing model - from an average pricing to a FIFO pricing - we had difficulty accurately tracking the fuel used in USD for a sale/resale. Previously, this was easily calculated by the average integrator price and the fuel tokens. This was no longer possible after v2.1. We have provided a fix by externally tracking the fuel prices of an integrator during the dark days and use that for fuel deductions. A more permanent solution was introduced in the v2.2 contracts which is to include the fuel used in USD on sale/resale events.
- Merged the abis for the v2.2 and v2 events - Fixed wrong tracking fuel balances for IntegratorDay entity - Update startblock for v2.2 on development
This reverts commit 1ca0d32.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request includes several updates, with the primary focus on migrating from GET to OPN. Historically, we reinterpreted all instances of GET as OPN using a 1:1000 conversion rate, accompanied by an adjustment of fuel prices.
Key changes include:
GET to OPN Migration: We transitioned from GET to OPN, applying a 1:1000 conversion rate between GET and OPN. Fuel prices have been readjusted accordingly to reflect this change.
Soft Deprecation of the Price Variable: The price variable on integrator entities has been soft-deprecated. Contracts now emit fuel usage in USD, aligning with our shift from an average fuel price model on top-ups to a FIFO fuel model.
Accurate Tracking of Fuel Usage: All events for version 2.2 (the latest iteration of fuel economics) now accurately track fuel usage in USD.
Average Fuel Usage Calculation for v2.1 Events: We externally calculated the average fuel used by integrators between v2.1 and v2.2 and used this data for calculations on v2.1 events. Events prior to v2.1 continue to use the average integrator prices for USD calculations.