You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Research notes on how to implement callee for other DEX protocols
Context
Currently, the main liquidity provider for unified-auctions swap transactions is UniswapV3. But we want to add at least one other callee, the one which is the easiest to integrate in the limited amount of time we have. For this, we need to investigate further the technical details of the implementation and testing framework and prepare proof-of-concept.
Tasks
Collect notes along the way
Outline next steps
Discuss if required
The text was updated successfully, but these errors were encountered:
sender address – the address of the contract calling the function, which suppose to pay back the loan
owe (uint256 amount denominated in RAD) – DAI amount to pay back (otherwise the callee will fail)
slice (uint256 amount denominated in WAD) – amount of the token "received" (or rather "approved", the amount that can be taken by the callee from the "gemJoin" address)
data (calldata bytes) – arbitary data that can be passed from the frontend to the callee. It is usually contains at least
to address - the address to send remaining DAI to
gemJoin address – address that holds slice amount of tokens that callee is allowed to take
minProfit (uint256 amount denominated in WAD) – minimum profit in DAI to make
other params required by the callee
the function then:
converts slice from WAD to the actual ERC20 amount of tokens (eg sliceERC20)
moves sliceERC20 amount of token from gemJoin to the callee address
gives *router the approval to move sliceERC20 amount of tokens away from the callee address
converts owe from RAY to the actual ERC20 amount of DAI (eg oweERC20)
execute external *router function to exchange sliceERC20 into DAI
passing oweERC20 as a parameter to validate that the transaction can succeed
checks that exchange took complete sliceERC20 amount, otherwise transfer back the leftovers
send back oweERC20 of DAI
transfer remaining DAI to the to address
The only variations between callees that I've found so far:
Goal
Research notes on how to implement callee for other DEX protocols
Context
Currently, the main liquidity provider for unified-auctions swap transactions is UniswapV3. But we want to add at least one other callee, the one which is the easiest to integrate in the limited amount of time we have. For this, we need to investigate further the technical details of the implementation and testing framework and prepare proof-of-concept.
Tasks
The text was updated successfully, but these errors were encountered: