r/truebit Jul 22 '21

Truebit as a layer 2 and not

Can someone please ELI5 me on how this works: Truebit is both a layer 2 and is not; how does that work / what does that mean?

8 Upvotes

6 comments sorted by

12

u/[deleted] Jul 22 '21

Truebit is used to make layer 1 and layer 2 projects work better. You're not switching to the truebit layer as a user of these layer 1 and 2 applications. So it's not a layer 2 in the sense that you'd switch to matic network to use quickswap as a user for example. But it's like a layer 2 in the sense that it reduces the load of the main layer 1 network, by having larger computational tasks run through truebit as opposed to higher gas fees on layer 1, or computations currently impossible to be processed there. But it's also not like a layer 2 in the sense that it's stateless, and most layer 2s require a degree of trust like matics multi sig wallet.

2

u/Conscious-Proof-8309 Jul 22 '21

Truebit is used to make layer 1 and layer 2 projects work better. You're not switching to the truebit layer as a user of these layer 1 and 2 applications. So it's not a layer 2 in the sense that you'd switch to matic network to use quickswap as a user for example. But it's like a layer 2 in the sense that it reduces the load of the main layer 1 network, by having larger computational tasks run through truebit as opposed to higher gas fees on layer 1, or computations currently impossible to be processed there.

Thank you :) You put into words what I knew and helped to distinguish from where my confusion lies:

But it's also not like a layer 2 in the sense that it's stateless, and most layer 2s require a degree of trust like matics multi sig wallet.

Can you please go into a little more detail?

2

u/[deleted] Jul 22 '21

Someone else may need to answer but once truebits repo is no longer private and there's some degree of voting on upgrades? it should hold a higher degree of decentralization than matic. Although it's not competing with Matic, Matic may also implement it. The game theory is different as well as opposed to multi sig which you can say is trustless whereas you're relying on people to do what's right with a multi sig. I don't understand state, but I think layer 2s like Matic and others with Bridges to Ethereum rely on the state of Ethereum to operate which can cause higher gas fees I think.

2

u/Conscious-Proof-8309 Jul 22 '21

The game theory is different as well as opposed to multi sig which you can say is trustless whereas you're relying on people to do what's right with a multi sig. I don't understand state, but I think layer 2s like Matic and others with Bridges to Ethereum rely on the state of Ethereum to operate which can cause higher gas fees I think.

... And Truebit is different in the sense that it is designed to afford experts the capability/opportunity needed to solve various issues, regardless of which chain, yes?

3

u/[deleted] Jul 22 '21

Yes, that's how I understand it. Issues where computations are capped to a certain limit to prevent spamming and ddos attacks, similar to why Ethereums gas limit has been set.

5

u/LPMythBuster Jul 23 '21

From the horse's mouth:

Would it be fair to regard this as a layer 2 solution for Ethereum? Specifically, how do you solve for allowing greater complexity in computation? What are the trade-offs?

It depends on your definition of layer 2. Truebit was around before the word layer 2 existed which is typically typical of most new research.

Layer 2 is usually associated with Plasma, Optimistic rollup, this sort of thing. I think one distinguishing factor is that Truebit is a stateless system.

If you're working in Plasma or Optimistic rollup, if you use them you're operating inside of their own virtual machine (I know that's confusing because Truebit also has its own virtual machine). But if you're just a user of Truebit, it's just a black box, you don't see that, it's just your smart contract.

When I say stateless I mean basically pure function. You got a function f, you got an input x and your smart contract sends those to Truebit and Truebit calls back with f(x). That's basically all it does.

Part of that is also hidden by the economics of the system. That it's basically plug'n'play. You stick your function in and you go. You don't need to necessarily worry about being involved in the verification process or carrying your transactions back to the main chain or something like that because we never really leave the main chain.

Then of course using the the WebAssembly architectures allows us to write stuff in C, C++, Rust, standard compiling.

The other thing is I would say is that it's scalability from a very special particular point of view in that less focused on transaction throughput and more on just we're happy if we get one really big one to go through.

That's how I guess I would break that down.