ScopeLift / reimbursement-tokens

0 stars 0 forks source link

Consider: Can we account for stray tokens sent to the contract? #18

Open apbendi opened 2 years ago

apbendi commented 2 years ago

If someone sends treasury (or collateral) tokens to the contract without using the proper deposit method, can we account for these without any other risks/complications in doing so.

See https://github.com/ScopeLift/reimbursement-tokens/pull/17#discussion_r728407461

aniemerg commented 2 years ago

You should look at how YieldSpace v2 works (https://github.com/yieldprotocol/yieldspace-v2). We actually have users send the funds directly to the contract (rather than have the contract pull), and some methods automatically forward output tokens to an address. It may ultimately be useful to adopt similar patterns.

apbendi commented 2 years ago

Interesting, thanks @aniemerg, I'm curious to take a look! If it's alright with you I'll keep this feature on the backburner as a "nice to have" for after we've implemented all the core functionality.