Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/strategies/ShortStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ abstract contract ShortStrategy is IShortStrategy, BaseStrategy {
function getLatestBalances(uint256 lastFeeIndex, uint256 borrowedInvariant, uint256 lpBalance, uint256 lastCFMMInvariant, uint256 lastCFMMTotalSupply) public virtual override view
returns(uint256 lastLPBalance, uint256 lastBorrowedLPBalance, uint256 lastBorrowedInvariant) {
lastBorrowedInvariant = accrueBorrowedInvariant(borrowedInvariant, lastFeeIndex);
lastBorrowedLPBalance = convertInvariantToLPRoundUp(lastBorrowedInvariant, lastCFMMTotalSupply, lastCFMMInvariant);
lastBorrowedLPBalance = convertInvariantToLPRoundUp(lastBorrowedInvariant, lastCFMMTotalSupply, lastCFMMInvariant);
lastLPBalance = lpBalance + lastBorrowedLPBalance;
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/strategies/base/BaseBorrowStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ abstract contract BaseBorrowStrategy is BaseLongStrategy {
uint256 lpInvariant = convertLPToInvariant(lpTokenBalance, lastCFMMInvariant, lastCFMMTotalSupply);
s.LP_INVARIANT = uint128(lpInvariant);

// Add CFMM LP tokens borrowed (principal) plus origination fee to pool's total CFMM LP tokens borrowed including accrued interest
s.LP_TOKEN_BORROWED_PLUS_INTEREST = s.LP_TOKEN_BORROWED_PLUS_INTEREST + lpTokens + lpTokenOrigFee;
// convert borrowedInvariant including origination fee and accrued interest to CFMM LP tokens
s.LP_TOKEN_BORROWED_PLUS_INTEREST = convertInvariantToLPRoundUp(borrowedInvariant, lastCFMMTotalSupply, lastCFMMInvariant);

liquidity = liquidity + liquidityBorrowed;
if(liquidity < initLiquidity) revert MinBorrow();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gammaswap/v1-core",
"version": "1.2.15",
"version": "1.2.16",
"description": "Core smart contracts for the GammaSwap V1 protocol",
"homepage": "https://gammaswap.com",
"scripts": {
Expand Down
Loading