Most users don't have metamask so they can't create an ethereum address, let's make it easier for them. This is the stats showing them click on disabled button.
Scope
Retain the old functionality of forwarding contract which is more secure, while supporting this new feature.
Design
Using Bip32, we can generate many public private key pairs using a single secret using derivation path.
To flush from account, we have to look at the account balance, transfer the funds, signed with the key that we generated. The amount + fee should be precisely equal to the balance.
Motivation
Most users don't have metamask so they can't create an ethereum address, let's make it easier for them. This is the stats showing them click on disabled button.
Scope
Retain the old functionality of forwarding contract which is more secure, while supporting this new feature.
Design
Using Bip32, we can generate many public private key pairs using a single secret using derivation path.
GenerateBip32Key(bip32secret, index) cc6841e10dc631251437492690da13a8f73527c5
Let's use the user's account ID 1.2.X (X = accountID) as the index.
We will generate this and add the public key to the generated address.
On receiving of the funds, we detect whether the address is smart contract by looking for an code. https://ethereum.stackexchange.com/questions/28521/how-to-detect-if-an-address-is-a-contract
Then flush all the coins to the trust contract.
To flush from account, we have to look at the account balance, transfer the funds, signed with the key that we generated. The amount + fee should be precisely equal to the balance.
This is the javascript/webjs equivalent:
Conforming to interfaces:
Use GenerateMultisig interface to generate the address
Use FlushCoin(forwarder string, address string) error to flush the coins (and detecting smart contract or not)
Links