Skip to main content

Receipt token

Tracks and manages collateral using a shares model.

View Methods

BUY_COLLATERAL_RATIO

function BUY_COLLATERAL_RATIO() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

COLLATERAL_MARGIN_RATIO

function COLLATERAL_MARGIN_RATIO() external view returns (int256)

Ratio at which a position is margin called (100% collateralization)

Returns

NameTypeDescription
_0int256undefined

COMMISSION_FEE

function COMMISSION_FEE() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

DECIMALS

function DECIMALS() external view returns (uint256)

Decimals for all computation (1 basis point precision)

Returns

NameTypeDescription
_0uint256undefined

DECIMALS_128

function DECIMALS_128() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

DETAILS

function DETAILS() external view returns (string)

Returns

NameTypeDescription
_0stringundefined

EXERCISE_COST

function EXERCISE_COST() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

MIN_LIQUIDATION_RATIO

function MIN_LIQUIDATION_RATIO() external view returns (int256)

Returns

NameTypeDescription
_0int256undefined

SATURATED_POOL_UTILIZATION

function SATURATED_POOL_UTILIZATION() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

SELL_COLLATERAL_RATIO

function SELL_COLLATERAL_RATIO() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

TARGET_POOL_UTILIZATION

function TARGET_POOL_UTILIZATION() external view returns (int128)

Returns

NameTypeDescription
_0int128undefined

allowance

function allowance(address owner, address spender) external view returns (uint256)

See {IERC20-allowance}.

Parameters

NameTypeDescription
owneraddressundefined
spenderaddressundefined

Returns

NameTypeDescription
_0uint256undefined

baseRequirement

function baseRequirement(uint128 value, uint256 long, uint64 utilization) external pure returns (uint128 required)

Base collateral requirement. TODO: make this a function of the pool utilization factor?

Parameters

NameTypeDescription
valueuint128undefined
longuint256undefined
utilizationuint64undefined

Returns

NameTypeDescription
requireduint128undefined

buyCollateralRatio

function buyCollateralRatio(int128 utilization) external pure returns (int128 buyRatio)

Returns the collateral ratio that is paid when a long option is minted at a specific pool utilization

This is computed at the time the position is minted

Parameters

NameTypeDescription
utilizationint128undefined

Returns

NameTypeDescription
buyRatioint128undefined

checkCollateral

function checkCollateral(address user, uint128 totalAmount, uint128 movedAmount, int128 premium, uint256 offset, uint256[] positionIdList) external view returns (uint256 tokenData, uint64 utilization)

Ensures that the user has enough collateral

Parameters

NameTypeDescription
useraddressundefined
totalAmountuint128undefined
movedAmountuint128undefined
premiumint128undefined
offsetuint256undefined
positionIdListuint256[]undefined

Returns

NameTypeDescription
tokenDatauint256undefined
utilizationuint64undefined

checkHealth

function checkHealth(address user, uint256[] positionIdList, uint256 offset, int128 premium) external view returns (uint256 tokenData)

Check collateral requirement and return a LeftRight packaged output

tonkenData returns tokenRequired in the right slot and balanceOf(user) in the left slot

Parameters

NameTypeDescription
useraddressundefined
positionIdListuint256[]undefined
offsetuint256undefined
premiumint128undefined

Returns

NameTypeDescription
tokenDatauint256undefined

collectedFees

function collectedFees() external view returns (int128)

Returns the amount of token that have been collected (does not count towards available balance)

Returns

NameTypeDescription
_0int128undefined

commissionRate

function commissionRate() external view returns (int128 commissionFee)

Returns

NameTypeDescription
commissionFeeint128undefined

computeBonus

function computeBonus(address account, uint256[] positionIdList, uint256 otherTokenData, uint160 sqrtPriceX96, int128 premium) external view returns (int256 bonusRatio, uint256 tokenData)

Called when an account is liquidated. Bonus depends on degree of distress (100% bonus at 105% collateral?)

Parameters

NameTypeDescription
accountaddressundefined
positionIdListuint256[]undefined
otherTokenDatauint256undefined
sqrtPriceX96uint160undefined
premiumint128undefined

Returns

NameTypeDescription
bonusRatioint256undefined
tokenDatauint256undefined

convertToAssets

function convertToAssets(uint256 shares) external view returns (uint128)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint128undefined

convertToShares

