Refactor supply and borrow rewards distribution

Strike Finance will propose to set strike speeds for supply and borrow individually.
In order to prevent STRK dumpers who only supplied and sell STRK, Strike Finance will assign the original STRK rewards 30% to supplier and 70% to borrowers.

Therefore, only royal strike protocol members can earn high STRK rewards in borrowing.

Checking the transaction log, the strike speeds seem to have been changed to the following, is there a mistake? Particularly on ETH and STRK

Asset Previous New Total Rewards
ETH 10000000000000000 0
USDT 10000000000000000 10000000000000000
USDC 10000000000000000 10000000000000000
BUSD 8333333333333330 8333333333333330
LINK 1666666666666670 1666666666666670
UNI 1666666666666670 1666666666666670
WBTC 10000000000000000 10000000000000000
COMP 1666666666666670 1666666666666670
SXP 1666666666666670 1666666666666670
STRK 16666666666666700 1666666666666670

Simulating it in a ganache fork, can confirm the outcome doesn’t match the current distribution rates:

After queue(9) and execute(9), this is the outcome of

for i in strk.getAllMarkets(): print([i, strk.strikeBorrowSpeeds(i), strk.strikeSupplySpeeds(i)])

['0xbEe9Cf658702527b0AcB2719c1FAA29EdC006a92', 0, 0]
['0x69702cfd7DAd8bCcAA24D6B440159404AAA140F5', 7000000000000000, 3000000000000000]
['0x3774E825d567125988Fb293e926064B6FAa71DAB', 7000000000000000, 3000000000000000]
['0x18A908eD663823C908A900b934D6249d4befbE44', 5833333333333330, 2500000000000000]
['0x3F3B3B269d9f7088B022290906acff8710914be1', 1166666666666670, 500000000000000]
['0x280f76a218DDC8d56B490B5835e251E55a2e8F8d', 1166666666666670, 500000000000000]
['0x9d1C2A187cf908aEd8CFAe2353Ef72F06223d54D', 7000000000000000, 3000000000000000]
['0xb7E11002228D599F2a64b0C44D2299C9c644ff26', 1166666666666670, 500000000000000]
['0xdBee1d8C452c781C17Ea20115CbaD0d5f627a680', 1166666666666670, 500000000000000]
['0x4164e5b047842Ad7dFf18fc6A6e63a1e40610f46', 1166666666666670, 500000000000000]

Also, because strikeAccrued for supply is determined by mul_(deltaBlocks, supplySpeed), where

supplySpeed is strikeSupplySpeeds[sToken] in the new code
supplySpeed is strikeSpeeds[sToken] in the old code

This means all rewards are effectively halved, since for instance supply USDT drops from 10000000000000000 to 3000000000000000, and borrow USDT drops from 10000000000000000 to 7000000000000000.

Asset Previous Supply Speed Proposed Borrow Speed Correct 70% Borrow Speed Previous Borrow Speed Proposed Borrow Speed Correct 30% Supply Spped
ETH 10000000000000000 0 14000000000000000 10000000000000000 0 6000000000000000
USDT 10000000000000000 7000000000000000 14000000000000000 10000000000000000 3000000000000000 6000000000000000
USDC 10000000000000000 7000000000000000 14000000000000000 10000000000000000 3000000000000000 6000000000000000
BUSD 8333333333333330 5833333333333330 11666666666666700 8333333333333330 2500000000000000 5000000000000000
LINK 1666666666666670 1166666666666670 2333333333333340 1666666666666670 500000000000000 1000000000000000
UNI 1666666666666670 1166666666666670 2333333333333340 1666666666666670 500000000000000 1000000000000000
WBTC 10000000000000000 7000000000000000 14000000000000000 10000000000000000 3000000000000000 6000000000000000
COMP 1666666666666670 1166666666666670 2333333333333340 1666666666666670 500000000000000 1000000000000000
SXP 1666666666666670 1166666666666670 2333333333333340 1666666666666670 500000000000000 1000000000000000
STRK 16666666666666700 1166666666666670 23333333333333400 16666666666666700 500000000000000 10000000000000000

Your calculation wrong as supply and borrow speed should be splitted by original speed therefore if original speed 10000000000000000, this value should vary to supply and borrow

strikeAccrued for supply is determined by mul_(deltaBlocks, supplySpeed), where

supplySpeed is strikeSupplySpeeds[sToken] in the new code
supplySpeed is strikeSpeeds[sToken] in the old code

borrowSpeed is strikeBorrowSpeeds[sToken] in the new code
borrowSpeed is strikeSpeeds[sToken] in the old code

Supply speed drops 70%, from supplySpeed of 10000000000000000 to 3000000000000000
Borrow speed drops 30% from 10000000000000000 to 7000000000000000.

Correct should be
Supply speed of 6000000000000000, supply speed drops 40%
Borrow speed of 14000000000000000, borrow speed increases 40%

Just for your team’s reference.

Just for teams reference,

SIP10 sets speed to 300000000000000 and 700000000000000, which is 10x less than 3000000000000000 and 7000000000000000

In table form and in exponent form,

Asset SupplySpeed BorrowSpeed
ETH 3E+14 3E+14
USDT 3E+15 7E+15