rddl-network / rddl-2-plmnt-service

GNU Affero General Public License v3.0
1 stars 0 forks source link

Secure association between tx & beneficiary #28

Closed eckelj closed 8 months ago

eckelj commented 8 months ago

The current implementation does ensure that a given beneficiary and the tx-hash belong to each other. A tx could be hijacked and abused. Therefore, the following proposal should be implemented to protect against fraud and abuse:

The payload is to be structured as follows:

{ "conversion" : 
  { "beneficiary": "<planetmint address>",
     "tx-hash": "<tx id on liquid that represents the value to be converted>"
  },
  "signature":  "< sign( private_key, object("beneficiary") ) of the private key belonging to the public key that signed the tx identified by tx-hash"
}

The verification process will look as follows: verify( payload.tx.public_key, payload.conversion )