-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alternative implementation to use FL #109
base: develop
Are you sure you want to change the base?
Conversation
manager = _manager; | ||
exchange = _exchange; |
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.
isn't it better to move this to service registry?
struct CdpData { | ||
address gemJoin; | ||
address payable fundsReceiver; | ||
uint256 cdpId; | ||
bytes32 ilk; | ||
uint256 requiredDebt; | ||
uint256 borrowCollateral; | ||
uint256 withdrawCollateral; | ||
uint256 withdrawDai; | ||
uint256 depositDai; | ||
uint256 depositCollateral; | ||
bool skipFL; | ||
string methodName; |
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.
are we sticking with this struct? it has an abundance of unnecessary fields. could we maybe break it out into CloseCDPData
, OpenCDPData
etc
This is alternative approach How to use FlashLoans cleanly
Every business operation (OpenMultiply, Increase,Decreas, CloseToDai, CloseToCollateral, OpenGUNI, etc)
Has it's own Action contract which adress is stored in service registry,
Each Action contract iherits from BaseAction and therefore implements 4 methods:
then to call an action
You call one central contract call runner (as delegateCall on dsProxy)
function executeAction(string calldata actionName, bytes calldata actionData)
depending on action implementation FL is called or not,