function convertToShares(uint128 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint128undefined

Returns

NameTypeDescription
_0uint256undefined

decimals

function decimals() external view returns (uint8)

Returns the underlying token's decimals

Returns

NameTypeDescription
_0uint8undefined

delegatedAmount

function delegatedAmount(address) external view returns (int256)

Tracks the amount of shares delegated BY a user (negative balance) or TO a user (positive balance) (address user0 => uint256 shares)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0int256undefined

delegatedShares

function delegatedShares(address delegator, address delegatee) external view returns (uint256)

Returns the amount of shares that have been delegated from delegator to delegatee.

Parameters

NameTypeDescription
delegatoraddressundefined
delegateeaddressundefined

Returns

NameTypeDescription
_0uint256undefined

delegation

function delegation(address, address) external view returns (uint256)

Tracks the amount of shares delegated from address0 to address 1 (address user0 => address user1 => uint256 shares)

Parameters

NameTypeDescription
_0addressundefined
_1addressundefined

Returns

NameTypeDescription
_0uint256undefined

exerciseCost

function exerciseCost(int24 currentTick, uint256 tokenId) external view returns (int128 exerciseFee)

Parameters

NameTypeDescription
currentTickint24undefined
tokenIduint256undefined

Returns

NameTypeDescription
exerciseFeeint128undefined

getPositionCollateralAtTick

function getPositionCollateralAtTick(uint256 tokenId, uint128 numberOfContracts, int24 tick, uint128 poolUtilizations) external view returns (uint128)

returns the token required for a specific tokenIdt

Parameters

NameTypeDescription
tokenIduint256undefined
numberOfContractsuint128undefined
tickint24undefined
poolUtilizationsuint128undefined

Returns

NameTypeDescription
_0uint128undefined

getUserRequiredCollateral

function getUserRequiredCollateral(address user, uint256[] positionIdList, uint256 offset) external view returns (uint128 tokenRequired)

returns the token required for the entire account

Parameters

NameTypeDescription
useraddressundefined
positionIdListuint256[]undefined
offsetuint256undefined

Returns

NameTypeDescription
tokenRequireduint128undefined

inAMM

function inAMM() external view returns (int128)

Returns the amount of token in the sent to the Uniswap pool (inside the AMM)

Returns

NameTypeDescription
_0int128undefined

liquidationBonus

function liquidationBonus(uint256 balance, uint256 sharesRequired) external view returns (int256 bonus)

Parameters

NameTypeDescription
balanceuint256undefined
sharesRequireduint256undefined

Returns

NameTypeDescription
bonusint256undefined

maxDeposit

function maxDeposit(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

maxMint

function maxMint(address) external view returns (uint256)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0uint256undefined

maxRedeem

function maxRedeem(address user) external view returns (uint256)

Parameters

NameTypeDescription
useraddressundefined

Returns

NameTypeDescription
_0uint256undefined

maxWithdraw

function maxWithdraw(address user) external view returns (uint256)

Parameters

NameTypeDescription
useraddressundefined

Returns

NameTypeDescription
_0uint256undefined

name

function name() external view returns (string)

Returns the name of the underlying token

Returns

NameTypeDescription
_0stringundefined

owner

function owner() external view returns (address)

Returns the owner of this contract, which should be the Panoptic Pool this got deployed from.r

Returns

NameTypeDescription
_0addressundefined

panopticPool

function panopticPool() external view returns (contract IPanopticPool)

Returns

NameTypeDescription
_0contract IPanopticPoolundefined

poolUtilization

function poolUtilization() external view returns (int128)

Returns the fraction of the pool that is locked and not available

1bps precision. Adding a 1 in the denominator has no sizable effect (?) and prevents division by zero

Returns

NameTypeDescription
_0int128undefined

poolUtilization

function poolUtilization(int128 amountRemoved) external view returns (int128)

Returns the fraction of the pool that is locked and not available if amountRemoved is moved to AMM

1bps precision. Adding a 1 in the denominator has no sizable effect (?) and prevents division by zero

Parameters

NameTypeDescription
amountRemovedint128undefined

Returns

NameTypeDescription
_0int128undefined

prefix

function prefix() external view returns (string)

Returns

NameTypeDescription
_0stringundefined

previewDeposit

function previewDeposit(uint128 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint128undefined

Returns

NameTypeDescription
_0uint256undefined

previewMint

function previewMint(uint256 shares) external view returns (uint128)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint128undefined

previewRedeem

function previewRedeem(uint256 shares) external view returns (uint256)

Parameters

NameTypeDescription
sharesuint256undefined

Returns

NameTypeDescription
_0uint256undefined

previewWithdraw

function previewWithdraw(uint256 assets) external view returns (uint256)

Parameters

NameTypeDescription
assetsuint256undefined

Returns

NameTypeDescription
_0uint256undefined

sellCollateralRatio

function sellCollateralRatio(int128 utilization) external pure returns (int128 sellRatio)

Returns the collateral ratio that is paid when a short option is minted at a specific pool utilization

This is computed at the time the position is minted

Parameters

NameTypeDescription
utilizationint128undefined

Returns

NameTypeDescription
sellRatioint128undefined

symbol

function symbol() external view returns (string)

Returns the symbol of the underlying token

Returns

NameTypeDescription
_0stringundefined

tickSpacing

function tickSpacing() external view returns (int24)

Returns

NameTypeDescription
_0int24undefined

totalBalance

function totalBalance() external view returns (uint256)

Returns the total balance of underlying token availale in the Panoptic pool

This is the total balance MINUS the amount of collected fees (because they are reserved for short options) PLUS the amount of tokens moved to the AMM.

Returns

NameTypeDescription
_0uint256undefined

totalSupply

function totalSupply() external view returns (uint256)

See {IERC20-totalSupply}.

Returns

NameTypeDescription
_0uint256undefined

underlyingToken

function underlyingToken() external view returns (address)

Address of the underlying token

This has to be equal to token0 or token1 from the uniswapPool

Returns

NameTypeDescription
_0addressundefined

uniswapPool

function uniswapPool() external view returns (contract IUniswapV3Pool)

Returns

NameTypeDescription
_0contract IUniswapV3Poolundefined

Methods - onlyOwner

burn

function burn(address from, uint256 amount) external nonpayable

Burn receipt tokens from some user

Parameters

NameTypeDescription
fromaddressAddress of the user that gets the receipt tokens burn
amountuint256Amount of receipt tokens that will get burned

delegate

function delegate(address delegator, address delegatee, uint128 assets) external nonpayable returns (uint256 shares)

Parameters

NameTypeDescription
delegatoraddressundefined
delegateeaddressundefined
assetsuint128undefined

Returns

NameTypeDescription
sharesuint256undefined

depositToken

function depositToken(address _user, uint128 _assets) external nonpayable returns (uint256 shares)

Deposit tokens into the Panoptic pool

Parameters

NameTypeDescription
_useraddressAddress of the user that deposits the token
_assetsuint128Amount of assets to be deposited

Returns

NameTypeDescription
sharesuint256undefined

exerciseAddData

function exerciseAddData(address optionOwner, uint128 borrowedAssets, int128 transactedAmount, int128 collectedAmount, int128 premium) external nonpayable returns (int128 tokenToPay)

To be issued when a position is burnt because it may need to be exercised

Parameters

NameTypeDescription
optionOwneraddressundefined
borrowedAssetsuint128undefined
transactedAmountint128undefined
collectedAmountint128undefined
premiumint128undefined

Returns

NameTypeDescription
tokenToPayint128undefined

mint

function mint(address to, uint256 amount) external nonpayable

Mint new receipt tokens to some user

Parameters

NameTypeDescription
toaddressAddress of the user that gets the receipt tokens
amountuint256Amount of receipt tokens that will get minted

revoke

function revoke(address delegator, address delegatee, int256 bonus, int128 premium, uint256[] delegateePositionIdList) external nonpayable returns (uint256 adjustedShares, uint128 adjustedAssets)

must always revoke all

Parameters

NameTypeDescription
delegatoraddressundefined
delegateeaddressundefined
bonusint256undefined
premiumint128undefined
delegateePositionIdListuint256[]undefined

Returns

NameTypeDescription
adjustedSharesuint256undefined
adjustedAssetsuint128undefined

startToken

function startToken(address underlyingAddress) external nonpayable

Initialized a new token after a Panoptic Pool has been created

Parameters

NameTypeDescription
underlyingAddressaddressundefined

swapTakeCommissionAddData

function swapTakeCommissionAddData(address optionOwner, uint128 borrowedAssets, int128 transactedAmount) external nonpayable returns (int128 rate)

To be issued when a position is burnt because it may need to be exercised

Parameters

NameTypeDescription
optionOwneraddressundefined
borrowedAssetsuint128undefined
transactedAmountint128undefined

Returns

NameTypeDescription
rateint128undefined

takeCommissionAddData

function takeCommissionAddData(address optionOwner, uint128 borrowedAssets) external nonpayable returns (int128 rate)

To be issued when a position is minted

Parameters

NameTypeDescription
optionOwneraddressundefined
borrowedAssetsuint128undefined

Returns

NameTypeDescription
rateint128undefined

withdrawToken

function withdrawToken(address _user, uint256 shares, int128 _premium, uint256[] _positionIdList) external nonpayable returns (uint128 _assets)

Withdraws tokens from the Panoptic pool

Takes into consideration the delegated tokens, cannot withdraw delegated balance

Parameters

NameTypeDescription
_useraddressAddress of the user that deposits the token
sharesuint256undefined
_premiumint128Amount of premium collected/owed by _user
_positionIdListuint256[]List of positions owned by _user. Written as [tokenId1, tokenId2, ...]

Returns

NameTypeDescription
_assetsuint128undefined

Events

Approval

event Approval(address indexed owner, address indexed spender, uint256 value)

Parameters

NameTypeDescription
owner indexedaddressundefined
spender indexedaddressundefined
valueuint256undefined

Transfer

event Transfer(address indexed from, address indexed to, uint256 value)

Parameters

NameTypeDescription
from indexedaddressundefined
to indexedaddressundefined
valueuint256undefined

ABI

ReceiptBase ABI
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "BUY_COLLATERAL_RATIO",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "COLLATERAL_MARGIN_RATIO",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "COMMISSION_FEE",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DECIMALS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DECIMALS_128",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "DETAILS",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EXERCISE_COST",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_LIQUIDATION_RATIO",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SATURATED_POOL_UTILIZATION",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "SELL_COLLATERAL_RATIO",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "TARGET_POOL_UTILIZATION",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint128",
"name": "value",
"type": "uint128"
},
{
"internalType": "uint256",
"name": "long",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "utilization",
"type": "uint64"
}
],
"name": "baseRequirement",
"outputs": [
{
"internalType": "uint128",
"name": "required",
"type": "uint128"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int128",
"name": "utilization",
"type": "int128"
}
],
"name": "buyCollateralRatio",
"outputs": [
{
"internalType": "int128",
"name": "buyRatio",
"type": "int128"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "int128",
"name": "longAmount",
"type": "int128"
},
{
"internalType": "int128",
"name": "shortAmount",
"type": "int128"
},
{
"internalType": "int128",
"name": "premium",
"type": "int128"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "positionIdList",
"type": "uint256[]"
}
],
"name": "checkCollateral",
"outputs": [
{
"internalType": "uint256",
"name": "tokenData",
"type": "uint256"
},
{
"internalType": "uint64",
"name": "utilization",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "uint256[]",
"name": "positionIdList",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
},
{
"internalType": "int128",
"name": "premium",
"type": "int128"
}
],
"name": "checkHealth",
"outputs": [
{
"internalType": "uint256",
"name": "tokenData",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "collectedFees",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "commissionRate",
"outputs": [
{
"internalType": "int128",
"name": "commissionFee",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "positionIdList",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "otherTokenData",
"type": "uint256"
},
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "uint160",
"name": "sqrtPriceX96",
"type": "uint160"
},
{
"internalType": "int128",
"name": "premium",
"type": "int128"
}
],
"name": "computeBonus",
"outputs": [
{
"internalType": "int256",
"name": "bonusRatio",
"type": "int256"
},
{
"internalType": "uint256",
"name": "tokenData",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "computePoolData",
"outputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "currentTotalBalance",
"type": "uint256"
},
{
"internalType": "int256",
"name": "insideAMM",
"type": "int256"
},
{
"internalType": "int256",
"name": "totalCollectedFees",
"type": "int256"
},
{
"internalType": "int128",
"name": "currentPoolUtilization",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "convertToAssets",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint128",
"name": "assets",
"type": "uint128"
}
],
"name": "convertToShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "subtractedValue",
"type": "uint256"
}
],
"name": "decreaseAllowance",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegator",
"type": "address"
},
{
"internalType": "address",
"name": "delegatee",
"type": "address"
},
{
"internalType": "uint128",
"name": "assets",
"type": "uint128"
}
],
"name": "delegate",
"outputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "delegatedAmount",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegator",
"type": "address"
},
{
"internalType": "address",
"name": "delegatee",
"type": "address"
}
],
"name": "delegatedShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "delegation",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_user",
"type": "address"
},
{
"internalType": "uint128",
"name": "_assets",
"type": "uint128"
}
],
"name": "depositToken",
"outputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "optionOwner",
"type": "address"
},
{
"internalType": "int128",
"name": "movedAssets",
"type": "int128"
},
{
"internalType": "int128",
"name": "transactedAmount",
"type": "int128"
},
{
"internalType": "int128",
"name": "collectedAmount",
"type": "int128"
},
{
"internalType": "int128",
"name": "premium",
"type": "int128"
}
],
"name": "exerciseAddData",
"outputs": [
{
"internalType": "int128",
"name": "tokenToPay",
"type": "int128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "exerciseCost",
"outputs": [
{
"internalType": "int128",
"name": "exerciseFee",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "numberOfContracts",
"type": "uint128"
},
{
"internalType": "int24",
"name": "tick",
"type": "int24"
},
{
"internalType": "uint128",
"name": "poolUtilizations",
"type": "uint128"
}
],
"name": "getPositionCollateralAtTick",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
},
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "uint256[]",
"name": "positionIdList",
"type": "uint256[]"
},
{
"internalType": "uint256",
"name": "offset",
"type": "uint256"
}
],
"name": "getUserRequiredCollateral",
"outputs": [
{
"internalType": "uint128",
"name": "tokenRequired",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "inAMM",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "addedValue",
"type": "uint256"
}
],
"name": "increaseAllowance",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "sharesRequired",
"type": "uint256"
}
],
"name": "liquidationBonus",
"outputs": [
{
"internalType": "int256",
"name": "bonus",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "maxDeposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "maxMint",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "maxRedeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "maxWithdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "panopticPool",
"outputs": [
{
"internalType": "contract IPanopticPool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolUtilization",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "int128",
"name": "amountRemoved",
"type": "int128"
}
],
"name": "poolUtilization",
"outputs": [
{
"internalType": "int128",
"name": "",
"type": "int128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "prefix",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint128",
"name": "assets",
"type": "uint128"
}
],
"name": "previewDeposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "previewMint",
"outputs": [
{
"internalType": "uint128",
"name": "",
"type": "uint128"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
}
],
"name": "previewRedeem",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "assets",
"type": "uint256"
}
],
"name": "previewWithdraw",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "delegator",
"type": "address"
},
{
"internalType": "address",
"name": "delegatee",
"type": "address"
},
{
"internalType": "int24",
"name": "currentTick",
"type": "int24"
},
{
"internalType": "int256",
"name": "bonus",
"type": "int256"
},
{
"internalType": "int128",
"name": "premium",
"type": "int128"
},
{
"internalType": "uint256[]",
"name": "delegateePositionIdList",
"type": "uint256[]"
}
],
"name": "revoke",
"outputs": [
{
"internalType": "uint256",
"name": "adjustedShares",
"type": "uint256"
},
{
"internalType": "uint128",
"name": "adjustedAssets",
"type": "uint128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "int128",
"name": "utilization",
"type": "int128"
}
],
"name": "sellCollateralRatio",
"outputs": [
{
"internalType": "int128",
"name": "sellRatio",
"type": "int128"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "underlyingAddress",
"type": "address"
}
],
"name": "startToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "optionOwner",
"type": "address"
},
{
"internalType": "int128",
"name": "movedAssets",
"type": "int128"
},
{
"internalType": "int128",
"name": "transactedAmount",
"type": "int128"
}
],
"name": "swapTakeCommissionAddData",
"outputs": [
{
"internalType": "int128",
"name": "rate",
"type": "int128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "optionOwner",
"type": "address"
},
{
"internalType": "int128",
"name": "movedAssets",
"type": "int128"
}
],
"name": "takeCommissionAddData",
"outputs": [
{
"internalType": "int128",
"name": "rate",
"type": "int128"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "tickSpacing",
"outputs": [
{
"internalType": "int24",
"name": "",
"type": "int24"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "underlyingToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "uniswapPool",
"outputs": [
{
"internalType": "contract IUniswapV3Pool",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_user",
"type": "address"
},
{
"internalType": "int24",
"name": "_currentTick",
"type": "int24"
},
{
"internalType": "uint256",
"name": "shares",
"type": "uint256"
},
{
"internalType": "int128",
"name": "_premium",
"type": "int128"
},
{
"internalType": "uint256[]",
"name": "_positionIdList",
"type": "uint256[]"
}
],
"name": "withdrawToken",
"outputs": [
{
"internalType": "uint128",
"name": "_assets",
"type": "uint128"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
]