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
4 changes: 2 additions & 2 deletions contracts/strategies/vault/VaultShortStrategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ contract VaultShortStrategy is CPMMShortStrategy, VaultBaseStrategy, IVaultShort
}
// Total amount of GS LP tokens issued after protocol fees are paid
assets = totalAssets(_params.BORROWED_INVARIANT, _params.LP_TOKEN_BALANCE +
convertInvariantToLP(_params.RESERVED_BORROWED_INVARIANT, _params.lastCFMMTotalSupply, _params.lastCFMMInvariant),
convertInvariantToLPRoundUp(_params.RESERVED_BORROWED_INVARIANT, _params.lastCFMMTotalSupply, _params.lastCFMMInvariant),
_params.latestCfmmInvariant, _params.latestCfmmTotalSupply, lastFeeIndex);

// Calculates total CFMM LP tokens, including accrued interest, using state variables
Expand All @@ -116,7 +116,7 @@ contract VaultShortStrategy is CPMMShortStrategy, VaultBaseStrategy, IVaultShort
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 = convertInvariantToLP(lastBorrowedInvariant, lastCFMMTotalSupply, lastCFMMInvariant);
lastBorrowedLPBalance = convertInvariantToLPRoundUp(lastBorrowedInvariant, lastCFMMTotalSupply, lastCFMMInvariant);
lastLPBalance = lpBalance + lastBorrowedLPBalance;
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gammaswap/v1-implementations",
"version": "1.2.14",
"version": "1.2.15",
"description": "Pool and strategies implementation contracts for GammaSwap V1 protocol",
"homepage": "https://gammaswap.com",
"scripts": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"typescript": "^4.7.4"
},
"dependencies": {
"@gammaswap/v1-core": "^1.2.14",
"@gammaswap/v1-core": "^1.2.16",
"@openzeppelin/contracts": "^4.7.0"
}
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,10 @@
"@ethersproject/properties" "^5.7.0"
"@ethersproject/strings" "^5.7.0"

"@gammaswap/v1-core@^1.2.14":
version "1.2.14"
resolved "https://npm.pkg.github.com/download/@gammaswap/v1-core/1.2.14/a282b6841d31b06e9625f5dc3b979668febf1b5b#a282b6841d31b06e9625f5dc3b979668febf1b5b"
integrity sha512-CwsxyLQZmSPKiXWNllyaVXC+xIoX7agcWOF99l6V0gJCKfsNZfzNmiZzGzLQG46sOxa2Se1NPey4o/lOH/TNQg==
"@gammaswap/v1-core@^1.2.16":
version "1.2.16"
resolved "https://npm.pkg.github.com/download/@gammaswap/v1-core/1.2.16/c2b0db6f20caaccb7c6059a70a8e65f6cb072551#c2b0db6f20caaccb7c6059a70a8e65f6cb072551"
integrity sha512-ZnH3H7KlxRbxhjbSH199JSiPpK6j/7F6JtBoFRz+zTJP+lf8RQwwj6TmTa8dwMI1tLPeUx4zxV9W0IKCPuCesw==
dependencies:
"@openzeppelin/contracts" "^4.7.0"

Expand Down
Loading