The Inverse Bonding Curve contract is responsible for handling mints and burns of ibAssets. The contract stores the balance of the relevant reserve assets, used for the mints and burns.
A Inverse Bonding Curve contract is deployed per ibAsset type. New Inverse Bonding Curve contracts are deployed through the IBC Factory contract.
CurveInitialized
Emitted at inverse bonding curve initialization.
Copy event CurveInitialized (
address indexed from ,
address indexed reserveTokenAddress
uint256 reserve ,
uint256 supply ,
uint256 initialPrice ,
uint256 parameterInvariant
); Contract address of reserve asset
Reserve value at initialization
Supply value at initialization
ibAsset price at initialization
Curve invariant at initialization
* = indexable
Emitted when new liquidity has been added to the inverse bonding curve.
Address that received minted LP tokens
Amount of reserve assets added
Amount of LP tokens minted
Curve invariant after LP addition
* = indexable
LiquidityRemoved
Emitted when liquidity has been removed from the inverse bonding curve.
Address that received removed reserves
Amount of LP tokens burnt
Amount of reserve assets withdrawn
ibAsset credit of LP prior to removal
Curve invariant after LP removal
* = indexable
Emitted when ibAssets are staked.
Address to stake ibAssets to
* = indexable
Emitted when ibAssets are unstaked.
Address to receive unstaked ibAssets
* = indexable
Emitted when ibAssets are bought / minted.
Address of buyer / minter
Receiver of minted ibAssets
Reserve asset amount used in buy
ibAsset amount minted from buy
* = indexable
Emitted when ibAssets are sold / burnt.
Address of seller / burner
Receiver of returned reserve assets
ibAsset amount burnt in sell
Reserve asset amount returned in sell
* = indexable
Emitted when accrued LP and ibAsset staking rewards are claimed.
Address of reward claimer
Address receiving claimed rewards
Amount of rewards in ibAssets
Amount of rewards in reserve assets
* = indexable
State-Changing Functions
Adds liquidity reserves to the inverse bonding curve.
Address to receive LP tokens
Amount of reserve assets provided for liquidity add
Minimum and maximum ibAsset prices to conduct LP - reverts if ibAsset price is lower or higher than specified values
removeLiquidity
Removes liquidity reserves from the inverse bonding curve.
Address to receive removed reserve assets
Amount of additional ibAssets posted for LP removal
Minimum and maximum ibAsset prices to conduct LP - reverts if ibAsset price is lower or higher than specified values
Buys / mints new ibAsset tokens with provided reserve assets.
Address to receive minted ibAssets
Amount of reserve assets provided for minting
Exact amount ibAssets to be minted
Minimum and maximum effective ibAsset buy prices to conduct buy - reverts if buy price is lower or higher than specified values
Minimum and maximum curve reserve amounts to conduct buy - reverts if the curve's reserves are lower or higher than specified values
Sells / burns ibAsset tokens to receive reserve assets.
Address to receive reserve assets
Amount of ibAssets to burn
Minimum and maximum effective ibAsset sell prices to conduct sell - reverts if sell price is lower or higher than specified values
Minimum and maximum curve reserve amounts to conduct sell - reverts if the curve's reserves are lower or higher than specified values
Stakes specified amount of ibAssets.
Address to stake ibAssets to
Amount of ibAssets to stake
Unstakes specified amount of ibAssets.
Address to receive unstaked ibAssets
Amount of ibAssets to unstake
Claims accrued LP and staking rewards.
Address to receive accrued rewards
Read-Only Functions
liquidityPositionOf
Gets the LP position data for the specified address.
Address of account to fetch LP position information
Amount of LP Tokens owned by account
Amount of ibAsset credit owned by account
stakingBalanceOf
Gets the staked ibAsset amount for the specified address.
Address of holder to get ibAsset staking balance
Amount of staked ibAssets
inverseTokenAddress
Gets the contract address of the relevant ibAsset token contract.
Contract address of the relevant ibAsset token contract
reserveTokenAddress
Gets the contract address of the relevant reserve asset token contract.
Contract address of the relevant reserve asset token contract
curveParameters
Gets the parameter values of the inverse bonding curve.
Inverse bonding curve parameters
CurveParameters
Liquidity reserve of curve
Current total supply of LP tokens
Current spot price of ibAsset
Current curve invariant of curve
Gets the accrued reward amounts for the specified address.
Address to check accrued rewards
Accrued ibAsset rewards for LP position
Accrued ibAsset rewards for staked ibAssets
Accrued reserve asset rewards for LP position
Accrued reserve asset rewards for staked ibAssets
rewardOfProtocol
Gets the accrued reward amounts of the protocol creator.
Accrued ibAsset rewards to protocol creator
Accrued reserve asset rewards to protocol creator
Gets the total staked ibAsset amount.
Total amount of staked ibAssets
rewardEMAPerSecond
Gets the EMA-adjusted per-token per-second reward amounts for the specified reward type.
Type of rewards to specify
Reward type is LP rewards
Reward type is ibAsset staking rewards
Reward type is protocol creator rewards
Per-second amount of ibAsset rewards accrued per-token for the specified reward type
Per-second amount of reserve asset rewards accrued per-token for the specified reward type
Gets the total reward information for the entire protocol.
uint256[MAX_FEE_TYPE_COUNT][MAX_FEE_STATE_COUNT]
Total reward amount accrued
uint256[MAX_FEE_TYPE_COUNT][MAX_FEE_STATE_COUNT]
Total reward amount accrued, but yet to be claimed