asdasd
Opened this issue · 1 comments
JADcooler commented
diff --git a/tokenomics/contracts/Depository.sol b/tokenomics/contracts/Depository.sol
index f9c7d64..f5d7b35 100644
--- a/tokenomics/contracts/Depository.sol
+++ b/tokenomics/contracts/Depository.sol
@@ -327,7 +327,7 @@ contract Depository is IErrorsTokenomics {
// Decrease the supply for the amount of payout
supply -= payout;
product.supply = uint96(supply);
-
+
// Create and add a new bond, update the bond counter
bondId = bondCounter;
mapUserBonds[bondId] = Bond(msg.sender, uint96(payout), uint32(maturity), uint32(productId));
diff --git a/tokenomics/contracts/GenericBondCalculator.sol b/tokenomics/contracts/GenericBondCalculator.sol
index 4a0286d..be49e07 100644
--- a/tokenomics/contracts/GenericBondCalculator.sol
+++ b/tokenomics/contracts/GenericBondCalculator.sol
@@ -54,7 +54,7 @@ contract GenericBondCalculator {
// overall: 64 + 53 + 104 = 221 < 256 - regular case if LP is balanced, and 64 + 147 + 10 = 221 < 256 if unbalanced
// mulDiv will correctly fit the total amount up to the value of max uint256, i.e., max of priceLP and max of tokenAmount,
// however their multiplication can not be bigger than the max of uint192
- uint256 totalTokenValue = mulDiv(priceLP, tokenAmount, 1);
+ uint256 totalTokenValue = mulDiv(priceLP, tokenAmount, 1); // basically the priceLP (reserve0 / totalSupply)
// Check for the cumulative LP tokens value limit
if (totalTokenValue > type(uint192).max) {
revert Overflow(totalTokenValue, type(uint192).max);
diff --git a/tokenomics/contracts/Tokenomics.sol b/tokenomics/contracts/Tokenomics.sol
index 2ef2708..7eb1513 100644
--- a/tokenomics/contracts/Tokenomics.sol
+++ b/tokenomics/contracts/Tokenomics.sol
@@ -654,6 +654,10 @@ contract Tokenomics is TokenomicsConstants, IErrorsTokenomics {
// reward = (pendingRelativeReward * rewardUnitFraction) / 100
uint256 totalIncentives = mapUnitIncentives[unitType][unitId].pendingRelativeReward;
if (totalIncentives > 0) {
+ //@audit if pendingRelativeReward*rewardUnitFraction < 100, user loses his pending rewards
:
JADcooler commented
function gfd() public {
}