refactor(archive): move historical contracts and adapters to archive directory

- Archived multiple non-EVM adapters (Algorand, Hedera, Tron, TON, Cosmos, Solana) and compliance contracts (IndyVerifier) to `archive/solidity/contracts/`.
- Updated documentation to reflect the historical status of archived components.
- Adjusted `foundry.toml` and `README.md` for clarity on historical dependencies and configurations.
- Enhanced Makefile and package.json scripts for improved contract testing and building processes.
- Removed obsolete contracts (AlltraCustomBridge, CommodityCCIPBridge, ISO4217WCCIPBridge, VaultBridgeAdapter) from the main directory.
- Updated implementation reports to indicate archived status for various components.
This commit is contained in:
defiQUG
2026-04-12 18:21:05 -07:00
parent 8ec6af94d5
commit 2b52cc6e32
146 changed files with 2010 additions and 423 deletions

View File

@@ -89,7 +89,7 @@ CurrencyA → XAU → CurrencyB
### Implementation
The `XAUTriangulation` library enforces this requirement:
The historical `XAUTriangulation` library, archived at `archive/solidity/contracts/vault/libraries/XAUTriangulation.sol`, documents this requirement:
- All conversions use `triangulate()` function
- Direct currency-to-currency conversions are NOT permitted
- XAU is the universal unit of account

View File

@@ -18,7 +18,7 @@
- ✅ Currency type enumeration (ISO4217_FIAT, NON_ISO_SYNTHETIC, etc.)
**Files**:
- `contracts/vault/libraries/CurrencyValidation.sol`
- `archive/solidity/contracts/vault/libraries/CurrencyValidation.sol`
### 2. Non-ISO Currency Classification ✅
@@ -31,7 +31,7 @@
-`getCurrencyType()` returns explicit classification
**Files**:
- `contracts/vault/libraries/CurrencyValidation.sol`
- `archive/solidity/contracts/vault/libraries/CurrencyValidation.sol`
- `contracts/vault/libraries/GRUConstants.sol`
### 3. GRU as Non-Legal Tender ✅
@@ -46,7 +46,7 @@
**Files**:
- `contracts/vault/libraries/GRUConstants.sol`
- `contracts/vault/libraries/CurrencyValidation.sol`
- `archive/solidity/contracts/vault/libraries/CurrencyValidation.sol`
- `docs/vault/COMPLIANCE_REQUIREMENTS.md`
### 4. GRU Conversion Ratios ✅
@@ -70,14 +70,14 @@
**Requirement**: ALL currency conversions MUST go through XAU
**Implementation**:
-`XAUTriangulation.sol` library enforces triangulation
- Historical `XAUTriangulation.sol` library enforces triangulation
-`triangulate()` function: CurrencyA → XAU → CurrencyB
- ✅ All conversions documented as requiring XAU intermediation
- ✅ Ledger contract documents XAU normalization
- ✅ XAU Oracle provides ETH/XAU pricing
**Files**:
- `contracts/vault/libraries/XAUTriangulation.sol`
- `archive/solidity/contracts/vault/libraries/XAUTriangulation.sol`
- `contracts/vault/Ledger.sol` (XAU normalization comments)
- `contracts/vault/XAUOracle.sol`
@@ -93,7 +93,7 @@
- ✅ Money Multiplier: `m = (1 + c) / (r + c)` - `calculateMoneyMultiplierWithCurrency()`
**Files**:
- `contracts/vault/libraries/MonetaryFormulas.sol`
- `archive/solidity/contracts/vault/libraries/MonetaryFormulas.sol`
### 7. Documentation Compliance ✅
@@ -129,7 +129,7 @@
| Non-ISO Classification | ✅ | CurrencyValidation.sol + GRUConstants.sol |
| GRU Non-Legal Tender | ✅ | GRUConstants.sol + Documentation |
| GRU Conversion Ratios | ✅ | GRUConstants.sol (exact enforcement) |
| XAU Triangulation | ✅ | XAUTriangulation.sol + Ledger.sol |
| XAU Triangulation | ✅ | archive/solidity/contracts/vault/libraries/XAUTriangulation.sol + Ledger.sol |
| Monetary Formulas | ✅ | MonetaryFormulas.sol (exact implementation) |
| Documentation | ✅ | COMPLIANCE_REQUIREMENTS.md |

