Make sure is a public function to compute the math ahead of time, so the interface can "quote" the user on how much VULT they will get.
Direction
If owner allows TwoWay, then VULT holders can go back to WEWE.
Lock
The owner of the VULT Token on Base can lock it. Use _beforeTransferHook() to stop the user moving their VULT after the merge until the Owner allows them to.
Context
WEWE holders can merge into VULT
Implementation
The Merge Contract is given 10m VULT and 10bn WEWE. The starting ratio is 1:1000.
It is Owned. The Owner cannot withdraw, but can set a flag for Two-way. Default is not enabled.
Use Approve And Call Flow
Merge Math
The math is
Make sure is a public function to compute the math ahead of time, so the interface can "quote" the user on how much VULT they will get.
Direction
If owner allows TwoWay, then VULT holders can go back to WEWE.
Lock
The owner of the VULT Token on Base can lock it. Use
_beforeTransferHook()
to stop the user moving their VULT after the merge until the Owner allows them to.