-
Notifications
You must be signed in to change notification settings - Fork 49
SOV-5243: Adding BOS as Borrowing Pools collateral #567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables BOS token as collateral for borrowing pools across all Sovryn loan tokens (iXUSD, iRBTC, iBPRO, iDOC, iDLLR, iUSDT). The implementation includes deploying a price feed oracle, registering loan parameters for Torque borrowing mode, and providing comprehensive documentation and testing infrastructure.
Key Changes:
- Deployed
PriceFeedV1PoolOracleBOScontract for BOS token price feeds - Configured loan parameters with 50% min initial margin and 15% maintenance margin for Torque mode
- Added comprehensive documentation for collateral onboarding process
- Removed obsolete scripts and deployment artifacts for deprecated Zero protocol components
Reviewed changes
Copilot reviewed 30 out of 35 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests-onchain/sip0088.test.js |
New test validating SIP-0088 proposal execution and BOS collateral enablement |
hardhat/tasks/sips/args/sipArgs.js |
Added getArgsSip0088 function with BOS collateral setup parameters |
hardhat/tasks/bos.js |
New Hardhat tasks for BOS price feed deployment on Tenderly and RSK mainnet |
hardhat.config.js |
Added Tenderly virtual network configuration and reorganized imports |
contracts/feeds/PriceFeedV1PoolOracleBOS.sol |
New price feed oracle contract for BOS token |
deployment/deploy/2160-deploy-BOSPriceFeedV1PoolOracle.js |
Deployment script for BOS price feed with automated loan parameter setup |
docs/ADDING-NEW-COLLATERAL.md |
Comprehensive guide for onboarding new collateral assets |
scripts/contractInteraction/*.py |
Removed hardcoded gas price parameters |
scripts/contractInteraction/mainnet_contracts.json |
Removed deprecated Zero protocol contract references |
package.json |
Added Tenderly integration and updated solhint version |
| Various deployment artifacts | Removed deprecated Zero protocol contracts and BOS AMM converter references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const protocol = await ethers.getContract("ISovryn"); | ||
| const priceFeeds = await ethers.getContract("PriceFeeds"); | ||
| const bosToken = await get("BOS"); | ||
| const bosPriceFeedV1PoolOracle = await get("BOSPriceFeedV1PoolOracle"); // @todo update the address in the deployment file once deployed to the mainnet |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TODO comment indicates incomplete work. Either remove this comment after confirming the deployment address is correct, or track this as a separate issue if the deployment is still pending.
| abiCoder.encode(["address[]", "bool[]"], [[bosToken.address], [true]]), | ||
| ], | ||
| description: | ||
| "SIP-0088 : Enable BOS Token as collateral, Details: https://github.com/DistributedCollective/SIPS/blob/04ad90b/SIP-0088.md, sha256:", // @todo update the description |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SIP description is incomplete with a trailing 'sha256:' and a TODO comment. The sha256 hash should be added or the comment updated to reflect the final SIP document state.
| "SIP-0088 : Enable BOS Token as collateral, Details: https://github.com/DistributedCollective/SIPS/blob/04ad90b/SIP-0088.md, sha256:", // @todo update the description | |
| "SIP-0088 : Enable BOS Token as collateral, Details: https://github.com/DistributedCollective/SIPS/blob/04ad90b/SIP-0088.md", |
| // Tenderly cheatcode to top up native balance on the VT | ||
| // Normalize hex without leading zero nibble (Tenderly examples use 0xde0b6b3a7640000 for 1e18) | ||
| const rawHex = typeof fundAmount === "bigint" ? toBeHex(fundAmount) : hexlify(fundAmount); | ||
| const balanceHex = "0x" + BigInt(rawHex).toString(16); |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conversion logic is redundant. Line 19 already produces a hex string (with '0x' prefix from hexlify/toBeHex), then line 20 strips and re-adds the '0x' prefix. Simplify to const balanceHex = rawHex; or use the appropriate method directly.
| const balanceHex = "0x" + BigInt(rawHex).toString(16); | |
| const balanceHex = rawHex; |
No description provided.