Skip to content
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

Curve Swap Implementation #225

Draft
wants to merge 2 commits into
base: interest-model-redesign
Choose a base branch
from
Draft

Conversation

Drypto13
Copy link
Contributor

@Drypto13 Drypto13 commented Apr 1, 2022

No description provided.

@Drypto13 Drypto13 requested review from a user and RomanHiden April 1, 2022 08:01
);

if (
returnToSenderAddress != _thisAddress &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use address(this);

function setSwapApprovals(address[] memory tokens) public {
address curveRoute = curveAddressProvider.get_address(2);
for (uint256 i = 0; i < tokens.length; i++) {
IERC20(tokens[i]).safeApprove(curveRoute, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safeApprove handles zero case

onlyOwner
{
for(uint i=0;i<tokens.length;++i){
IERC20(tokens[i]).safeApprove(spender,0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

safeApprove handles zero case

@Drypto13 Drypto13 marked this pull request as draft June 14, 2022 20:01
@RomanHiden
Copy link
Contributor

rebase this to itoken-collateral, we might wanna merge it before we deploy itoken-collateral. since ProtocolSettings is changed

function exchange(address pool, address from, address to, uint256 amount, uint256 minRecv, address receiver) external returns(uint256);
}

interface ICurveProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally I prefer interface per file

@RomanHiden
Copy link
Contributor

this needs to be rebased to itoken-collateral. what do we need to do to include this in arbitrum deployment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants