diff --git a/SIP-0093.md b/SIP-0093.md new file mode 100644 index 0000000..fdef96b --- /dev/null +++ b/SIP-0093.md @@ -0,0 +1,124 @@ +--- +SIP: '0093' +Title: Disable SOV and BPro as Lending-Pool Collateral +Author: Edan Yago (@YagoBit) +Status: Draft +Track: Contract +Created: 2026-06-18 +--- + +# SIP-0093: Disable SOV and BPro as Lending-Pool Collateral + +## Summary + +This SIP disables SOV and BPro as collateral assets for new Sovryn lending-pool borrowing and margin-trading positions. The change applies to both Torque loans and fixed-term margin-trading loan parameters on every lending pool where those collateral assets are currently enabled. + +The proposal does not remove SOV or BPro from the protocol token allowlist, price feeds, or swap support. Existing positions backed by SOV or BPro remain open and continue to be repayable, collateral-manageable, closeable, rollable where applicable, and liquidatable under the current protocol rules. + +## Motivation + +SOV and BPro are volatile collateral assets. Keeping them available as collateral for new borrowing and margin trading exposes lending pools to collateral drawdown risk while providing limited strategic value for new position creation. Removing them from the list of accepted collateral assets reduces the risk surface of lending pools without forcing existing borrowers or traders into an immediate unwind. + +The intended outcome is conservative: stop new exposure from being created, while allowing current exposure to resolve naturally through repayment, closure, rollover mechanics, or liquidation. + +## Proposed Changes + +For each enabled lending-pool loan token, call: + +``` +disableLoanParams(address[] collateralTokens, bool[] isTorqueLoans) +``` + +The SIP disables active SOV and BPro collateral loan parameters for both modes: + +- `isTorqueLoans = true`: Torque borrowing +- `isTorqueLoans = false`: margin trading + +The live-state check at draft time showed the following enabled parameters: + +| Loan token | SOV Torque | SOV Margin | BPro Torque | BPro Margin | +| ---------- | ----------- | ----------- | ----------- | ----------- | +| iXUSD | Enabled | Enabled | Enabled | Enabled | +| iRBTC | Enabled | Enabled | Enabled | Enabled | +| iBPRO | Enabled | Enabled | Not enabled | Not enabled | +| iDOC | Enabled | Enabled | Enabled | Enabled | +| iDLLR | Enabled | Enabled | Enabled | Enabled | +| iUSDT | Not enabled | Not enabled | Enabled | Enabled | + +The RUSDT/iUSDT lending pool is not currently exposed as a borrow market in the +Sovryn app UI, but its BPro Torque and margin loan-parameter entries are still +active onchain. This SIP disables those active onchain entries as a defensive +cleanup action. + +The proposal builder checks live `loanParamsIds` and protocol loan-param activity before encoding actions. Already-disabled or absent pairs are skipped so the proposal does not include calls that would revert. + +## Technical Details + +Each loan token stores local collateral/mode pointers in `loanParamsIds[keccak256(collateralToken, isTorqueLoan)]`. Calling `disableLoanParams` on the loan token deletes those local pointers and forwards the matching loan-param IDs to the Sovryn protocol, where the corresponding `LoanParams.active` flags are set to `false`. + +Opening or increasing a borrow or margin trade goes through `LoanOpenings._initializeLoan`, which requires the referenced loan params to be active. Once disabled, SOV and BPro can no longer be used to create new positions or increase existing positions under the disabled loan params. + +Existing loans store their original `loanParamsId`. Maintenance and closure paths require the loan to be active and the params to exist, but they do not require `LoanParams.active == true`. Therefore, existing positions remain operational: + +- borrowers can repay or close with deposit; +- margin traders can close with swap while token swap support remains enabled; +- borrowers can add collateral; +- borrowers can withdraw collateral up to the normal max-drawdown limit; +- unhealthy positions can be liquidated; +- price feeds and swap support remain available for closing and liquidation flows. + +## Implementation + +This SIP is executed through `GovernorAdmin`, because `disableLoanParams(address[],bool[])` on each loan token is gated by `onlyAdmin` and the relevant loan-token `admin()` is the `TimelockAdmin` controlled by `GovernorAdmin`. + +The expected actions are: + +``` +LoanToken_iXUSD.disableLoanParams([SOV, SOV, BPro, BPro], [true, false, true, false]) +LoanToken_iRBTC.disableLoanParams([SOV, SOV, BPro, BPro], [true, false, true, false]) +LoanToken_iBPRO.disableLoanParams([SOV, SOV], [true, false]) +LoanToken_iDOC.disableLoanParams([SOV, SOV, BPro, BPro], [true, false, true, false]) +LoanToken_iDLLR.disableLoanParams([SOV, SOV, BPro, BPro], [true, false, true, false]) +LoanToken_iUSDT.disableLoanParams([BPro, BPro], [true, false]) +``` + +Token addresses: + +- SOV: `0xEFc78fc7d48b64958315949279Ba181c2114ABBd` +- BPro: `0x440cd83c160de5c96ddb20246815ea44c7abbca8` + +Loan-token targets: + +- iXUSD: `0x8F77ecf69711a4b346f23109c40416BE3dC7f129` +- iRBTC: `0xa9DcDC63eaBb8a2b6f39D7fF9429d88340044a7A` +- iBPRO: `0x6e2fb26a60da535732f8149b25018c9c0823a715` +- iDOC: `0xd8D25f03EBbA94E15Df2eD4d6D38276B595593c1` +- iDLLR: `0x077FCB01cAb070a30bC14b44559C96F529eE017F` +- iUSDT: `0x849c47f9c259e9d62f289bf1b2729039698d8387` + +## Risks + +### Risks introduced + +- **Reduced borrower flexibility.** Users can no longer open new loans or margin trades using SOV or BPro collateral. +- **Integrator assumptions.** Frontends, bots, and analytics that assume SOV or BPro are valid collateral options must update their availability checks. + +### Risk mitigants + +- **Existing positions are not forcibly closed.** The change disables loan params for future use but does not delete loan params or close active loans. +- **Close and liquidation paths remain available.** SOV and BPro remain supported tokens for swaps and pricing, so margin close and liquidation flows are not blocked by this SIP. +- **Reversible for future positions.** Governance can re-enable the collateral assets later by setting up replacement loan params, although this SIP is intended as a risk-reduction measure rather than a temporary pause. + +## Validation + +The implementation includes on-chain/fork validation for the generated proposal arguments: + +- verify every encoded pair has an active loan-param entry before execution; +- verify disabled or absent pairs are skipped; +- verify the generated target set matches the mainnet enabled-pair inventory above; +- on a mainnet fork, impersonate `TimelockAdmin`, execute the encoded calls, and confirm the local `loanParamsIds` pointers are deleted while protocol loan params become inactive; +- confirm SOV and BPro remain supported tokens after the disable calls. + +## License + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).