View File

@@ -231,7 +231,7 @@ All interfaces have been created:
- Money Multiplier: m = 1 / r and m = (1 + c) / (r + c)
- Exact formula implementations without modification
**XAUTriangulation.sol**:
**XAUTriangulation.sol** (historical, archived):
- XAU triangulation for all currency conversions
- CurrencyA → XAU → CurrencyB enforcement
- XAU conversion utilities
@@ -259,7 +259,7 @@ contracts/vault/
│ ├── CurrencyValidation.sol ✅ ISO 4217 compliance
│ ├── GRUConstants.sol ✅ GRU relationships
│ ├── MonetaryFormulas.sol ✅ Mandatory formulas
│ └── XAUTriangulation.sol ✅ XAU triangulation
│ └── XAUTriangulation.sol ✅ XAU triangulation (historical, archived)
├── errors/
│ └── VaultErrors.sol
├── Ledger.sol
@@ -322,9 +322,9 @@ See `docs/vault/COMPLIANCE_REQUIREMENTS.md` for complete compliance documentatio
### GRU Smart Vault and PMM Integration
- **PMM price for vault valuation**: When collateral or debt is a token that has a PMM pool (e.g. cUSDT, cUSDC), price can be obtained from **PMMPriceProvider** (`contracts/vault/adapters/PMMPriceProvider.sol`). It wraps DODOPMMIntegration and exposes `getPrice(asset, quoteToken)` using `getPoolPriceOrOracle` (oracle-backed when ReserveSystem is set on DODOPMMIntegration). The Ledgers primary valuation remains XAU via XAUOracle; PMMPriceProvider is for optional use by keepers, UIs, or a future Ledger extension that supports a secondary price source per asset.
- **PMM price for vault valuation**: When collateral or debt is a token that has a PMM pool (e.g. cUSDT, cUSDC), price can be obtained from the historical **PMMPriceProvider** reference implementation (`archive/solidity/contracts/vault/adapters/PMMPriceProvider.sol`). It wraps DODOPMMIntegration and exposes `getPrice(asset, quoteToken)` using `getPoolPriceOrOracle` (oracle-backed when ReserveSystem is set on DODOPMMIntegration). The Ledgers primary valuation remains XAU via XAUOracle; PMMPriceProvider is retained as a reference pattern for optional use by keepers, UIs, or a future Ledger extension that supports a secondary price source per asset.
- **Vault as LP / PMM liquidity**: A vault (or its regulated entity) can add liquidity to PMM pools by calling **DODOPMMIntegration.addLiquidity(pool, baseAmount, quoteAmount)**. The vault (or entity) must hold base and quote tokens and approve the integration contract. Required role on DODOPMMIntegration: none for addLiquidity (anyone can add); pool creation requires **POOL_MANAGER_ROLE**. LP positions are not currently accepted as collateral in the Ledger; that would require a future extension (e.g. LP token as approved asset and a valuation path for LP shares).
- **GRUHandler / registry**: GRU assets used in vaults should be validated via **GRUHandler** (`contracts/registry/handlers/GRUHandler.sol`). Register any new PMM-related or GRU asset types in **ChainRegistry** / **UniversalAssetRegistry** as applicable.
- **GRUHandler / registry**: GRU assets used in vaults should be validated via the historical **GRUHandler** reference implementation (`archive/solidity/contracts/registry/handlers/GRUHandler.sol`). Register any new PMM-related or GRU asset types in **ChainRegistry** / **UniversalAssetRegistry** as applicable.
See also: `docs/integration/DODO_PMM_INTEGRATION.md`, `docs/integration/ORACLE_AND_KEEPER_CHAIN138.md`.
@@ -334,4 +334,4 @@ See also: `docs/integration/DODO_PMM_INTEGRATION.md`, `docs/integration/ORACLE_A
- All contracts follow OpenZeppelin security best practices
- The system enforces strict access controls and compliance checks
- XAU normalization ensures consistent valuation across all operations
- **MANDATORY COMPLIANCE**: All currency codes, GRU relationships, and monetary formulas are enforced
- **MANDATORY COMPLIANCE**: All currency codes, GRU relationships, and monetary formulas are enforced