-
Notifications
You must be signed in to change notification settings - Fork 9
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
refactor: addressing interim internal audit findings #182
Conversation
kupermind
commented
Jul 29, 2024
- Addressing interim internal audit findings;
- Adjusting tests.
refactor and test: addressing C4R issue 26
chore: update tokenomics implementation address
…incentives for removed nominee epoch
chore: testing bridge interactions
V1.2.2 internal audit
refactor: addressing C4R issues 56 and 27
refactor and test: addressing C4R issue 38
refactor and test: addressing C4R issue 61
refactor: addressing C4R issue 67
refactor and test: addressing C4R issues 32 and 5
refactor: addressing C4R issues 45 and 4
refactor: addressing C4R issue 29
refactor and test: addressing issue 20
refactor and test: addressing C4R issue 22
doc: catch up on changes
chore: adding scripts to update owners on L2
chore: staking deployment scripts
@@ -225,6 +227,17 @@ contract Depository is ERC721, IErrorsTokenomics { | |||
} | |||
} | |||
|
|||
/// @dev Sets minimum OLAS leftover amount for the product to keep the supply. | |||
/// @param _minOLASLeftoverAmount Updated minimum OLAS leftover amount. | |||
function setMinOLASLeftoverAmount(uint256 _minOLASLeftoverAmount) external { |
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.
Maybe need to add a variable in the constructor as well.
uint256 totalDonationPower = mapDonationPoints[epochNum].totalDonationPower; | ||
totalIncentives *= totalTopUpsOLAS * mapEpochTokenomics[epochNum].unitPoints[unitType].topUpUnitFraction; | ||
totalIncentives = mapUnitIncentives[unitType][unitId].topUp + (totalIncentives / (totalDonationPower * 100)); | ||
// topUp = (pendingRelativeTopUp * totalUnitTopUps * topUpUnitFraction) / sumTopUpUnitFractions, if totalDonationPower > totalUnitTopUps |
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.
Adjusted calculations according to the doc, tests prove their correctness.
} | ||
mapDonationPoints[eCounter].totalDonationPower = uint96(accountTopUps); | ||
|
||
// Record total unit top-ups and fractions in a settled epoch |
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.
totalUnitTopUps
and the sum of fractions need to be recorded. The total veOLAS donation power is recorded throughout the epoch in the tracking function.