Last active
May 23, 2024 02:17
-
-
Save coffiasd/d129d572e056df3210dd9dc4d4a4c3b4 to your computer and use it in GitHub Desktop.
SettleLongPremium is incorrectly implemented: premium should be deducted instead of added
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
import "hardhat/console.sol"; | |
contract Panotic{ | |
function exercise( | |
int128 realizedPremium | |
) external pure returns (int128) { | |
int256 tokenToPay = -realizedPremium; | |
if (tokenToPay > 0) { | |
console.log("burn user shares"); | |
} else if (tokenToPay < 0) { | |
console.log("mint user shares."); | |
} | |
return 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment