Feb 1, 2024

Fix Division to Account for USDC Decimals in RICO:USDC Pool

Txhash: 0x2b90f4c2814586f660f063087d2bfdd6245009d06e46519b40477cbc623f5647

The deployment script divided the RICO:USDC UniswapV3 oracle output by 10 ^ 12 instead of 10 ^ -12 when constructing the RICO:XAU feed. This multisig action replaces the constant 10 ^ 12 with 10 ^ -12.

RICO:XAU feed structure after this change: core feeds

Address: arb1:0xaBBaA2D71b7f0D86857A0822945AE1083DC30F9b

Data: 0x162789b57269636f3a7265660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000300000000000000000000000011a3502dc6b1ae79b2e11cfc9a9a3dd434a26929000000000000000000000000ae0b1cc6044738b5a0ef030f8c075440738c6f990000000000000000000000003a30c38208290cec3debcdb16e9f6e857fffd26f00000000000000000000000000000000000000000000000000000000000000037269636f3a7573640000000000000000000000000000000000000000000000007861753a7573640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038d7ea4c68000

How we got it:

Load ricobank pack: bafkreihqad3xblizwul5mapncataszn2syjdbpzib6fuvzyz3spvdtuayi.

> dapp = await dpack.load('bafkreihqad3xblizwul5mapncataszn2syjdbpzib6fuvzyz3spvdtuayi', ethers, ali)
> divider = dapp.divider
> config = await divider.getConfig(b32('rico:ref'))
> bn2b32 = (bn) => ethers.utils.hexZeroPad(bn.toHexString(), 32)
> config = [config[0], [config[1][0], config[1][1], bn2b32(BN.from(10).pow(27 - 12))]]
> txdata = divider.interface.encodeFunctionData('setConfig', [b32('rico:ref'), config])