-
Notifications
You must be signed in to change notification settings - Fork 118
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Synthetix was using completeWithdrawal
and completeDeposit
instead of finalize
, and I kind of like complete more? Not super opinionated here though
/** | ||
* @title iOVM_L2ERC20Gateway | ||
*/ | ||
interface iOVM_L2ERC20Gateway /* TODO: add `is iOVM_ERC20` -- the types are messing with my tempERC20 */ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this todo makes the line too long, could easily go in the above comment below @title
I think a Other thing is an |
Ooh this is very interesting! @maurelian and I had brainstormed Can you walk me through a use case or sketch for the underlying functionality? Is this kind of like saying "this I guess the concern with |
That's interesting but I was just imagining those funcs having the same general implementation as However now that I think about it, we would likely still need more metadata about a deposit/withdrawal in most cases where funds are being deposited or withdrawn directly to a contract.
Let me walk thru a scenario of why that level of complexity is necessary:
However this architecture has a pretty big double spend problem:
We can solve this problem with a
If this method is implemented we can adjust our previous architecture to check that a withdrawal has actually come through for a specific IOU by passing data about the withdrawal via the call and ensuring the contract is actually sending us the tokens via Does that make sense? Let's discuss more on our call tomorrow :) |
@TransmissionsDev What would you think is the right way to handle things if the call part of |
Hmm I'm not really opinionated either way right now? I guess a reversion (meaning the approval will not go through if the subcall fails) will be easiest to discover on chain and tokens can always be force given to the target via the other withdraw funcs so I think I lean towards that. |
This was merged in under another PR. Most recent update to this interface was here: #297 |
Description
This PR adds a standard interface for the minimal pair of contracts required for deposit/withdrawals. If there's any wishlist functionality that could go in here, we can discuss, but I lean towards letting developers expand this out as needed if they desire bespoke functionality that would impose potential security risks. For example, considered some sort of
depositAndCall
, but I think the security implications of this mean we should just have people add it to theirs as needed.Questions
Metadata
Fixes
Contributing Agreement