Pool Operations
IPoolV3
import {IPoolV3} from "@gearbox-protocol/core-v3/contracts/interfaces/IPoolV3.sol";
IPoolV3 pool = IPoolV3(poolAddress);ERC-4626 Standard Functions
Deposit
function deposit(uint256 assets, address receiver) external returns (uint256 shares);// Approve underlying first
IERC20(underlying).approve(address(pool), assets);
// Deposit and receive shares
uint256 shares = pool.deposit(assets, msg.sender);
// Preview how many shares you'd receive
uint256 expectedShares = pool.previewDeposit(assets);Deposit with Referral
Mint
Withdraw
Redeem
Gearbox Extensions
Diesel Rate (Share Price)
Interest Rates
Liquidity State
Underlying Asset
Maximum Operations
Credit Manager Interaction
Related Contracts
Quota Keeper
Interest Rate Model
Complete Example
Last updated
