Skip to main content
This document explains all the events emitted by use of the product. Both the pool and the factory emit events to make it easier for offchain tools to monitor the state and activity of the contracts. See IEvents.sol.

Pool Events

LP Fees Collected

Emitted when LP fees have been collected by the owner of the pool.
event LPFeesCollected(address indexed _collector, uint256 indexed _amount);

ALTBC Pool Deployed

Emitted when an ALTBC pool has been deployed.
event ALTBCPoolDeployed(
    address indexed _xToken,
    address indexed _yToken,
    string indexed _version,
    uint16 _lpFee,
    uint16 _protocolFee,
    address _protocolFeeCollector,
    uint256 _maxXTokenSupply,
    ALTBCInput _tbcInput,
    bool _liquidityRemovalAllowed,
    address sender
);

Protocol Fee Collector Confirmed

Emitted when protocol fee collector has been confirmed.
event ProtocolFeeCollectorConfirmed(address indexed _collector);

Protocol Fee Collector Proposed

Emitted when protocol fee collector has been proposed.
event ProtocolFeeCollectorProposed(address indexed _collector);

Swap

Emitted when a swap has been made.
event Swap(address indexed _tokenIn, uint256 indexed _amountIn, uint256 indexed _amountOut, uint256 _minOut);

Factory Events

Address Allowed

Emitted when a token or deployer is added to the allow list.
event AddressAllowed(address indexed _address, bool indexed _allowed);

Pool Created

Emitted when the factory has deployed a pool.
event PoolCreated(address indexed _pool);

ALTBC Pool Factory Deployed

Emitted when an ALTBC factory has been deployed.
event ALTBCFactoryDeployed(string indexed _version);

Protocol Fee Collector Confirmed

Emitted when protocol fee collector has been confirmed.
event ProtocolFeeCollectorConfirmed(address indexed _collector);

Protocol Fee Collector Proposed

Emitted when protocol fee collector has been proposed.
event ProtocolFeeCollectorProposed(address indexed _collector);

Revenue Withdrawn

Emitted when the owner of the pool withdraws revenue accrued.
event RevenueWithdrawn(address indexed _collector, uint256 indexed _amount);

Liquidity Withdrawn

Emitted when the owner of a position withdraws liquidity from the pool.
event LiquidityWithdrawn(address indexed _collector, uint256 indexed tokenId, uint256 indexed amountOutXToken, uint256 indexed amountOutYToken, uint256 revenue);

LP Token Minted

Emitted when a new LP token is minted.
event LPTokenMinted(address indexed _lp, uint256 indexed tokenId, packedFloat wj, packedFloat hn);

LP Token Burned

Emitted when an LP token is burned.
event LPTokenBurned(address indexed _lp, uint256 indexed tokenId, uint256 indexed initialLiquidityWj);

Fees Generated

Emitted when fees have been generated. Includes the amount of LP fees, protocol fees, and revenue generated.
event FeesGenerated(uint256 indexed lpFee, uint256 indexed protocolFee, uint256 indexed revenue);

Allow List Deployed

Emitted when the allow list is deployed.
event AllowListDeployed();

Set Deployer Allow List

Emitted when the deployer allow list is set.
event SetDeployerAllowList(address indexed _allowedList);

Fees Collected

Emitted when fees have been collected. Includes the type of fee collected (LP or Protocol), the collector, and the amount collected.
event FeeSet(FeeCollectionType indexed _feeType, address indexed _collector, uint256 indexed _amount);

Fee Set

Emitted when the fee value for swaps has been updated. Includes the type of fee (LP or Protocol) and the new fee value.
event FeeSet(FeeCollectionType indexed _feeType, uint16 indexed _fee);

Set Y Token Allow List

Emitted when the Y token allow list is set.
event SetYTokenAllowList(address indexed _allowedList);

Non Native Events

These events are not native to the protocol but are emitted by the protocol, usually imported by other libraries.

Initialized

Emitted when the contract has been initialized.
event Initialized(uint64 version);

Ownership Transferred

Emitted when the ownership of the contract has been transferred. This is used in the Ownable2Step contract and the Ownable contract.
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

Paused

Emitted when the contract has been paused.
event Paused(address account);

Unpaused

Emitted when the contract has been unpaused.
event Unpaused(address account);

Transfer ERC20

Emitted when a ERC20 token transfer occurs.
event Transfer(address indexed from, address indexed to, uint256 value);

Approval ERC20

Emitted when a ERC20 token approval occurs.
event Approval(address indexed owner, address indexed spender, uint256 value);

Transfer ERC721

Emitted when a ERC721 token transfer occurs.
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

Approval ERC721

Emitted when a ERC721 token approval occurs.
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

Approval For All ERC721

Emitted when a ERC721 token approval for all occurs.
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

Architecture

Please visit next page for Architecture.