Skip to content

Commit

Permalink
fix getCumulativeOfferData
Browse files Browse the repository at this point in the history
  • Loading branch information
0xddong committed Jul 4, 2024
1 parent 47d843d commit 2e8dae0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/TermAuctionList.sol
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,12 @@ library TermAuctionList {
/// @dev offer processed, but auctionClosed not yet called and auction is new so repoToken not on List and wont be picked up
/// checking repoTokenAuctionRates to make sure we are not double counting on re-openings
if (offer.termAuction.auctionCompleted() && repoTokenListData.auctionRates[offer.repoToken] == 0) {
// set offerAmount to pending offer amount
uint256 repoTokenAmountInBaseAssetPrecision = RepoTokenUtils.getNormalizedRepoTokenAmount(
// use normalized repo token amount if repo token is not in the list
offerAmount = RepoTokenUtils.getNormalizedRepoTokenAmount(
offer.repoToken,
ITermRepoToken(offer.repoToken).balanceOf(address(this)),
purchaseTokenPrecision
);
offerAmount = RepoTokenUtils.calculatePresentValue(
repoTokenAmountInBaseAssetPrecision,
purchaseTokenPrecision,
RepoTokenList.getRepoTokenMaturity(offer.repoToken),
RepoTokenList.getAuctionRate(termController, ITermRepoToken(offer.repoToken))
);
}
}

Expand Down

0 comments on commit 2e8dae0

Please sign in to comment.