VIP-211 Set RedStone as the PIVOT oracle for TRX and TRX_OLD

LINK

Summary

If passed, this VIP will perform the following actions:

  • Configure RedStone as the PIVOT oracle of the TRX and TRX_OLD tokens
  • Upgrade the address of the BoundValidator contract used by the ResilientOracle contract

Description

Enabled at VIP-123, Resilient Price Feeds is the logic used by the Venus Protocol to eliminate a single point of failure while fetching asset prices from on-chain sources. Read more about it in the published documentation.

This VIP configures the price feed provided by RedStone as the PIVOT oracle of TRX and TRX_OLD tokens. The price obtained from the MAIN oracle of these tokens (currently Chainlink) will be compared with the PIVOT price, and it will be discarded if the difference is too large.

The difference in the prices will be considered too large if the ratio “pivot_price / main_price” is not between 0.99 and 1.01. These thresholds have been calculated analysing historical data of both (RedStone and Chainlink) price feeds. It can be modified in the future via VIP.

Security and additional considerations

There were not any changes in the deployed codebase. We applied the following security procedures for this upgrade:

  • Prices pre/post upgrade: in a simulation environment, validating the asset prices pre-upgrade are the same as post-upgrade
  • Deployment on testnet: the same setup has been deployed to testnet, and used in the Venus Protocol testnet deployment

Deployed contracts on main net

References

Voting options

  • For – Execute this proposal
  • Against – Do not execute this proposal
  • Abstain – Indifferent to execution

Operation

0x1BB765b741A5f3C2A338369DAb539385534E3343.upgrade(“0x6592b5DE802159F3E74B2486b091D11a8256ab8A”, “0xB5d7A073d77102ad56B7482b18E7204c1a71C8B9”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setDirectPrice(address,uint256)”, “0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setDirectPrice(address,uint256)”, “0x555ba73dB1b006F3f2C7dB7126d6e4343aDBce02”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setDirectPrice(address,uint256)”, “0x213c446ec11e45b15a6E29C1C1b402B8897f606d”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setTokenConfig(TokenConfig)”, “0x939bD8d64c0A9583A7Dcea9933f7b21697ab6396”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setTokenConfig(TokenConfig)”, “0x555ba73dB1b006F3f2C7dB7126d6e4343aDBce02”)

0x4788629ABc6cFCA10F9f969efdEAa1cF70c23555.giveCallPermission(“0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, “setTokenConfig(TokenConfig)”, “0x213c446ec11e45b15a6E29C1C1b402B8897f606d”)

0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a.acceptOwnership()

0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a.setTokenConfig([“0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3”, “0xa17362dd9AD6d0aF646D7C8f8578fddbfc90B916”, 1500])

0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a.setTokenConfig([“0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B”, “0xa17362dd9AD6d0aF646D7C8f8578fddbfc90B916”, 1500])

0x6E332fF0bB52475304494E4AE5063c1051c7d735.setValidateConfig([“0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3”, 1010000000000000000, 990000000000000000])

0x6E332fF0bB52475304494E4AE5063c1051c7d735.setValidateConfig([“0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B”, 1010000000000000000, 990000000000000000])

ResilientOracle.setOracle(“0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3”, “0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, 1)

ResilientOracle.enableOracle(“0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3”, 1, true)

ResilientOracle.setOracle(“0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B”, “0x8455EFA4D7Ff63b8BFD96AdD889483Ea7d39B70a”, 1)

ResilientOracle.enableOracle(“0x85EAC5Ac2F758618dFa09bDbe0cf174e7d574D5B”, 1, true)


Related Tags: