beamer-bridge/beamer

Frontend: Implement a way to use a subsidizer contract

GabrielBuragev opened this issue · 0 comments

Rationale

We need to implement a new feature on the frontend that will enable the users to benefit from certain fee-subsiziding events.
Current idea is to have a separate FeeSub contract with a similar interface like the RequestManager which will be used as a proxy in the communication with the original RequestManager contract. This proxy contract will pay for the fees that otherwise the user would have to pay.

From the frontend perspective, we need to find a way to implement this feature in a way that it is easy to turn on and off (the usage of this proxy contract). On top of that, try our best to retain the same communication interface and have minimal impact on that part of the codebase.

Based on a threshold set in the contracts, the app should figure out whether it should apply the subsidy to the transfer that is being currently created or not. The only condition for using the subsidy contract is when the transfer amount is higher than the specified threshold.

Acceptance criteria

  • Frontend re-routes transfers correctly via the FeeSub contract when applicable