Overview of Ungovernance Phase Two

As we are approaching the second ungovernance stage, we should all take a look at what will happen in the next few months. For a refresher on RAI ungovernance, check out the official docs.

Contract Updates / Deployments

  • Deploy a gas “oracle” that is only used to feed a gas price inside the contract which recomputes the RAI debt floor amount for Safes. Given that there is no cheap and reliable oracle that offers something like an average gas price over the last 1 week or 1 month, this “oracle” simply returns a fixed value that can be changed by governance vote. The DAO can set a really conservative value (e.g 1 terra gwei) for the gas price oracle which can then be used by the protocol to recalculate the Safes’ debt floor. The contract that recalculates the debt floor does not need a precise (read: real time) value and it is actually safer to use a conservative approach
    • After deployment, set a conservative value of 1 terra gwei in this gas price oracle
    • Also, connect this gas price oracle to the contract that recalculates the debt floor for each RAI Safe
  • Redeploy the contract that periodically recalculates the protocol surplus buffer. The current version of this contract always tends to calculate a higher surplus buffer as time goes by, regardless of whether the amount of RAI in circulation increases or not
    • The contract will target a minimum of 500K RAI in the surplus buffer. The formula used by the contract will be max(500,000, 0.5% * total_rai_debt)
  • The FLX token minter described in this post
  • As discussed in this post about RAI controller ungovernance, replace the current controller logic to use percentage error instead of absolute error in order to future proof the protocol. For now, the proposal is to keep the controller governed and establish bounds for Kp and Ki later on
    • Note that this means governance will be allowed to enable/disable the P & I terms
  • Most important, deploy a Compound Governor instance that uses FLX to govern the remaining RAI components and the DAO treasury (a simple smart contract holding FLX for the DAO, with an implementation here)

Phase Two Ungoverned Contracts

The following is a list of contracts that are ungoverned in the second stage as well as governance minimization contracts that still allow for a limited array of parameters to be changed.

  • Safe Engine - governance cannot change any parameter
  • Accounting Engine - governance cannot change any parameter
  • Global Settlement - governance cannot change any parameter
  • Staking Pool (Lender of First Resort) - governance should be allowed to change four parameters: minStakedTokensToKeep (the minimum amount of FLX/ETH LP tokens that should always be kept in the staking pool, without being auctioned off for RAI), escrowPaused which allows all staking rewards to be sent to stakers without a portion being unlocked over a longer period of time, tokensToAuction which is the amount of LP tokens to offer in a single auction and systemCoinsToRequest which is the minimum amount of RAI to request for tokensToAuction LP tokens; governance should also be allowed to specify that LP token auction can be bypassed (in case of a bug related to auctions)
  • Protocol Token Authority - governance cannot change any parameter (no new address is allowed to mint FLX besides the debt auction house and the inflation minter)
  • Protocol Token Printing Permissions - governance cannot change any parameter
  • Auto Surplus Buffer Setter - governance will be able to pause surplus buffer recalculations but apart from that, nothing else
  • Staking Reward Adjuster - this contract automatically recomputes the amount of FLX that goes to the lender of first resort pool every block. It also sends FLX to the lender of first resort when a staker claims their accrued rewards. Governance can fully ungovern the contract
  • Staked Tokens to Keep Setter - this contract recalculates the amount of LP tokens to keep in the lender of first resort without auctioning them off when the protocol is underwater. It recalculates the amount of tokens to keep as 70% of the pool size
  • Redemption Price Snap - this contract maintains a local copy of the latest redemption price it fetched from the protocol. It is used by the mStable & Curve RAI pools so that they follow RAI’s latest internal price

Contracts that Remain Mostly Governed

The following is a list of contracts that, at least in the near future, will remain governed. “Governed” in this context means that governance can change core/important parameters in these contracts.

  • Rewards Relayer for the RAI Oracle - this contract offers RAI incentives to update the RAI oracle used to feed price data in the controller
  • Rewards Relayer for the ETH OSM - this contract offers RAI incentives to update the ETH OSM
  • RAI Controller - for now, governance should be allowed to change Kp, Ki and leak (alpha) values. Apart from this, all other parameters should be immutable
  • Debt Popper Rewards - this contract offers RAI rewards to addresses that “pop” liquidated RAI debt from the debt queue in the Accounting Engine
  • Stability Fee Treasury - this contract is in charge with storing a portion of RAI coming from stability fees and offering that RAI to addresses that update different protocol components (e.g oracles)
  • Merkle Distributor Factory - this contract can be used to create monthly incentive distributions
  • Any Saviour or Saviour related contract
  • DS Pause and the DS Pause Authority which are part of the governance module and are by definition, governed
  • RAI, FLX, gas price & ETH oracles

