Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol,supplementary-contracts): relocate & allow TokenUnlock to deploy and own ProverSets #17251

Merged
merged 20 commits into from
May 20, 2024

Conversation

dantaik
Copy link
Contributor

@dantaik dantaik commented May 19, 2024

Allow Taiko's investors to use their locked tokens as bonds.

@dantaik dantaik marked this pull request as ready for review May 19, 2024 22:10
Copy link

openzeppelin-code bot commented May 19, 2024

feat(protocol,supplementary-contracts): relocate & allow TokenUnlock to deploy and own ProverSets

Generated at commit: c7f3fed5966ae4efbbf1db1a242165b43d1634a4

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
2
2
0
8
41
53
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@Brechtpd
Copy link
Contributor

Wouldn't this allow people to withdraw a big chunk of their tokens by getting slashed and then getting the reward?

I guess would have to think about the specifics and some protocol details, but for example if you can prove a block wrongly and directly also contest and prove it correctly in the same tx you would be able to extract a big chunk without any risks of anybody else getting the tokens. So sure you still lose a big chunk, but you also don't have to wait 4 years to get your tokens.

@dantaik dantaik changed the title feat(protocol): allow TokenUnlocking to be the ProverSet owner feat(protocol): relocate & allow TokenUnlock to deploy and own ProverSets May 20, 2024
@dantaik dantaik changed the title feat(protocol): relocate & allow TokenUnlock to deploy and own ProverSets feat(protocol,supplementary-contracts): relocate & allow TokenUnlock to deploy and own ProverSets May 20, 2024
@dantaik
Copy link
Contributor Author

dantaik commented May 20, 2024

Wouldn't this allow people to withdraw a big chunk of their tokens by getting slashed and then getting the reward?

I guess would have to think about the specifics and some protocol details, but for example if you can prove a block wrongly and directly also contest and prove it correctly in the same tx you would be able to extract a big chunk without any risks of anybody else getting the tokens. So sure you still lose a big chunk, but you also don't have to wait 4 years to get your tokens.

Good points. I believe technically it is possible. However, I think practically this won't happen for two reasons:

  • 12.5% token will be lost during the contest-then-re-prove process.
  • all of our blocks requires SGX, they must be able to generate incorrect but verifiable sgx proofs, then overwrite them with valid ones.

@Brechtpd
Copy link
Contributor

Yeah true that if SGX is required for each block it shouldn't be possible, so should be good.

@Brechtpd
Copy link
Contributor

I'm not 100% sure about the behavior for this in the protocol right now, but the liveness bond slashing could also be a potential way to avoid the locking. But that one is probably a lot trickier to pull off risk free.

@dantaik
Copy link
Contributor Author

dantaik commented May 20, 2024

liveness

As of now liveness bond is the smallest bond compared with all other bonds. When liveness bond is returned, another larger bond must be placed. I think in the future, the liveness bond shall alway be smaller than validity/contestation bond.

@dantaik dantaik enabled auto-merge May 20, 2024 05:58
@dantaik dantaik disabled auto-merge May 20, 2024 06:24
@dantaik dantaik added this pull request to the merge queue May 20, 2024
Merged via the queue into main with commit f3d6ca1 May 20, 2024
8 checks passed
@dantaik dantaik deleted the prover_set2 branch May 20, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants