This repository has been archived by the owner on May 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #611 from keep-network/fee-bump-step
Increase redemption fee by a step from the two latest events Deposit requires the fee to be bumped by the constant value equal to the initial redemption fee. To obtain the initial fee we looked for the very first event, we also need the latest event. It worked fine until there were multiple fee increases and the number of blocks to reach the first event exceeded 10k that is a default limitation for getPastEvents. In such situation, the first event that was returned wasn't actually the very first event registered on-chain for the deposit. To overcome this issue we decided to calculate the initial fee as a delta between fees of the two latest events, as the step value is constant for each fee increase.
- Loading branch information
Showing
2 changed files
with
68 additions
and
47 deletions.
There are no files selected for viewing
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
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