Reference Overview
Complete technical reference for RevvFi deployments.
Core Protocol Constants
| Constant | Value | Location | Purpose |
|---|---|---|---|
MAX_APR_BPS | 5000 (50%) | RevvFiMarket | Protocol-wide APR ceiling, regardless of borrower’s own maxApr |
BASIS_POINTS | 10000 | RevvFiMarket | Basis-point denominator used throughout |
MAX_ACTIVE_POSITIONS | 100 | RevvFiMarket | Cap on simultaneous active positions per market |
DEFAULT_STALE_PRICE_THRESHOLD | 24 hours | RevvFiCollateralEscrow | Default oracle staleness window (per-market tunable) |
auctionDuration | 3 days | RevvFiLiquidator | Total liquidation auction window (tunable) |
dutchAuctionStepDuration | 1 hour | RevvFiLiquidator | Time between each price step (tunable) |
dutchAuctionPriceDecrementBps | 500 (5%) | RevvFiLiquidator | Price drop per step, as % of debt (tunable) |
minBidIncrementBps | 100 (1%) | RevvFiLiquidator | Minimum bid increase over the previous highest (tunable) |
auctionExtensionWindow | 15 minutes | RevvFiLiquidator | Anti-sniping extension on late bids (tunable) |
| Reserve price | 80% of debt | RevvFiLiquidator | Liquidation auction price floor |
Function Quick Reference
RevvFiArchController
registerBorrower(address)/removeBorrower(address)— owner-only borrower whitelistisRegisteredBorrower(address)/isBlacklistedAsset(address)— views used by the Factory
RevvFiFactory
deployMarket(address borrower, address borrowAsset, address collateralAsset, address collateralOracle, uint8 collateralDecimals, uint8 borrowDecimals, uint256 minCollateralRatio, uint256 liquidationThreshold)— payable, clones a new marketsetDeploymentFee(uint256)/setFeeRecipient(address)— owner-only
RevvFiMarket
depositCollateral(uint256)/withdrawCollateral(uint256)borrow(uint256 amount, bool useSeniorOnly, uint256 maxApr)repay(uint256 amount)/repayFull()claimFunds(uint256 positionId)getTotalOwed()/getCurrentPrincipal()/getPositionValue(uint256)/getPositionClaimable(uint256)
RevvFiOfferBook
submitOffer(uint256 amount, uint256 apr, uint8 seniority, uint256 duration)cancelOffer(uint256 offerId)/modifyOffer(uint256, uint256, uint256, uint256)getBestOffers(uint256 amount, bool useSeniorOnly)(view)
RevvFiCollateralEscrow
setMinCollateralRatio(uint256)/setLiquidationThreshold(uint256)/setStalePriceThreshold(uint256)— factory-onlygetCollateralRatio(address, uint256 debt)/isHealthy(address, uint256)/isLiquidatable(address, uint256)
RevvFiLiquidator
createAuction(...)— market-onlyplaceBid(uint256 auctionId, uint256 bidAmount)settleAuction(uint256 auctionId)
ReputationRegistry
getReputationScore(address)/getRiskLabel(address)/getBorrowerProfile(address)(views)
Common Errors
| Error | Cause |
|---|---|
BorrowerNotRegistered | Borrower isn’t approved in RevvFiArchController |
AssetBlacklisted | Borrow asset, collateral asset, or oracle is blacklisted |
InsufficientFee | msg.value doesn’t match the Factory’s deploymentFee |
BorrowAmountTooHigh | Requested amount exceeds getMaxBorrowable() |
MaxAprExceeded | The fill’s weighted-average APR exceeds the borrower’s maxApr (or the protocol’s MAX_APR_BPS cap) |
NoOffersAvailable | No active offers match the request |
TooManyActivePositions | Would exceed MAX_ACTIVE_POSITIONS |
OraclePriceStale | Chainlink latestRoundData() is older than stalePriceThreshold, or otherwise invalid |
InsufficientCollateral | Withdrawal or health check would breach minCollateralRatio |
AuctionNotFound / AuctionNotActive / AuctionAlreadySettled | Liquidation auction lifecycle guards |
BidTooLow | Bid doesn’t meet the current price / minimum increment over the highest bid |
Next Steps
- Review Events for the full event log
- Check Gas Estimates for representative operation costs
- View Deployment for network addresses
- Read Glossary for terminology