grassrootseconomics / cic-custodial

Experimental custodial API
GNU Affero General Public License v3.0
1 stars 0 forks source link

Temporary admin limit approval #29

Closed kamikazechaser closed 1 year ago

kamikazechaser commented 1 year ago

In the event of lost funds, an admin can request a transferFrom aproval limit valid for x min. The following steps should take place:

kamikazechaser commented 1 year ago

Supposed to be tested with Louis's multisig. Metamask related. https://gitlab.com/cicnet/erc20-transfer-authorization

kamikazechaser commented 1 year ago

Blocked by contract deployment test.

kamikazechaser commented 1 year ago

Current implementation on #100. It works as a "session" based approval.

Works by setting X amount as the approval value. The tasker then automatically queues a revoke in 15 min. Within that timeframe, any approve request will fail on chain. this is because the contract explicitly expects the value to be set to 0 first. It is possible to immediately revoke the approval by setting the value to 0. This however won't cancel the initial scheduled revoke request. This is a minor inconvenience that may never be faced.

This implementation also requires an approve filter to be implemented at #51.

kamikazechaser commented 1 year ago

Completed in #100