...
approve
Steps:
User (via a dApp) calls
wraptokens
The oracle executes a
mint
then anapprove
The user (via a dApp) executes a
transferFrom
The user adds wfio token to Metamask (or similar) holding their Ethereum key and now sees their wfio
Pros:
This is a more standard approach to transferring ERC20 tokens. For example, Uniswap first asks users to “approve” the transaction. Once approved a second “transferFrom” step happens.
Using approve gives an extra layer of security to the transfer process. In theory, if a mistake is made during approve, the approval can be modified (assuming the transferFrom has not occurred).
The user pays the fees for the
transferFrom
Cons:
Extra steps
transfer
Steps:
User (via a dApp) calls
wraptokens
TThe oracle executes a
mint
then atransfer
The user adds wfio token to Metamask (or similar) holding their Ethereum key and now sees their wfio
Alternative
User (via a dApp) calls
wraptokens
Oracle #1 calls
mintTransfer
ERC20 contract collects “observation” #1
Oracle #2 calls
mintTransfer
mintTransfer
calls_mint
(mints to contract , not to Oracle)mintTransfer
callstransfer
(to user Ethereum key)