Skip to main content

Overview

Pulend uses upgradeable proxy contracts built with OpenZeppelin and Foundry.

LendingPool

The main contract managing collateral, borrowing, and liquidations. Address: 0x01316834f5B709D5B5f5cc5691FD6AA71b232AD8View on Arbiscan

User Functions

// Deposit NFT as collateral
function supplyCollateral(uint256 tokenId) external;

// Withdraw NFT (requires healthy position)
function withdrawCollateral(uint256 tokenId) external;

// Borrow tokens against collateral
function borrow(uint256 amount) external;

// Repay borrowed amount
function repay(uint256 amount) external;

// Supply liquidity to earn interest
function supplyLiquidity(uint256 amount) external;

// Withdraw supplied liquidity
function withdrawLiquidity(uint256 shares) external;

View Functions

// Get user's collateral token IDs
function userCollateralTokenIds(address user) external view returns (uint256[]);

// Get user's borrow balance
function userBorrowAssets(address user) external view returns (uint256);

// Get user's supply shares
function userSupplyShares(address user) external view returns (uint256);

// Get total supply/borrow
function totalSupplyAssets() external view returns (uint256);
function totalBorrowAssets() external view returns (uint256);

Events

EventDescription
SupplyCollateralNFT deposited as collateral
WithdrawCollateralNFT withdrawn
BorrowTokens borrowed
RepayLoan repaid
SupplyLiquidityLiquidity supplied
WithdrawLiquidityLiquidity withdrawn
LiquidationPosition liquidated

InterestRateModel

Calculates dynamic interest rates based on utilization. Address: 0x6C6311DF4aAd49262eDbC41ABFa828935BF9DbbBView on Arbiscan
function calculateBorrowRate(
    address lendingPool
) external view returns (uint256);

function calculateSupplyRate(
    address lendingPool
) external view returns (uint256);

IsHealthy

Helper contract to check position health. Address: 0x93890c2abA1434d3105652baaE9A37630e81b065View on Arbiscan
function isHealthy(
    address user,
    address lendingPool
) external view returns (bool);

Router

Entry point for batched operations. Address: 0xe03ceC7a0cf54685a991FE0b000df7814D8aF8A6View on Arbiscan

ABIs

Contract ABIs are available in:
  • Frontend: frontend/lib/abis/
  • Indexer: indexer/abis/