OptionRewardStorage

Git Source

State Variables

STORAGE_SLOT

bytes32 internal constant STORAGE_SLOT = keccak256("premia.contracts.storage.OptionReward");

Functions

layout

function layout() internal pure returns (Layout storage l);

toTokenDecimals

Adjust decimals of a value with 18 decimals to match the token decimals

function toTokenDecimals(Layout storage l, UD60x18 value, bool isBase) internal view returns (uint256);

fromTokenDecimals

Adjust decimals of a value with token decimals to 18 decimals

function fromTokenDecimals(Layout storage l, uint256 value, bool isBase) internal view returns (UD60x18);

Structs

Layout

struct Layout {
    IOptionPS option;
    uint8 baseDecimals;
    uint8 quoteDecimals;
    address base;
    address quote;
    IOracleAdapter oracleAdapter;
    IPaymentSplitter paymentSplitter;
    UD60x18 percentOfSpot;
    UD60x18 penalty;
    uint256 optionDuration;
    uint256 lockupDuration;
    uint256 claimDuration;
    mapping(address user => mapping(UD60x18 strike => mapping(uint64 maturity => UD60x18 amount))) redeemableLongs;
    mapping(UD60x18 strike => mapping(uint64 maturity => UD60x18 amount)) totalUnderwritten;
    mapping(UD60x18 strike => mapping(uint64 maturity => UD60x18 amount)) rewardPerContract;
    uint256 totalBaseReserved;
    mapping(UD60x18 strike => mapping(uint64 maturity => uint256 amount)) baseReserved;
    UD60x18 fee;
    address feeReceiver;
}