These contracts that are mostly governed can be split in four categories:

  1. Contracts that interact with or receive data from the outside world (oracles, ETH OSM, saviours)
  2. Contracts that manage internal resources that are used to incentivize outside behaviour (SF treasury, debt popper rewards, rewards relayers for oracles)
  3. RAI controller contract/s
  4. Contracts that are part of the governance module (e.g DS Pause)
5 Likes

Also wanted to post the proposed parameters for the Compound Governor used in the Reflexer DAO.

  • votingDelay: 1 block. The delay before voting on a proposal may take place, once proposed, in blocks
  • votingPeriod: 19,938 blocks (about 3 days). The duration of voting on a proposal, in blocks
  • quorumVotes: 20,000 FLX. The number of votes for a proposal required in order for a quorum to be reached and for a vote to succeed
  • proposalThreshold: 3000 FLX. The number of votes required in order for a voter to become a proposer
  • MIN_PROPOSAL_THRESHOLD: 1000 FLX. The minimum setable proposal threshold
  • MAX_PROPOSAL_THRESHOLD: 15,000 FLX. The maximum setable proposal threshold
  • MIN_VOTING_PERIOD: 6600 blocks (approx 24 hours). The minimum setable voting period
  • MAX_VOTING_PERIOD: 46,500 blocks (about 7 days). The max setable voting period
  • MIN_VOTING_DELAY: 1 block. The min setable voting delay
  • MAX_VOTING_DELAY: 6600 blocks (about 24 hours). The max setable voting delay
  • MIN_QUORUM_VOTES: 10,000 FLX. The minimum setable proposal threshold
  • MAX_QUORUM_VOTES: 100,000 FLX. The maximum setable proposal threshold

Notes from 6/8 ungovernance meeting:

Contract Updates / Deployments

