SIP - Keeper Function: Settlement of Exchange Entries

Chainlink could upgrade their Aggregators and RoundIDs will not be chronologically ordered. Fee reclamation / exchanging would be blocked if the RoundID’s were wiped and the trades are not settled.

  • Ensure keeper system to incentivise Exchange.settle() is called to settle fee reclamation in a timely manner.

  • Unsettled trades cause an in-determinate effect on the debt pool.

SNX incentive to be paid out proportional to the trade amount size and exchange fees paid to make it not economically profitable to create multiple small exchanges for settlement to drain the incentives pool. The optimal balance would be that the USD value of the keeper rewards would be less than the exchange fees paid + gas cost cost of an exchange transaction, so this would discourage gaming of the keeper’s rewards.

Action Gas Cost
Exchange 405,865
Settle 51,860

An exchange transaction costs ~8x the amount of gas of settle, so given that the keeper’s reward for settling exchange entries is less than multiples of the gas costs for settle(), it would incentivise genuine keepers to settle exchanges.

For exchange entries with $0 fee paid, these will not earn any keeper rewards if settled.

In the case where the keeper reward is less than the cost of settling exchange entries (due to gas price costs and congestion) then this could be covered by the protocol which can settle the remaining entries.

Configurable Values (Via SCCP)

Each action that a keeper could perform will have a configurable amount of USD value / SNX / token rewards that are paid to cover gas costs and running a keeper system.

gas: currency/eth rate : 235.00 usd/eth

Action Est Gas Cost Gas Price $USD Cost $USD Reward
2. Settle Exchange 1x entry 51,860 35 gwei/gas 0.4265485 0.75
2a. Settle Exchange 2x entries 98,886 35 gwei/gas 0.81333735 1.50

So a question here please, is that if the keeper didn’t do his job and the roundID were wiped, is there a backstop, some way to push reclamation through?

Can you please help me understand why is the “gas cost cost of an exchange transaction” included in the computation here… I mean, reward being lower than exchange fees avoids gaming this well enough. Adding gas cost of an exchange would make it make more possible to manipulate, because I’m assuming you’ll be using the live gasPrice * gas used… so the gaming would take the form of making exchanges when gasPrice is low and trigger settle when gas is high (the threshold goes up). But I understand that it isn’t a sure thing given that other actors could reap these rewards… Nevertheless, using the exchange fees are the upper bound provides better protection ? I mean there needs to be a backstop for those not triggered, as they fall below that threshold, might as well add those trades who’s rewards falls between exchange fees and gas fees…

The protocol dao will take action to settle any remaining Exchange entries before Chainlink aggregators get upgraded. We’ve taken this action in the Acrux release.

1 Like

Actually the gas cost of an making an exchange entry is 400,000 (a synthetix exchange) compared to the cost of settling an entry is 50,000 (a magnitude of 8x larger), making it hard for someone to game the incentives by creating many small value exchange’s as the gas costs would not cover the rewards. By keeping the reward value for each settled entry to within a range just above the cost of the settle() transaction cost + 50-75% on top as reward it will make it unlikely to be gamed.

Another scenario is the possibility of setting very low gas price for the settlement transactions however other efficient keepers would be able to use a higher gwei to take advantage of the reward (and they won’t have the marginal cost of creating these fake exchanges).

1 Like

Ok that makes sense now… so the reward would have as a hard upper bound the gas cost of an exchange… Sorry the confusion what threw me off was this sentence below:

Here it is written that the optimal balance (being the reward to the keeper I assumed) would be bounded up by exchange fees paid + gas cost of an exchange… So technically, a possible reward is one having a value higher than the gas cost of an exchange but lower than the gas cost of an exchange + exchange fees paid

1 Like