axis-synome 0.1.0.dev64__tar.gz → 0.1.0.dev66__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {axis_synome-0.1.0.dev64/src/axis_synome.egg-info → axis_synome-0.1.0.dev66}/PKG-INFO +1 -1
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/_version.py +2 -2
- axis_synome-0.1.0.dev66/src/axis_synome/spec/entities/capital_types.py +73 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/entities/risk_categories.py +77 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/__init__.py +21 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/aggregate_rrc.py +34 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/capital_composition.py +189 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/examples/risk_capital_walkthrough.ipynb +1715 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/instance_rrc.py +151 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/jrc_loss_allocation.py +189 -0
- axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/total_risk_capital.py +72 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66/src/axis_synome.egg-info}/PKG-INFO +1 -1
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome.egg-info/SOURCES.txt +14 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_a321_a322_integration.py +259 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_aggregate_rrc.py +93 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_capital_composition.py +155 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_instance_rrc.py +143 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_jrc_loss_allocation.py +208 -0
- axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/test_total_risk_capital.py +81 -0
- axis_synome-0.1.0.dev64/tests/axis_synome/suraf/suraf_client/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/.flake8 +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/AGENTS.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/CLAUDE.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/README.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/WRITING_SPECS.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/01_prime_basics.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/02_assets_and_tokens_of_a_prime.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/03_inverse_lookups.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/04_atlas_provenance.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/05_feeding_a_formula.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/examples/README.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/pyproject.toml +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/setup.cfg +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/export_entities.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/all_entities/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/all_entities/lending_markets.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/alm_proxies.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/asset_categories.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/assets.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/assets_by_prime.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/networks.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/primes.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/protocol_sets.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/tokens.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/entities/types.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/asc_collateral_ratio.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/asc_incentive.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/dab.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/latent_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/ratio_latent_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/asc/formulas/resting_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/codegen_test/entities/agents.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/crypto_lending/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/crypto_lending/formulas/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/crypto_lending/formulas/lif.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/entities/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/entities/audit_firms.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/entities/protocol_risk.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/entities/smart_contract_risk.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/administrative_rrc/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/administrative_rrc/administrative_risk.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/audit_factor.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec/risk_capital → axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/entities}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/entities/lending_protocol.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/entities/precomputed_crr.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/financial_rrc/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/financial_rrc/entities.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/financial_rrc/perpetual_positions.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec/risk_capital/entities → axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/formulas}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec/risk_capital/formulas → axis_synome-0.1.0.dev66/src/axis_synome/spec/risk_capital/formulas/financial_rrc}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/asset_correlation_coefficient.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/capital_requirement_without_buffers.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/exposure_caps.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/fixed_crr_rrc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/instance_financial_rrc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/lending_rrc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/pipeline.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/precomputed_crr_rrc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/financial_rrc/probability_of_default.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/formulas/required_risk_capital.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/lindy_factor.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/smart_contract_rrc/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/smart_contract_rrc/exceptions.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/risk_capital/smart_contract_rrc/smart_contract_risk.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/README.md +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/entities/assessor_score.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/entities/assets.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/entities/mappings.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/formulas/crr.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec/suraf/formulas/scoring.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_inspect/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_inspect/__main__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_inspect/cli.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec/risk_capital/formulas/financial_rrc → axis_synome-0.1.0.dev66/src/axis_synome/spec_support}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/correlation_matrix.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/evm_address.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/math_protocol.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/pendle_validation.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/references/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/references/graph.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec_support → axis_synome-0.1.0.dev66/src/axis_synome/spec_support/runtime}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/runtime/base.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/runtime/math.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/runtime/reference.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/validated_dataclass.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_support/validated_str.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_validator/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_validator/check_source_uuids.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_validator/checker.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_validator/flake8_plugin.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome/spec_validator/python_subset.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome.egg-info/dependency_links.txt +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome.egg-info/entry_points.txt +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome.egg-info/requires.txt +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/src/axis_synome.egg-info/top_level.txt +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/conftest.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/mocks.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_alm_proxies.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_asc_collateral_ratio.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_asc_incentive.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_asset_categories.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_dab.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_evm_address.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_latent_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_prime_agent_data_validation.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_ratio_latent_asc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/asc/test_resting_asc.py +0 -0
- {axis_synome-0.1.0.dev64/src/axis_synome/spec_support/runtime → axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/administrative_rrc/test_administrative_risk.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/risk_capital → axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/financial_rrc}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/financial_rrc/test_lending_rrc.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/financial_rrc/test_perpetual_positions.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/risk_capital/financial_rrc → axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/formulas}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/formulas/test_correlation_matrix.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/formulas/test_loss_given_default.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/risk_capital/formulas → axis_synome-0.1.0.dev66/tests/axis_synome/risk_capital/smart_contract_rrc}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/smart_contract_rrc/test_exceptions.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/risk_capital/smart_contract_rrc/test_smart_contract_risk.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/scripts/test_export_entities.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/risk_capital/smart_contract_rrc → axis_synome-0.1.0.dev66/tests/axis_synome/spec_inspect}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_inspect/test_cli.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/spec_inspect → axis_synome-0.1.0.dev66/tests/axis_synome/spec_support}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/spec_support → axis_synome-0.1.0.dev66/tests/axis_synome/spec_support/references}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_support/references/test_graph.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/spec_support/references → axis_synome-0.1.0.dev66/tests/axis_synome/spec_support/runtime}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_support/runtime/test_base.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_support/runtime/test_math.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_validator/test_check_source_uuids.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_validator/test_checker.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/spec_validator/test_flake8_plugin.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/spec_support/runtime → axis_synome-0.1.0.dev66/tests/axis_synome/suraf}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/suraf → axis_synome-0.1.0.dev66/tests/axis_synome/suraf/entities}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/entities/test_assessor_score.py +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/suraf/entities → axis_synome-0.1.0.dev66/tests/axis_synome/suraf/formulas}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/formulas/test_crr.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/formulas/test_scoring.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/crr_mapping.csv +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/penalty.csv +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/scorecards/Assessor_1_scores.csv +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/scorecards/Assessor_2_scores.csv +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/scorecards/Assessor_3_scores.csv +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/static/aave_ausdc/v1/weights.csv +0 -0
- {axis_synome-0.1.0.dev64/tests/axis_synome/suraf/formulas → axis_synome-0.1.0.dev66/tests/axis_synome/suraf/suraf_client}/__init__.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/suraf_client/suraf_client.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/suraf/suraf_client/test_suraf_client.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/tests/axis_synome/test_examples.py +0 -0
- {axis_synome-0.1.0.dev64 → axis_synome-0.1.0.dev66}/uv.lock +0 -0
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.1.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 1, 0, '
|
|
21
|
+
__version__ = version = '0.1.0.dev66'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 1, 0, 'dev66')
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Capital structure types for the Risk Capital framework.
|
|
2
|
+
|
|
3
|
+
Dataclasses modelling the capital structure of a Prime Agent as defined
|
|
4
|
+
in Atlas A.3.2.1.2.2. These are interface types for the risk capital
|
|
5
|
+
formulas — concrete instances are supplied at evaluation time, not
|
|
6
|
+
defined here.
|
|
7
|
+
|
|
8
|
+
The capital stack has two layers ordered by loss-absorption seniority:
|
|
9
|
+
|
|
10
|
+
1. Junior Risk Capital (JRC) — first to absorb losses.
|
|
11
|
+
2. Senior Risk Capital (SRC) — absorbs losses only after 100 % of
|
|
12
|
+
JRC has been wiped out.
|
|
13
|
+
|
|
14
|
+
Each layer is further broken down by source (internal vs. external).
|
|
15
|
+
The sourcing ratios (EPI, SPJ) constrain how much external and senior
|
|
16
|
+
capital a Prime can count, ensuring sufficient "skin in the game".
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from axis_synome.spec_support.validated_dataclass import validated_dataclass
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@validated_dataclass
|
|
23
|
+
class JuniorRiskCapital:
|
|
24
|
+
"""Breakdown of a Prime Agent's Junior Risk Capital by source.
|
|
25
|
+
|
|
26
|
+
JRC is the first capital to absorb losses on investments made through
|
|
27
|
+
the Allocation System. It must experience 100 % losses before any
|
|
28
|
+
Senior Risk Capital is touched.
|
|
29
|
+
|
|
30
|
+
Attributes:
|
|
31
|
+
ijrc: Internal Junior Risk Capital — capital owned by the Prime
|
|
32
|
+
Agent itself, held in its designated treasury (e.g. SubProxy).
|
|
33
|
+
IJRC is the foundation of the Prime's risk capacity: it
|
|
34
|
+
dictates the max EJRC via the EPI ratio, provides the
|
|
35
|
+
primary SPJ enablement for SRC, and bears the initial
|
|
36
|
+
Tip loss.
|
|
37
|
+
sejrc: Prime-External Junior Risk Capital — JRC rented from
|
|
38
|
+
another Prime via the JRC Rental Primitive. The capital
|
|
39
|
+
remains in the lender's treasury but counts towards the
|
|
40
|
+
borrower's JRC.
|
|
41
|
+
tejrc: Tokenized External Junior Risk Capital — capital provided
|
|
42
|
+
by external depositors into the TEJRC smart contract,
|
|
43
|
+
from which Primes can encumber funds.
|
|
44
|
+
|
|
45
|
+
:source_uuid: 92e51a94-ef70-4a86-9946-36077ebad1e9
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
ijrc: float
|
|
49
|
+
sejrc: float
|
|
50
|
+
tejrc: float
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@validated_dataclass
|
|
54
|
+
class SeniorRiskCapital:
|
|
55
|
+
"""Breakdown of a Prime Agent's Senior Risk Capital by source.
|
|
56
|
+
|
|
57
|
+
SRC is protected relative to JRC in the loss waterfall: it only
|
|
58
|
+
begins to absorb losses after JRC has been fully depleted, and then
|
|
59
|
+
absorbs 100 % of further losses. SRC can be originated from Sky
|
|
60
|
+
Core monthly or rented between Primes.
|
|
61
|
+
|
|
62
|
+
Attributes:
|
|
63
|
+
isrc: Internal Senior Risk Capital — provided from Sky Core's
|
|
64
|
+
Surplus Buffer.
|
|
65
|
+
esrc: External Senior Risk Capital — provided by users depositing
|
|
66
|
+
sUSDS into the srUSDS contract in exchange for higher
|
|
67
|
+
returns.
|
|
68
|
+
|
|
69
|
+
:source_uuid: 6bba2076-5d5b-43fd-82c6-df6a35f67355
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
isrc: float
|
|
73
|
+
esrc: float
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"""Risk category types for the Allocation System.
|
|
2
|
+
|
|
3
|
+
Types representing the RRC component structure and instance-level status
|
|
4
|
+
used across Instance and Aggregate RRC computations (A.3.2.1.1).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
|
|
9
|
+
from axis_synome.spec_support.validated_dataclass import validated_dataclass
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class InstanceStatus(Enum):
|
|
13
|
+
"""Operational status of an Allocation System Primitive Instance.
|
|
14
|
+
|
|
15
|
+
Every Instance has exactly one of these statuses at any time. Only
|
|
16
|
+
Active instances contribute to Aggregate RRC (A.3.2.1.1.2).
|
|
17
|
+
|
|
18
|
+
:source_uuid: 6aed5cc1-9671-4b73-88a9-fdd86ac93ece
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
ACTIVE = "Active"
|
|
22
|
+
SUSPENDED = "Suspended"
|
|
23
|
+
COMPLETED = "Completed"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@validated_dataclass
|
|
27
|
+
class InstanceRRCComponents:
|
|
28
|
+
"""Three Required Risk Capital components for a single Instance.
|
|
29
|
+
|
|
30
|
+
Instance Total RRC = Financial RRC + Smart Contract RRC + Administrative RRC.
|
|
31
|
+
|
|
32
|
+
If any component cannot be calculated (represented as ``None``), the
|
|
33
|
+
Atlas mandates a conservative fallback (A.3.2.1.1.3.2): the Instance
|
|
34
|
+
Total RRC defaults to 100 % of invested capital.
|
|
35
|
+
|
|
36
|
+
Attributes:
|
|
37
|
+
financial_rrc: RRC covering credit, market, and liquidity
|
|
38
|
+
risk. Computed by asset-class-specific risk
|
|
39
|
+
models under A.3.2.2.1.1.
|
|
40
|
+
smart_contract_rrc: RRC covering the risk of loss due to a bug
|
|
41
|
+
or technical exploit in the invested protocol
|
|
42
|
+
or its dependencies. Computed under A.3.2.2.1.2.
|
|
43
|
+
administrative_rrc: RRC covering the risk of loss due to abuse
|
|
44
|
+
of privileged access (e.g. multisig) to the
|
|
45
|
+
invested protocol. Computed under A.3.2.2.1.3.
|
|
46
|
+
|
|
47
|
+
:source_uuid: 5fe6b54c-cc68-4f8a-8d1e-5044af941afe
|
|
48
|
+
:source_uuid: 268af0e9-be3d-458e-9ccd-5a560abc7540
|
|
49
|
+
"""
|
|
50
|
+
|
|
51
|
+
# TEMPORARY SCAFFOLDING: float | None fields are interim pending a future
|
|
52
|
+
# consolidation of A.3.2.1 and A.3.2.2. Do not copy this nullable pattern.
|
|
53
|
+
financial_rrc: float | None
|
|
54
|
+
smart_contract_rrc: float | None
|
|
55
|
+
administrative_rrc: float | None
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@validated_dataclass
|
|
59
|
+
class AllocationSystemInstance:
|
|
60
|
+
"""Single instance of the Allocation System Primitive.
|
|
61
|
+
|
|
62
|
+
Wraps the RRC components together with the instance's operational
|
|
63
|
+
status and invested capital, so that formulas can filter by status
|
|
64
|
+
explicitly — mirroring the Atlas rule that only Active instances
|
|
65
|
+
contribute to Aggregate RRC.
|
|
66
|
+
|
|
67
|
+
Attributes:
|
|
68
|
+
status: Operational status. Only ``ACTIVE`` instances
|
|
69
|
+
are included in the Aggregate RRC summation.
|
|
70
|
+
components: The three RRC sub-components for this Instance.
|
|
71
|
+
invested_capital: Capital from Sky's Collateral Portfolio invested
|
|
72
|
+
in this Instance, in USDS.
|
|
73
|
+
"""
|
|
74
|
+
|
|
75
|
+
status: InstanceStatus
|
|
76
|
+
components: InstanceRRCComponents
|
|
77
|
+
invested_capital: float
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Risk Capital specification.
|
|
2
|
+
|
|
3
|
+
This package implements the computable rules for the Risk Capital
|
|
4
|
+
framework, covering both the conceptual framework (A.3.2.1) and the
|
|
5
|
+
detailed risk models (A.3.2.2).
|
|
6
|
+
|
|
7
|
+
Conceptual framework (A.3.2.1):
|
|
8
|
+
- instance_rrc: Per-instance RRC computation (demand side)
|
|
9
|
+
- aggregate_rrc: Sum across active instances
|
|
10
|
+
- total_risk_capital: TRC computation (supply side)
|
|
11
|
+
- capital_composition: EPI/SPJ sourcing ratio constraints and constants
|
|
12
|
+
- jrc_loss_allocation: Loss waterfall (Tip, pro-rata, SRC layers)
|
|
13
|
+
|
|
14
|
+
Implementation (A.3.2.2):
|
|
15
|
+
- lindy_factor: Shared Lindy adjustment factor
|
|
16
|
+
- audit_factor: Audit risk factor
|
|
17
|
+
- financial_rrc/: Per-asset-class Financial RRC models
|
|
18
|
+
- smart_contract_rrc/: Smart Contract RRC models
|
|
19
|
+
- administrative_rrc/: Administrative RRC models
|
|
20
|
+
- formulas/: Asset-class-specific formula composition
|
|
21
|
+
"""
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""Aggregate Required Risk Capital.
|
|
2
|
+
|
|
3
|
+
Sum Instance RRC across all Active instances of the Allocation System
|
|
4
|
+
Primitive to determine the Prime Agent's total capital requirement.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from axis_synome.spec.entities.risk_categories import (
|
|
8
|
+
AllocationSystemInstance,
|
|
9
|
+
InstanceStatus,
|
|
10
|
+
)
|
|
11
|
+
from axis_synome.spec.risk_capital.instance_rrc import instance_total_rrc
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def aggregate_rrc(
|
|
15
|
+
instances: list[AllocationSystemInstance],
|
|
16
|
+
) -> float:
|
|
17
|
+
"""Aggregate Required Risk Capital for a Prime Agent.
|
|
18
|
+
|
|
19
|
+
The Aggregate RRC is the sum of Instance Total RRC for each Active
|
|
20
|
+
Instance of the Allocation System Primitive that the Prime Agent has
|
|
21
|
+
deployed. Suspended and Completed instances are excluded.
|
|
22
|
+
|
|
23
|
+
The filtering is performed inside the formula: callers pass all
|
|
24
|
+
known instances and the Atlas eligibility rule is applied here,
|
|
25
|
+
following the same pattern as ``EligiblePrimeAgentASC`` filtering
|
|
26
|
+
in ASC formulas.
|
|
27
|
+
|
|
28
|
+
:source_uuid: 6aed5cc1-9671-4b73-88a9-fdd86ac93ece
|
|
29
|
+
"""
|
|
30
|
+
return sum(
|
|
31
|
+
instance_total_rrc(inst.components, inst.invested_capital)
|
|
32
|
+
for inst in instances
|
|
33
|
+
if inst.status == InstanceStatus.ACTIVE
|
|
34
|
+
)
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"""EPI/SPJ checks and Capital Composition rules.
|
|
2
|
+
|
|
3
|
+
Two sourcing-ratio constraints ensure sufficient "skin in the game":
|
|
4
|
+
|
|
5
|
+
1. EPI (External Per Internal) — caps the total EJRC a Prime can
|
|
6
|
+
source based on its own IJRC (A.3.2.1.2.3.1.1).
|
|
7
|
+
2. SPJ (Senior Per Junior) — determines how much SRC each unit of
|
|
8
|
+
JRC can "enable". SPJ capacity can alternatively be diverted to
|
|
9
|
+
source additional EJRC at SPJ = 0 (A.3.2.1.2.3.1.2 and
|
|
10
|
+
A.3.2.1.2.3.1.2.1).
|
|
11
|
+
|
|
12
|
+
The ratios are applied sequentially per A.3.2.1.2.3.2:
|
|
13
|
+
|
|
14
|
+
Step 1 EPI sets the initial EJRC ceiling from IJRC alone.
|
|
15
|
+
Step 2 SPJ capacity is computed from the resulting JRC pool.
|
|
16
|
+
Step 3 The Prime allocates SPJ capacity between enabling SRC and/or
|
|
17
|
+
sourcing additional non-SPJ-bearing EJRC.
|
|
18
|
+
|
|
19
|
+
Parameter values (SPJ ratios, EPI ratio, Tip percentage) come from the
|
|
20
|
+
A.3.2.2.2 implementation parameters and are cited individually.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
from typing import Final
|
|
24
|
+
|
|
25
|
+
from axis_synome.spec.entities.capital_types import (
|
|
26
|
+
JuniorRiskCapital,
|
|
27
|
+
SeniorRiskCapital,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# ── SPJ ratios (A.3.2.2.2.2.2) ──────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
SPJ_IJRC: Final[float] = 1.00
|
|
33
|
+
"""SPJ multiplier for Internal Junior Risk Capital.
|
|
34
|
+
|
|
35
|
+
:source_uuid: 8578e240-3fe8-41c0-8b2c-15ec9a7181ab
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
SPJ_SEJRC: Final[float] = 0.75
|
|
39
|
+
"""SPJ multiplier for EPI-acquired Prime External Junior Risk Capital.
|
|
40
|
+
|
|
41
|
+
:source_uuid: 8578e240-3fe8-41c0-8b2c-15ec9a7181ab
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
SPJ_TEJRC: Final[float] = 0.50
|
|
45
|
+
"""SPJ multiplier for EPI-acquired Tokenized External Junior Risk Capital.
|
|
46
|
+
|
|
47
|
+
:source_uuid: 8578e240-3fe8-41c0-8b2c-15ec9a7181ab
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
# ── EPI ratio (A.3.2.2.2.2.1) ───────────────────────────────────────
|
|
51
|
+
|
|
52
|
+
EPI_RATIO: Final[float] = 1.00
|
|
53
|
+
"""External Per Internal ratio cap for EJRC sourcing.
|
|
54
|
+
|
|
55
|
+
:source_uuid: 3ed32706-c072-42b5-b1e5-187bddf8dc37
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# ── Tip JRC percentage (A.3.2.2.2.1.1) ─────────────────────────────
|
|
59
|
+
|
|
60
|
+
TIP_JRC_PCT: Final[float] = 0.10
|
|
61
|
+
"""Tip percentage of total JRC absorbed first by IJRC.
|
|
62
|
+
|
|
63
|
+
:source_uuid: 73f2410b-3579-4c68-ae36-e4a4713a6e4b
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# ── EPI ratio checks (A.3.2.1.2.3.1.1) ─────────────────────────────
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def total_ejrc(
|
|
71
|
+
jrc: JuniorRiskCapital,
|
|
72
|
+
) -> float:
|
|
73
|
+
"""Total External JRC — the portion not owned by the Prime itself.
|
|
74
|
+
|
|
75
|
+
This is the quantity constrained by the EPI ratio: it must not
|
|
76
|
+
exceed EPI * IJRC.
|
|
77
|
+
|
|
78
|
+
:source_uuid: 57b0b226-ae2c-4d47-871d-57e6d3bb1a9f
|
|
79
|
+
"""
|
|
80
|
+
return jrc.sejrc + jrc.tejrc
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def max_ejrc_from_epi(
|
|
84
|
+
ijrc: float,
|
|
85
|
+
) -> float:
|
|
86
|
+
"""EJRC ceiling imposed by the EPI ratio.
|
|
87
|
+
|
|
88
|
+
The External Per Internal ratio is the primary constraint ensuring a
|
|
89
|
+
baseline level of the Prime's own capital backs its external JRC
|
|
90
|
+
sourcing::
|
|
91
|
+
|
|
92
|
+
max EJRC = EPI * IJRC
|
|
93
|
+
|
|
94
|
+
:source_uuid: ff374833-920c-40f6-ae6c-a71d33d99b82
|
|
95
|
+
"""
|
|
96
|
+
return EPI_RATIO * ijrc
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def epi_constraint_satisfied(
|
|
100
|
+
jrc: JuniorRiskCapital,
|
|
101
|
+
) -> bool:
|
|
102
|
+
"""True when the Prime's external JRC stays within the EPI limit.
|
|
103
|
+
|
|
104
|
+
True iff ``(SEJRC + TEJRC) <= EPI * IJRC``.
|
|
105
|
+
|
|
106
|
+
:source_uuid: ff374833-920c-40f6-ae6c-a71d33d99b82
|
|
107
|
+
"""
|
|
108
|
+
ejrc: float = total_ejrc(jrc)
|
|
109
|
+
ceiling: float = max_ejrc_from_epi(jrc.ijrc)
|
|
110
|
+
return ejrc <= ceiling
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# ── SPJ ratio (A.3.2.1.2.3.1.2) ────────────────────────────────────
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def spj_capacity(
|
|
117
|
+
jrc: JuniorRiskCapital,
|
|
118
|
+
) -> float:
|
|
119
|
+
"""Total SPJ capacity from the Prime's JRC pool.
|
|
120
|
+
|
|
121
|
+
Each JRC type has a distinct SPJ multiplier reflecting its quality
|
|
122
|
+
as a loss buffer. Total SPJ capacity determines how much SRC the
|
|
123
|
+
Prime can "enable" (or, alternatively, how much extra non-SPJ-bearing
|
|
124
|
+
EJRC it can source via A.3.2.1.2.3.1.2.1)::
|
|
125
|
+
|
|
126
|
+
SPJ_capacity = IJRC * SPJ_IJRC + SEJRC * SPJ_SEJRC + TEJRC * SPJ_TEJRC
|
|
127
|
+
|
|
128
|
+
Since SRC only absorbs losses after JRC is depleted, the enablement
|
|
129
|
+
mechanism validates that sufficient JRC backing exists before SRC is
|
|
130
|
+
counted as eligible capital.
|
|
131
|
+
|
|
132
|
+
:source_uuid: fbc9a273-d217-4d52-8b3e-b496580f27a2
|
|
133
|
+
"""
|
|
134
|
+
ijrc_contribution: float = jrc.ijrc * SPJ_IJRC
|
|
135
|
+
sejrc_contribution: float = jrc.sejrc * SPJ_SEJRC
|
|
136
|
+
tejrc_contribution: float = jrc.tejrc * SPJ_TEJRC
|
|
137
|
+
return ijrc_contribution + sejrc_contribution + tejrc_contribution
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def total_src(
|
|
141
|
+
src: SeniorRiskCapital,
|
|
142
|
+
) -> float:
|
|
143
|
+
"""Total Senior Risk Capital held by the Prime: ISRC + ESRC.
|
|
144
|
+
|
|
145
|
+
SRC is the second-loss layer: it absorbs losses only after JRC is
|
|
146
|
+
fully depleted. This total reflects what the Prime holds, but only
|
|
147
|
+
the portion "enabled" by SPJ capacity actually counts towards TRC.
|
|
148
|
+
|
|
149
|
+
:source_uuid: 6bba2076-5d5b-43fd-82c6-df6a35f67355
|
|
150
|
+
"""
|
|
151
|
+
return src.isrc + src.esrc
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def enabled_src(
|
|
155
|
+
spj_capacity_for_src: float,
|
|
156
|
+
src: SeniorRiskCapital,
|
|
157
|
+
) -> float:
|
|
158
|
+
"""Effective SRC that counts towards TRC.
|
|
159
|
+
|
|
160
|
+
A Prime may hold more SRC than its JRC can enable. Only the portion
|
|
161
|
+
backed by SPJ capacity is eligible — and even that is capped by what
|
|
162
|
+
the Prime actually holds::
|
|
163
|
+
|
|
164
|
+
enabled SRC = min(SPJ capacity allocated to SRC, total SRC held)
|
|
165
|
+
|
|
166
|
+
:source_uuid: fbc9a273-d217-4d52-8b3e-b496580f27a2
|
|
167
|
+
"""
|
|
168
|
+
held: float = total_src(src)
|
|
169
|
+
return min(spj_capacity_for_src, held)
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
# ── Alternative SPJ use (A.3.2.1.2.3.1.2.1) ────────────────────────
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def spj_allocation_valid(
|
|
176
|
+
spj_capacity_for_src: float,
|
|
177
|
+
spj_capacity_for_ejrc: float,
|
|
178
|
+
total_spj_capacity: float,
|
|
179
|
+
) -> bool:
|
|
180
|
+
"""True when the Prime's SPJ allocation does not exceed its capacity.
|
|
181
|
+
|
|
182
|
+
A Prime may split its SPJ capacity between two uses: enabling SRC
|
|
183
|
+
(standard) and sourcing additional EJRC (alternative). EJRC acquired
|
|
184
|
+
via the alternative use has SPJ = 0 permanently. Any capacity
|
|
185
|
+
allocated to one use cannot simultaneously be allocated to the other.
|
|
186
|
+
|
|
187
|
+
:source_uuid: 03029174-91b4-4974-af1e-52438556a70b
|
|
188
|
+
"""
|
|
189
|
+
return spj_capacity_for_src + spj_capacity_for_ejrc <= total_spj_capacity
|