Skip to content

Someone can register jetton wallet not belonging to them #1

Description

@ProgramCrafter

receive(msg: Registration) {
require(self.balance == 0, "you are registered");
if(self.groth16Verify_registration(msg.piA, msg.piB, msg.piC, msg.pubInputs)) {
self.balance = msg.pubInputs.get(0)!!;
self.key.g = msg.pubInputs.get(1)!!;
self.key.n = msg.pubInputs.get(3)!!;
self.key.powN2 = pow(msg.pubInputs.get(3)!!, 2);
} else {
nativeThrow(300); // wrong proof
}
}

No check is done who is registering the wallet, therefore anyone can supply their own keys and owner will then be unable to access the jettons.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions