Copy interface IUSDi is IERC4626 {
// Liquidity management
function deposit (
address liquidityToken ,
uint256 amount
) external returns ( bool );
function withdraw (
address liquidityToken ,
uint256 amount
) external returns ( bool );
// Lending and borrowing
function issueLoan (
address recipient ,
uint256 amount ,
uint256 rate ,
uint256 term ,
bytes calldata data
) external returns ( uint256 loanId);
function repayLoan ( uint256 loanId , uint256 amount) external returns ( bool );
// Yield distribution
function distributeYield () external returns ( bool );
// View functions
function getCollateralRatio (
address account
) external view returns ( uint256 );
function getAccountLiquidity (
address account
) external view returns ( uint256 );
function getUtilizationRate () external view returns ( uint256 );
function getCrossChainProtocolLiquidity () external view returns ( uint256 );
// Events
event LiquidityDeposited (
address indexed account,
address indexed liquidityToken,
uint256 amount
);
event LiquidityWithdrawn (
address indexed account,
address indexed liquidityToken,
uint256 amount
);
event LoanIssued (
uint256 indexed loanId,
address indexed recipient,
uint256 amount,
uint256 rate,
uint256 term,
bytes data
);
event LoanRepaid (
uint256 indexed loanId,
address indexed account,
uint256 amount
);
event YieldDistributed ( uint256 amount);
}