sygmaprotocol / sygma-solidity

GNU Lesser General Public License v3.0
23 stars 18 forks source link

Usability Proxy Contracts #260

Open mpetrunic opened 3 months ago

mpetrunic commented 3 months ago

Story

As a developer I want Sygma erc20 transfer to behave as all other bridges So that I can integrate it as a drop-in solution.

Background

Right now, sygma bridge ux is weird as you approve tokens to the erc20 handler and potentially to the fee handler and then call the bridge contract. Which is sketchy at best.

Details

Create ERC20 adapter to be usability proxy where you will approve your tokens (ideally upgradable so that we can fix it in case a vulnerability is found) and on the same address. That proxy will then approve tokens to fee handler and erc20 handler.

Scenarios

Scenario: Given I am <type of user/persona> When And Then

Implementation details

Testing details

Acceptance criteria