Smart Contract Integration
This page describes how to integrate Illuminate into your smart contracts with examples.
Looking up markets
address marketPlace = 0x9A74762723685c5EEE2f94b80a427dE1bf029426;
// To look up a market, you will need the maturity and underlying for a given market.
// In this example, we'll look up information about the USDC-MAR23 market.
uint256 maturity = 1680393600; // ~April 02, 2023
address underlying = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; // USDC
// First, we'll look up the supported principal tokens for the market.
// To do so, call the markets method on the MarketPlace contract. This method takes
// in an underlying, maturity and principal enum. The enum value, defined below,
// returns the PT for a given market. A null address is returned if there is no PT
// for that particular market.
enum Principals {
Illuminate, // 0
Swivel, // 1
Yield, // 2
Element, // 3
Pendle, // 4
Tempus, // 5
Sense, // 6
Apwine, // 7
Notional // 8
}
// To look up Pendle's PT for the USDC-MAR23 market:
address pendlePT = IMarketPlace(marketPlace).markets(underlying, maturity, 4);
// Additionally, we can get the Yield Space Pool for the Illuminate principal token
// by calling the pools method:
address iptPool = IMarketPlace(marketPlace).pools(underlying, maturity);
Lending
Minting
Redeeming
Swapping
Swapping with EIP4626 (EIP5095) Interfaces
Checking for Paused States
Last updated