NavImpactLib
Overview
License: Apache-2.0-or-later
library NavImpactLibAuthor: Gabriele Rigo - gab@rigoblock.com Provides percentage-based NAV impact validation for cross-chain transfers
Used by both AIntents (source) and ECrosschain (destination) for consistent validation
Errors info
EffectiveSupplyTooLow
error EffectiveSupplyTooLow()NavImpactTooHigh
error NavImpactTooHigh()Thrown when transfer amount exceeds maximum allowed NAV impact
Impact is calculated as (transferValue * 10000) / totalAssetsValue in basis points
Functions info
validateNavImpact
Validates that transfer amount doesn't exceed NAV impact tolerance
Calculates percentage impact: (transferValue * 10000) / totalAssetsValue vs toleranceBps
Parameters:
token
address
Token being transferred
amount
uint256
Amount being transferred
toleranceBps
uint256
Maximum allowed NAV impact in basis points (e.g., 1000 = 10%)
validateSupply
Validates that effective supply meets minimum threshold when virtual supply is negative
Last updated