# HegicModule.sol

## How to Get the Intrinsic Value of an Option in USDC

```solidity
    function getOptionValue(uint id) public returns (uint positionValue) {
        if (isOptionActive(id) && getExpirationTime(id) > block.timestamp) {
            uint profit = getPayOffAmount(id);
            positionValue = assetExchangerUSDCetoUSDC.getInputPositionValue(profit);
        }
    }
```

## How to Get the intrinsic value of an option in USDC.e

```solidity
    function getPayOffAmount(uint tokenID) private view returns (uint) {
        (, IHegicStrategy strategy, , , ) = operationalTreasury.lockedLiquidity(tokenID);
        return strategy.payOffAmount(tokenID);
    } 
```
