CP92: Runtime Upgrade 1026

Uses component: CP3.1
Author(s): k/f
Contributor(s):@WilliamFreude, @mustermeiszer , @cdamian , @luis, @goperez
Proposal on Proposal Repository (Github): cps/cps/CP92.md at main · centrifuge/cps · GitHub
Date proposed: 2024-03-13

About this proposal

Upgrade Centrifuge Chain to Runtime Version 1026.

Centrifuge 1026 - Release Notes Highlights

This release is packed with new features and a few breaking changes. Most notably, the definition of the NAV has changed. So far, the NAV represented the so called assets under management (abbreviated by AUM) which are represented by the evaluation of existing loans:

- NAV := NAV(Loans)

With the introduction of Pool Fees, the definition of the NAV needs to be extended due to the reducing effect which the sum of pending pool fees have on the pool valuation, i.e. they represent the negative part. Please note that the Pool Fees NAV does not include disbursement amounts which can be paid during epoch execution because these already reduce the reserve.

+ NAV := min(PoolReserve + NAV(Loans) - NAV(PoolFees), 0)

Please replace any existing reserve and NAV query with the new runtime API added in #1703:

let { navAum, navFees, reserve, total: navTotal } =
    await api.call.poolsApi.nav(poolId)

Please note that runtime API metadata is not included in the v14 metadata such that you need to add type and runtime API call decorations manually.

Features and breaking changes

  • Add Pool Fees (#1633, #1706, #1718)
  • Replace external oracle implementation with internal one called Oracles V2 (#1629, #1661, #1670, #1671, #1672)
  • Loans
    • Integrate Oracles V2 (#1658)
    • Add increase_debt (#1691)
    • Expand TransferDebt event info (#1653)
    • Add linear accrual on settlement price (#1739)
  • Orderbook
    • [BREAKING] Add market prices via Oracles V2 (#1674)
    • [BREAKING] Remove TradingPairs storage (#1741)
  • Liquidity Pools:
    • Add token multiplexing: Add Local USDC and connect with ETH, Axelar, Arbitrum, Base and Celo USDC (#1713)
    • [BREAKING] Foreign Investments V2 with lower storage footprint (#1698)
    • Enable non-identical swaps (#1746)
    • Add queue for outgoing LP messages (#1696)
  • Add remarks pallet: Enables attaching remarks to transactions (#1659)
  • [BREAKING] Block Rewards: Replace absolute treasury inflation with relative one (#1740)
  • Transfer Allowlist:
    • Enable checks for nested transfer calls (#1702)
    • [BREAKING] Switch from blacklist to whitelist (#1693)
  • Add ERC-20 precompile for CFG balance to enable CFG bridging with Axelar ITS (#1731)
  • Add SwapCreated, SwapFulfilled and SwapCancelled to ForeignInvestments (#1764)

Runtime API

We have both extended existing as well as added new runtime API:

  • Pool Fees: Emulate epoch closing and pool fees update (#1728)
  • Pool Nav: Emulate epoch closing and return Loans NAV (assets under management), Pool Fees NAV, altered reserve as well as total NAV (#1703)
  • Loans API: Emulate portfolio update with custom prices (#1748)


✨ Your Substrate WASM Runtime is ready! ✨
Summary generated with srtool:1.75.0-0.14.0:
 Package     : centrifuge-runtime v0.10.26
 GIT commit  : 6fb8496
 GIT tag     : v0.10.37
 GIT branch  : main
 Rustc       : 1.75.0 (82e1608df 2023-12-21)
 Time        : 2024-03-12T15:36:55Z

== Compressed
🏋️  Runtime size:             1.825 MB (1,913,986 bytes)
🗜  Compressed:               Yes, 78.41%
✨ Reserved meta:            OK - [6D, 65, 74, 61]
🎁 Metadata version:         V14
🔥 Core version:             centrifuge-1026 (centrifuge-1.tx2.au1)
🗳️  system.setCode hash:      0x1afffb10cbdbe7e132b81d51c21e8dc803cf606f8a48e0974a2fbd13948ce01d
🗳️  Blake2-256 hash:          0x662ab43f34e78f0f722ce0391f5fb3246e76db88ee99c36d89bb89333e004e9e
📦 IPFS:                     https://www.ipfs.io/ipfs/Qmd16Zi95bTw3UMQif7mWs9Cobs4MraRwDgD2A64L39w5A

Release Notes: v0.10.37

Docker Image: docker pull centrifugeio/centrifuge-chain:main-6fb8496-2024-03-12

Full Changelog: v0.10.36…v0.10.37

Governance process for this proposal

  1. Council Motion + fast-track
  2. Referendum vote open for 21,600 blocks (~3 days)
  3. If the referendum passes, enactment will be immediately after

Council Motion 82 has just been submitted to the Centrifuge Council.

Please vote on Council Motion 82 at your earliest convenience Councillors!

:ballot_box: Vote in the portal: CP92: Runtime Upgrade 1026

:ballot_box: Vote on SubSquare: CP92: Runtime Upgrade 1026

@branan @thespaceacatjr @prankstr25 @cassidy @lucasvo @vedhavyas @mikiquantum @Yarosl6

Council Motion 82 has passed and has now become Referendum 48 for all CFG token holders to vote on.

The referendum is open for 21,600 blocks (~3 days).

:ballot_box: Vote in the portal: CP92: Runtime Upgrade 1026

:ballot_box: Vote on SubSquare: CP92: Runtime Upgrade 1026

Referendum 48 for CP92 has passed at block #5,094,031.

  • Aye (108) ≈ 7.41M CFG
  • Nay (0) = 0 CFG
  • Turnout (1.31%) ≈ 6.92M