Gas Oracle

  • determines the “Safe Debt Floor” (minimum amount of RAI that you can draw from a Safe
  • the safe debt floor must be high enough that liquidating safes are always profitable
  • currently set by governance, will continue to be set by governance
  • no easy oracle that we found today
  • for comparison, maker has ~10K minimum DAI debt value
  • want to run a separate gas price oracle for the Safe Debt Floor, because the gas price oracle is also used for pinger compensation - we don’t want to overpay pinger bots, but we also don’t want to make the debt floor too low (bc then liquidations are unprofitable)
  • the Rewards Relayer will still be governed and can be used to change how pingers are paid

Surplus Buffer

  • always need to keep minimum amount of RAI in the surplus buffer
  • the contract will target a minimum of 500K RAI in the surplus buffer. The formula used by the contract will be max(500,000, 0.5% * total_rai_debt)
  • there is risk of surplus buffer getting so big that in a global settlement case RAI holders would get >1 RAI, and bc we don’t want to incentivize global settlement…
  • Q - when we wipe out RAI treasury do we also wipe out pinger budget? A - no, pinger treasury is separate.

Controller Ungovernance

Compound Governor

FLX minter

  • DAO Funding & Treasury
  • pushback on terminal FLX inflation (e.g. 2%/y)
  • response - could be governed by DAO
  • decisions to make (in the future):
    • should the DAO be able to mint FLX?
    • if so, should there be a hard upper limit to DAO FLX inflation?
    • if so, what should be the hard upper limit?

Phase Two Ungoverned Contracts

  • note - we will be going more granular on these at a later date…

Safe Engine

  • collateral ratio → 135%
  • debt floor → set by contract that ingests gas price oracle
  • ETH as only collateral type

Accounting Engine

  • tracks RAI surplus and deficit
  • allows triggering of RAI surplus auctions, once RAI in treasury is over some threshold
  • allows triggering of RAI debt auctions (to sell off FLX for RAI to cover bad debt)

Global Settlement

  • cooldown period
  • min FLX to burn to trigger (10%)

Staking Pool

  • agree on keeping the staking params governed as it is still a new feature

Protocol Token Authority

  • governance cannot change any parameter (no new address is allowed to mint FLX besides the debt auction house and the inflation minter)
  • we can probably remove the Protocol Token Printing Permissions bc only the two contracts above need to mint

Staking Reward Adjuster

  • this contract automatically recomputes the amount of FLX that goes to the lender of first resort pool every block. It also sends FLX to the lender of first resort when a staker claims their accrued rewards
  • this is fine to ungovern, it receives a fixed daily amount of FLX and spreads it out over 28 days to keep the FLX distro the smae

One more thing which wasn’t mentioned: there is a variable inside the protocol called popDebtDelay which dictates when bad debt can be settled/nullified with surplus once a liquidation starts.

popDebtDelay is currently set to 3 days meaning that once a liquidation starts, it has 3 days to run before the bad debt it confiscated will pop and try to be settled with surplus. If the auction doesn’t finalize within 3 days, some/all of the bad debt may not be covered.

Three days is arguably a short period of time in a protocol that will not be able to change that variable. The proposed value for that variable prior to ungovernance is 28 days (4 weeks) which will provide ample time to the market to bid in liquidations.

Notes from 7/7 ungovernance meeting:

Collateral Auctions

  • previously we thought the auctions should be fixed discount & penalty, now we want to introduce a fixed bound for discount & penalty
  • got a report on unify by a dev on a potential attack
  • there is an attack where if ETH drops 25% in 1 hour you could profitably self-liquidate your SAFE, which shouldn’t be possible (“auction grinding”)
  • as a solution, we propose governance to set the penalty within bounds of 9-15% and the minimum/maximum discount between 0-15%
  • governance will NOT be able to change these bounds, but WILL be able to change the parameters within these bounds
  • note from ameen: this seems fine, discount starting at 8% seemed too aggressive, hardcoded bounds are still aligned with ungovernance

Global Settlement

  • community members brought up that RAI needs credible threat of global settlement in order to enforce redemption price game theory

  • right now global settlement can only be triggered by burning 10% of the outstanding FLX supply

  • 90K FLX is a lot of money, you would need at least a few million to buy it on the market today

  • It also shouldn’t be too hard to settle, so the threat remains credible

  • Question: should we allow settlement via governance (in addition to burning)

  • Ameen’s thoughts - what would make a FLX burn attack profitable? what scenarios?

Potential Scenarios:
#1 bug in ungoverned contract that we can no longer control
#2 reflexer takes on so much bad debt that we can’t pay out

Ameen’s counter:

  • if it’s not bad enough to crash the FLX price, then it doesn’t seem like it would be that bad
  • if it is bad enough to crash the FLX price, then global settlement is cheap again

Stefan: proposes ice age - have 2/3 years where we can vote to close

Question: Can governance change the global settlement burn % requirement?
Stefan: No, that would sort of defeat the purpose.

No concrete decisions, will continue to think about this…

Ameen’s thots on controller:

  • P-rate seems to be working OK
  • I-rate seems too strong
  • Suggest we do a 1 yr experiment with a weaker Ki (5.55 E-15) and slower alpha (360 day reset)
1 Like
  • I-rate seems too strong
  • Suggest we do a 1 yr experiment with a weaker Ki (5.55 E-15) and slower alpha (360 day reset)

Obviously since RAI shorts are my only hobby, I am biased to like the strong iRate.
My intuition is that a faster iRate and faster pRate give the market more “control” over the redemption price and in theory should help the RAI price hit a “fair market value” equilibrium price faster. However, right now the market isn’t reacting the way the Money God desires and I blame much of this on the RAI/DAI mint incentive.

After listening to Ameen’s thoughts during the call last week, I agree iRate is probably too strong but I’m not 100% convinced. I would prefer we wait until we tweak the RAI/DAI minting incentives and see what happens.

Proposal: lower RAI/DAI incentive, see what happens over the course of 2-4 weeks, then commence Ameen’s proposed experiment.

Notes from 7/14 ungovernance meeting:

Last sync before ungovernance

Ameen on controller:

  • will propose to update I-params in 2-3 months
  • want to wait for the current -10% integral to decay over next 2 months
  • afterwards we plan to drain the remaining integral before we switch to the new integral (if we didn’t do this, the existing integral would take longer to decay than it originally would have because we’re slowing down the decay rate)
  • whether or not RAI goes up from here we will likely drain the integral and switch to the new params by Devcon in October, possibly earlier
  • Kingfish recommended pulling the trigger to drain the integral once we hit ~3% integral rate - Ameen agrees with this, it would happen in minimum ~2 months anyways

Global Settlement

  • stefan on a possible solution:
  • have a 28 day “grace period” whereas governance can vote to initial global settlement, but governance can also vote to stop the global settlement from proceeding within the 28 day window
  • ameen - this seems fine, if an attacker could attack the system they would target the oracles anyways, which they could do in 4 days without waiting, so this doesn’t add the need for any additional vigilance beyond what will already be required
1 Like