Closed robert-zaremba closed 3 years ago
What is the benefit?
Current approach allows to have way more complex trades in one transaction:
On Sat, Apr 10, 2021 at 9:25 AM Robert Zaremba @.***> wrote:
@robert-zaremba https://github.com/robert-zaremba requested your review on: #17 https://github.com/ref-finance/ref-contracts/pull/17 Proposal: require subsequent amount_in in swap actions to be nil..
— You are receiving this because your review was requested. Reply to this email directly, view it on GitHub https://github.com/ref-finance/ref-contracts/pull/17#event-4577644909, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABK27VEAJLQXU3I5AONWYLTIB3WNANCNFSM42WUNYNQ .
-- Best regards, Illia Polosukhin
What is the benefit?
Simplification. That being said - I didn't thought about a use case where we do two swaps which are not chained, but result of both is use in the third swap (as in your example), which makes sense -> so closing this issue.
Proposal
Currently we only require that the first swap action
amount_in
is set. In the subsequent actions, however, it's more intuitive to always use the output of the previous action.