Inverse Bonding Curve
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.
Events
CurveInitialized
CurveInitialized
Emitted at inverse bonding curve initialization.
from*
address
Address of initializer
reserveTokenAddress*
address
Contract address of reserve asset
reserve
uint256
Reserve value at initialization
supply
uint256
Supply value at initialization
initialPrice
uint256
ibAsset price at initialization
parameterInvariant
uint256
Curve invariant at initialization
* = indexable
LiquidityAdded
LiquidityAdded
Emitted when new liquidity has been added to the inverse bonding curve.
from*
address
Address of LP
recipient*
address
Address that received minted LP tokens
amountIn
uint256
Amount of reserve assets added
amountOut
uint256
Amount of LP tokens minted
newParameterInvariant
uint256
Curve invariant after LP addition
* = indexable
LiquidityRemoved
LiquidityRemoved
Emitted when liquidity has been removed from the inverse bonding curve.
from*
address
Address of LP
recipient*
address
Address that received removed reserves
amountIn
uint256
Amount of LP tokens burnt
reserveAmountOut
uint256
Amount of reserve assets withdrawn
inverseTokenCredit
uint256
ibAsset credit of LP prior to removal
inverseTokenBurned
uint256
Amount of ibAssets burnt
newParameterInvariant
uint256
Curve invariant after LP removal
* = indexable
TokenStaked
TokenStaked
Emitted when ibAssets are staked.
from*
address
Address of staker
recipient*
address
Address to stake ibAssets to
amount
uint256
Stake amount
* = indexable
TokenUnstaked
TokenUnstaked
Emitted when ibAssets are unstaked.
from*
address
Address of unstaker
recipient*
address
Address to receive unstaked ibAssets
amount
uint256
Unstake amount
* = indexable
TokenBought
TokenBought
Emitted when ibAssets are bought / minted.
from*
address
Address of buyer / minter
recipient*
address
Receiver of minted ibAssets
amountIn
uint256
Reserve asset amount used in buy
amountOut
uint256
ibAsset amount minted from buy
* = indexable
TokenSold
TokenSold
Emitted when ibAssets are sold / burnt.
from*
address
Address of seller / burner
recipient*
address
Receiver of returned reserve assets
amountIn
uint256
ibAsset amount burnt in sell
amountOut
uint256
Reserve asset amount returned in sell
* = indexable
RewardClaimed
RewardClaimed
Emitted when accrued LP and ibAsset staking rewards are claimed.
from*
address
Address of reward claimer
recipient*
address
Address receiving claimed rewards
inverseTokenAmount
uint256
Amount of rewards in ibAssets
reserveAmount
uint256
Amount of rewards in reserve assets
* = indexable
State-Changing Functions
addLiquidity
addLiquidity
Adds liquidity reserves to the inverse bonding curve.
recipient
address
Address to receive LP tokens
reserveIn
uint256
Amount of reserve assets provided for liquidity add
priceLimits
uint256[2]
Minimum and maximum ibAsset prices to conduct LP - reverts if ibAsset price is lower or higher than specified values
removeLiquidity
removeLiquidity
Removes liquidity reserves from the inverse bonding curve.
recipient
address
Address to receive removed reserve assets
inverseTokenIn
uint256
Amount of additional ibAssets posted for LP removal
priceLimits
uint256[2]
Minimum and maximum ibAsset prices to conduct LP - reverts if ibAsset price is lower or higher than specified values
buyTokens
buyTokens
Buys / mints new ibAsset tokens with provided reserve assets.
recipient
address
Address to receive minted ibAssets
reserveIn
uint256
Amount of reserve assets provided for minting
exactAmountOut
uint256
Exact amount ibAssets to be minted
priceLimits
uint256[2]
Minimum and maximum effective ibAsset buy prices to conduct buy - reverts if buy price is lower or higher than specified values
reserveLimits
uint256[2]
Minimum and maximum curve reserve amounts to conduct buy - reverts if the curve's reserves are lower or higher than specified values
sellTokens
sellTokens
Sells / burns ibAsset tokens to receive reserve assets.
recipient
address
Address to receive reserve assets
inverseTokenIn
uint256
Amount of ibAssets to burn
priceLimits
uint256[2]
Minimum and maximum effective ibAsset sell prices to conduct sell - reverts if sell price is lower or higher than specified values
reserveLimits
uint256[2]
Minimum and maximum curve reserve amounts to conduct sell - reverts if the curve's reserves are lower or higher than specified values
stake
stake
Stakes specified amount of ibAssets.
recipient
address
Address to stake ibAssets to
amount
uint256
Amount of ibAssets to stake
unstake
unstake
Unstakes specified amount of ibAssets.
recipient
uint256
Address to receive unstaked ibAssets
amount
uint256
Amount of ibAssets to unstake
claimReward
claimReward
Claims accrued LP and staking rewards.
recipient
address
Address to receive accrued rewards
Read-Only Functions
liquidityPositionOf
liquidityPositionOf
Gets the LP position data for the specified address.
account
address
Address of account to fetch LP position information
stakingBalanceOf
stakingBalanceOf
Gets the staked ibAsset amount for the specified address.
account
address
Address of holder to get ibAsset staking balance
inverseTokenAddress
inverseTokenAddress
Gets the contract address of the relevant ibAsset token contract.
reserveTokenAddress
reserveTokenAddress
Gets the contract address of the relevant reserve asset token contract.
curveParameters
curveParameters
Gets the parameter values of the inverse bonding curve.
rewardOf
rewardOf
Gets the accrued reward amounts for the specified address.
recipient
address
Address to check accrued rewards
rewardOfProtocol
rewardOfProtocol
Gets the accrued reward amounts of the protocol creator.
totalStaked
totalStaked
Gets the total staked ibAsset amount.
rewardEMAPerSecond
rewardEMAPerSecond
Gets the EMA-adjusted per-token per-second reward amounts for the specified reward type.
rewardState
rewardState
Gets the total reward information for the entire protocol.
Last updated