Technical Documentation
Looking for user documentation? Visit the User Documentation to learn about how the protocol works, mechanism design, tokenomics, and conceptual guides (non-technical).
For deployed contract addresses on Base Mainnet, see Deployments. To see our full source code, check out our GitHub.
Overview
Ripe Protocol is an onchain credit layer that turns any tokenized asset—crypto‑native or real‑world—into both a yield source and instant liquidity.
Users deposit assets that keep earning through external strategies plus Ripe's Endaoment, then draw a single GREEN loan against their diversified portfolio—no order books, no counterparties, predictable rates. Governance, driven by RIPE tokens and dynamic committee voting, steers risk, monetary policy and treasury allocations, giving the community full ownership of the protocol's economics.
Key Features
Earn Yield on Anything
The Endaoment reinvests all protocol revenues and Bonding proceeds, distributing sustainable yield (and RIPE incentives) even to idle NFTs or tokenized RWAs.
One‑Loan‑for‑All Collateral
Aggregate every deposit—stablecoins, LP tokens, NFTs, houses—to back a single GREEN debt position, slashing liquidation risk and UX friction.
GREEN Stablecoin & Multi‑Layer Peg Defense
Dynamic interest, Stability Pool absorption, Endaoment redemptions and protocol‑owned liquidity keep GREEN fully‑backed and on‑peg.
Compliance‑Ready RWA Support
Whitelists and transfer‑restricted liquidation paths let regulated or permissioned assets participate safely.
Counterparty‑Free, Predictable Borrowing
Smart contracts mint GREEN directly—no lenders, no funding gaps, transparent terms.
Resilient Liquidations
Cascade of Stability Pool swaps + fungible/NFT auctions minimizes bad debt while rewarding backstops.
Dynamic, Onchain Governance
Continuous "Dynamic Voting," elected committees and Juice Score incentives align risk, rewards and protocol evolution with token‑holder skin‑in‑the‑game.
Protocol Components
The protocol consists of several interconnected systems:
Core: Lending engine, user interface, liquidations, and stability pool
Treasury: Treasury management, bonding, rewards distribution, and contributor compensation
Governance: Access control, configuration management, and time-locked operations
Tokens: GREEN (stablecoin), RIPE (governance), and sGREEN (yield-bearing GREEN)
Vaults: Asset management strategies from simple storage to yield optimization
Pricing: Multi-oracle integration for accurate and resilient asset valuations
Core Modules: Central coordination points, address resolution, and shared functionality
Core
Essential contracts for lending operations, liquidations, and user interactions.
Lending powerhouse managing collateralized borrowing, interest accrual, and debt repayment
Primary user interface for deposits, withdrawals, borrowing, and account management
Utility library for complex Teller operations including batch processing and delegation
Comprehensive data storage for user positions, debt, and protocol metrics
Liquidation engine executing multi-phase strategies to recover value from under-collateralized positions
Insurance fund where stablecoin deposits earn discounted liquidated collateral
Collateral redemption mechanism allowing GREEN holders to redeem against unhealthy positions
Automated deleveraging system for reducing user debt through collateral liquidation
Treasury
Treasury management, bonding mechanisms, and reward distribution systems.
Treasury and liquidity hub deploying funds across DeFi strategies while maintaining GREEN stability
Fund management module handling yield distribution and treasury accounting for Endaoment
Peg Stability Module enabling 1:1 stablecoin swaps to maintain GREEN peg
Decentralized bond marketplace for GREEN/RIPE exchanges with dynamic pricing based on treasury needs
Rewards distribution engine calculating time-weighted points for RIPE token allocation
On-chain payroll system managing contributor vesting schedules and token compensation
Individual vesting contracts for contributor token compensation
Dynamic discount mechanism for GREEN-to-RIPE bond conversions
Governance
Access control, configuration management, and protocol governance systems.
Master registry and governance hub controlling token minting permissions
Authorization gateway for all protocol configuration changes
Central configuration hub storing all operational parameters
Two-tier governance system for contract-specific operations
Time-delay mechanism for critical configuration changes
Configuration Contracts
Asset and vault configuration including collateral parameters
Reward distribution and points system configuration
Protocol operations including deposits, withdrawals, and liquidations
HR, contributor management, and auxiliary feature configuration
Endaoment and PSM operations with time-locked treasury management
User allowlist for restricted protocol access during early deployment
Tokens
Protocol tokens for value transfer and governance.
USD-pegged stablecoin minted through overcollateralized positions
Governance token for voting on protocol parameters and treasury
Yield-bearing GREEN vault implementing ERC4626 standard
Token Modules
Enhanced ERC20 with blacklisting, pausability, and governance integration
Tokenized vault standard for yield-bearing tokens
Vaults
Modular vault implementations for different asset management strategies.
Basic vault with direct 1:1 balance tracking for standard ERC20 collateral
Yield-optimized vault for rebase tokens like stETH with automatic compounding
Governance vault where users lock RIPE tokens for voting power with time-based bonuses
Vault Modules
Reusable components that power vault functionality.
Foundational vault operations for deposits, withdrawals, and transfers
Share-based accounting for yield distribution and proportional ownership
Stability pool mechanics for liquidation absorption and reward distribution
Universal database layer for balance tracking and state management
Pricing
Oracle integrations and price aggregation for reliable asset valuations.
Oracle aggregator routing price requests through prioritized sources
Integration with Chainlink's decentralized oracle network
High-frequency pricing with Pyth Network's pull-based oracles
RedStone oracle integration with Chainlink-compatible interface
Stork Network integration with nanosecond-precision timestamps
Curve LP token pricing and GREEN stabilizer monitoring
Specialized pricing for yield-bearing vault tokens with snapshot system
RIPE token pricing from Aerodrome pools with TWAP protection
Wrapped superOETHb pricing using ERC4626 share conversion
Underscore Protocol vault token pricing with snapshot-based TWAP
Pricing Modules
Base module defining standard interface for all price sources
Core Modules
Central coordination points and reusable components providing common functionality across the protocol.
Central registry of approved vaults with safety checks and RIPE reward distribution
Flexible registry for managing protocol addresses with time-locks
Centralized address resolution providing validated protocol addresses
Base functionality for protocol departments including pause controls
Getting Started
New Users: Start with Teller.vy to understand user interactions
Developers: Review RipeHq.vy for protocol architecture
Governance: Explore RipeToken.vy and RipeGov.vy
Integrators: Check PriceDesk.vy and vault interfaces
Architecture Principles
Modular Design: Reusable modules reduce code duplication and audit surface
Registry Pattern: Central registries coordinate decentralized components
Time-Locked Changes: Critical updates require delays to prevent rushed decisions
Multi-Oracle Support: No single point of failure for price feeds
Layered Security: Multiple validation layers from modules to registries to core contracts
Last updated