PawLend Protocol
Technical Whitepaper v1.0
Abstract
PawLend is a decentralized, non-custodial lending protocol deployed on the Retrochain blockchain. The protocol enables users to supply cryptocurrency assets to earn interest and borrow assets against their collateral. A unique feature of PawLend is the PawShare initiative, which automatically directs 20% of protocol fees to verified cat rescue organizations, creating positive real-world impact through DeFi operations.
Table of Contents
- 1. Introduction
- 2. Protocol Architecture
- 3. Interest Rate Model
- 4. Risk Management
- 5. Liquidation Mechanism
- 6. PawShare Initiative
- 7. Governance
- 8. Security
- 9. Technical Specifications
- 10. Conclusion
1. Introduction
1.1 Background
Decentralized finance (DeFi) has revolutionized financial services by removing intermediaries and enabling peer-to-peer transactions through smart contracts. Lending protocols are among the most successful DeFi primitives, with billions of dollars in total value locked (TVL).
PawLend builds upon proven lending protocol designs while introducing innovations in fee distribution and charitable giving, deployed on Retrochain's energy-efficient blockchain infrastructure.
1.2 Objectives
- Provide efficient, decentralized lending and borrowing services
- Ensure protocol security through comprehensive risk management
- Create sustainable yield opportunities for liquidity providers
- Direct protocol revenue toward verified charitable causes
- Maintain transparent, auditable operations on-chain
1.3 Key Features
- Non-custodial: Users maintain full control of their private keys
- Over-collateralized: All loans require collateral exceeding debt value
- Dynamic rates: Interest rates adjust based on market utilization
- Instant liquidity: Withdraw supplied assets anytime (if available)
- Composable: ERC-20 compatible, integrates with other protocols
- Charitable: 20% of fees support cat rescue initiatives
2. Protocol Architecture
2.1 Core Components
PawLend Contract
The main protocol contract that handles deposits, withdrawals, borrows, repayments, and liquidations. Maintains market state and user positions.
Interest Rate Model
Calculates borrow and supply APY based on utilization rate. Implemented as a separate module for flexibility and upgradability.
Price Oracle
Provides real-time asset prices for collateral valuation and liquidation triggers. Uses Uniswap V3 TWAP (Time-Weighted Average Price) for manipulation resistance.
PawShare Wallet
Dedicated smart contract wallet that automatically receives 20% of protocol reserves for charitable distribution.
2.2 User Positions
Each user's position is tracked with three key values:
- depositAmount: Total tokens supplied by the user
- borrowPrincipal: Original amount borrowed (excluding interest)
- borrowIndexRay: Interest index at time of borrow (for calculating accrued interest)
2.3 Market State
Each asset market maintains:
- totalDeposits: Sum of all user deposits
- totalBorrows: Sum of all outstanding borrows (excluding interest)
- borrowIndexRay: Cumulative interest index (RAY precision: 27 decimals)
- lastUpdateTime: Timestamp of last interest accrual
- isListed: Whether the asset is approved for lending
- collateralFactorBps: Maximum LTV ratio (basis points)
- liquidationBonusBps: Incentive for liquidators
3. Interest Rate Model
3.1 Utilization Rate
The utilization rate determines how much of the available supply is currently borrowed:
Where U ranges from 0% (no borrows) to 100% (fully utilized).
3.2 Borrow APY
Borrow interest rate increases with utilization to incentivize supply:
The kink model creates two slopes: moderate rates below optimal utilization, steep rates above to prevent liquidity crisis.
3.3 Supply APY
Suppliers earn a portion of borrower interest based on utilization and reserve factor:
The reserve factor (e.g., 10%) captures protocol revenue while passing most interest to suppliers.
3.4 Interest Accrual
Interest compounds continuously using an index-based system:
User's actual debt = borrowPrincipal × (currentIndex / userIndex)
4. Risk Management
4.1 Collateral Factor
Each asset has a collateral factor (CF) representing the maximum loan-to-value (LTV) ratio:
4.2 Health Factor
A user's health factor determines their liquidation risk:
4.3 Oracle Price Feeds
Asset prices are determined by Uniswap V3 TWAP oracles to prevent manipulation:
- Time-weighted average over 30 minutes reduces flash loan attack vectors
- Multiple liquidity pool sources for redundancy
- Sanity checks prevent extreme price deviations
- Circuit breakers halt operations if oracle failure detected
5. Liquidation Mechanism
5.1 Liquidation Process
When a user's health factor drops below 1.0, their position becomes eligible for liquidation:
- Liquidator calls
liquidate()function - Protocol verifies health factor < 1.0
- Liquidator repays portion of user's debt
- Liquidator receives collateral + liquidation bonus
- User's debt and collateral are reduced accordingly
5.2 Liquidation Bonus
The liquidation bonus incentivizes liquidators to maintain protocol solvency:
Default liquidation bonus: 10% (configurable per asset)
PawShare Contribution: 2% of the liquidation bonus is sent to the PawShare wallet, directing funds from risky positions toward cat rescue efforts.
5.3 Close Factor
Liquidators can repay up to 50% of a user's debt in a single transaction. This prevents complete position liquidation and allows users to recover if they add collateral quickly.
6. PawShare Initiative
6.1 Revenue Sources
PawShare receives funds from two protocol revenue streams:
Reserve Factor (Primary)
10% of borrow interest is captured as protocol reserves. Of this reserve:
- 20% → PawShare wallet (for cat rescue)
- 80% → Protocol treasury (for development, security, operations)
Liquidation Bonus (Secondary)
When positions are liquidated:
- 2% of liquidation bonus → PawShare wallet
- Remaining bonus → Liquidator (incentive)
6.2 Distribution Model
Accumulated funds are distributed quarterly (every 3 months):
- Protocol admin reviews PawShare wallet balance
- Converts volatile assets to USDC via DEX (if needed)
- Selects verified cat rescue organizations
- Executes on-chain transfers to charity wallets
- Publishes transaction receipts and impact reports
- Shares updates with community including photos/stories
6.3 Transparency
All PawShare operations are fully transparent:
- Wallet address is publicly known and verifiable
- All incoming transactions are visible on-chain
- Charity recipients are disclosed before distribution
- Transaction hashes are published for verification
- Impact reports include photos and updates from rescues
Community Oversight: The DeFi community can audit all PawShare transactions and hold the protocol accountable. We welcome scrutiny and encourage verification.
7. Governance
7.1 Admin Functions
The protocol owner can perform limited administrative functions:
- List new asset markets (with risk parameters)
- Adjust collateral factors (within safe bounds)
- Update interest rate model parameters
- Pause protocol in emergencies
- Withdraw protocol reserves (not user funds)
- Distribute PawShare funds to charities
7.2 Future Governance
Phase 2 will introduce decentralized governance via token voting:
- PAW governance token (TBD)
- On-chain proposal and voting system
- Timelock for admin actions
- Community-driven parameter adjustments
- Transparent treasury management
Current Stage: PawLend is in Phase 1 with admin-based governance. Decentralization will be gradual to ensure protocol stability and security.
8. Security
8.1 Smart Contract Security
- Formal verification of core logic
- Comprehensive unit and integration tests
- Third-party security audits (in progress)
- Bug bounty program (planned)
- Timelock on admin functions
- Pause mechanism for emergencies
8.2 Oracle Security
- Uniswap V3 TWAP for manipulation resistance
- 30-minute averaging window
- Sanity checks on price deviations
- Multiple pool sources for redundancy
- Circuit breakers for oracle failures
8.3 Economic Security
- Over-collateralization requirements
- Conservative collateral factors
- Liquidation incentives ensure solvency
- Interest rate curve prevents bank runs
- Reserve buffer for bad debt
8.4 Best Practices
- Non-custodial design (users control keys)
- Open-source code for community review
- Immutable core logic (upgrade only via governance)
- Emergency pause for critical bugs
- Regular security monitoring and updates
9. Technical Specifications
Blockchain
Smart Contracts
Oracles
Parameters
10. Conclusion
PawLend demonstrates that DeFi protocols can serve dual purposes: providing efficient financial services while creating positive real-world impact. By integrating charitable giving directly into the protocol's economic model, PawLend proves that profit and purpose are not mutually exclusive.
The protocol's technical design prioritizes security, transparency, and user control. Over-collateralization, oracle-based pricing, and economic incentives ensure protocol solvency even during market volatility.
As DeFi matures, we believe protocols like PawLend will set new standards for responsible innovation—leveraging blockchain technology not just for financial gain, but for meaningful contributions to society. Every transaction on PawLend helps rescue cats, demonstrating the transformative potential of decentralized finance.
For more information, visit pawlend.xyz
This whitepaper is subject to updates. Always refer to the latest version.
© 2024 PawLend Protocol • v1.0 • Published December 2024