How to update the merkle root?

Since tornado donation account is no longer doing updates, I’m wondering how I could update myself.

Right now, gas prices are cheap, so it would probably cost $30 a batch.

Problem is that I don’t find time to study the source code of the GH repo. Would appreciate some straightforward instructions how to execute an update.

Best regards.

5 Likes

I am also interested in this. We should have an automatic way of doing this or it should be clearly documented

3 Likes

I also need this.

It’s been stuck for the past 2-3 weeks without updating. Is there any way I can run a transaction to update the block that contains my transactions?

Thanks

1 Like

@ethdev is it possible to dev something to be able to update the merkle root with governance funds ?

1 Like

Yes. @xgozzy and I were actually just DMing about this. There are a couple different options:

  • Option 1: Perfect Subsidy - an oracle is used to try to calculate as best as possible how much gas was spent on the tx and then send an equivalent amount of TORN to the msg.sender to cover this cost
  • Option 2: Auction Mechanism - after each merkle root update, a slow stream of TORN is added to a pool until someone calls the updater function and claims however much TORN has built up (sometimes it will be worth less than gas costs, sometimes more)

In theory option 2 will save governance more TORN, because people will be willing to call the updater even before it becomes as valuable as gas costs

3 Likes

Option 2 seems better and there are Auction Mechanism already done by other Defi projects

3 Likes

The auction-style mechanism is certainly the more effective route here, when one weighs the many possible attack vectors with architecting an oracle and the gas costs to operate one.

Is it possible to update through community fund (the multisig wallet) ? Thank you !

Which of the solutions is the least risky for the funds? Solution 1 seems to be complicated since there is an oracle. Could we have a poll about this?

You can do this from the UI :champagne: :champagne:
https://tornado-cash.medium.com/gas-price-claimed-anonymity-mining-a-victim-but-now-everyone-can-claim-ap-5441aaa32a1a

2 Likes

Solution 2 is very quick and dirty. I’d consider it safer

Sure. Here’s one. And we can create another in a more formal thread later if need be

How should we incentivize merkle root updates?
  • Perfect Subsidy
  • Auction Mechanism
  • We shouldn’t

0 voters

I think it won’t be needed anymore. It was added to the UI and you can update in a simple click. Before it was technically quite challenging to update the tree and that was I guess the main reason why nobody was doing it.

2 Likes

I think we need to weigh the possibility of the further growth of deposits at scale along with fluctuating gas prices. With the current architecture, it is inevitable that we will get to a point where updating the trees will be a costly process that no individual will be willing to bear.

Another problem is that people are only focused on updating withdrawal trees due to miner bias in claiming their rewards and not the deposit trees. Many in fact will only update the trees up to their associated events so they can redeem, requiring incremental updates from multiple actors that inhibit the rate at which TORN is issued to AP miners.

I think we should lock in an on-chain incentive in place, to keep all trees in sync. Therefore, fewer individuals in the community hear about queries related to claiming AP, and the rate of TORN issued is normalised (not like the current situation where it becomes clogged).

3 Likes

I think it’s reasonable to wait to see how long we go before the updater gets “stuck” again. If it doesn’t happen to get backed up again after adding the UI and that’s all it took, then great!

I personally have a hunch there’ll likely be another time in the future that it’ll get stuck due to costs. Or as @xgozzy points out, where only some withdrawal trees get updated and not others nor deposits. In which case, even a very low reward incentive may help smooth things out

Anyone heard about verkle trees to replace merkle trees?

Sadly it’s still needed I think. Look at the 100k DAI tree (for example). Its stuck for over 2 weeks now, while updating the tree is approx. 1.3 TORN.

I’d like to see an incentive that solves this, maybe an AP fee, or a certain % of TORN that goes to an update pool.

1 Like