feat: implement risk-pool and governance-dao contracts with full test suites (v2)#1
Merged
Conversation
…ys, and risk pool economics
… to all crate manifests
…oposalStatus, VoteChoice
…nalize, execute, cancel
…nd batch_submit_data
…ims in one invocation
…able liquidity tests
…and even count median tests
… and registered keys
… risk category table
…tion, and mainnet steps
…00% utilization, multi-lock
…e, and check-balances targets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
contracts/risk-pool): Full LP deposit/withdraw system with proportional share minting, 80/10/10 premium routing to LPs/treasury/backstop, yield claim, capital locking per policy, pause/resume controls, and 25+ unit tests across 3 test filescontracts/governance-dao): Token-weighted proposal lifecycle (create → vote → finalize → execute/cancel) with configurable quorum and majority thresholds, 15+ unit testsverify_trigger_freshwith staleness check,batch_submit_data,OracleHealthtype; 10 new testsemergency_pause/emergency_resume,ProductStatstype,is_pausedquery; 8 new testsbatch_auto_processfor settling multiple pending claims in one call; integration tests with real cross-contract executiondeploy_mainnet.sh(dual-confirmation gate),create_products.sh,register_oracle.sh,submit_oracle_data.sh,check_balances.shARCHITECTURE.md,SECURITY.md,CONTRIBUTING.md,docs/economics.md,docs/oracle-key-format.md,docs/deployment-checklist.mdThis branch adds 35 new commits on top of the v1 baseline, bringing the total to 40 professional commits across all 5 contracts.
Test plan
make test— all unit and integration tests passmake lint— zero clippy warningsmake build— all 5 WASM targets build successfullymake wasm-sizes— verify binary sizes are within reasonable bounds./scripts/deploy_testnet.sh