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

Add 4belt Pool Strategy #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

canner1
Copy link
Contributor

@canner1 canner1 commented May 3, 2021

Belt is a Curve clone. It deploys the deposited stables into 4Belt pool to make them appreciate over time. Their pool contains DAI, USDC, USDT and BUSD. It has about $770m liquidity.

Test result: test/belt/4belt.js:

  BSC Mainnet 4Belt
Impersonating...
0xf00dD244228F51547f0563e60bCa65a30FBF5f7f
Fetching Underlying at:  0x9cb73F20164e399958261c289Eb5F9846f4D1404
New Vault Deployed:  0x5A5B2B0067924fef14fdd8b953E645093c3C868C
Strategy Deployed:  0x84eA74d481Ee0A5332c457a4d796187F6Ba67fEB
Strategy and vault added to Controller.
    Happy path
loop  0
old shareprice:  1000000000000000000
new shareprice:  1000000000000000000
growth:  1
loop  1
old shareprice:  1000000000000000000
new shareprice:  1000058300771226503
growth:  1.0000583007712265
loop  2
old shareprice:  1000058300771226503
new shareprice:  1000116604541278869
growth:  1.0000583003710957
loop  3
old shareprice:  1000116604541278869
new shareprice:  1000174911310266063
growth:  1.000058299970946
loop  4
old shareprice:  1000174911310266063
new shareprice:  1000233221078297051
growth:  1.0000582995707767
loop  5
old shareprice:  1000233221078297051
new shareprice:  1000291533845480796
growth:  1.0000582991705884
loop  6
old shareprice:  1000291533845480796
new shareprice:  1000349849611926263
growth:  1.0000582987703808
loop  7
old shareprice:  1000349849611926263
new shareprice:  1000408168377742411
growth:  1.000058298370154
loop  8
old shareprice:  1000408168377742411
new shareprice:  1000466490143038203
growth:  1.000058297969908
loop  9
old shareprice:  1000466490143038203
new shareprice:  1000524814907922598
growth:  1.0000582975696428
earned!
APR: 25.541649055696112 %
APY: 29.08838846887938 %
      ✓ Farmer should earn money (204696ms)


  1 passing (10m)

await send.ether(etherGiver, governance, "100" + "000000000000000000")

await setupExternalContracts();
[controller, vault, strategy,,feeForwarder] = await setupCoreProtocol({
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need the feeForwarder here, added the logic to add a path in the hh-utils file. Add "liquidationPath": [belt, wbnb, eth] to the inputs instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved it

});

await strategy.setSellFloor(0, {from:governance});
await feeForwarder.setConversionPath(belt, eth, [belt, wbnb, eth], {from:governance});
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed, see previous comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved it

@@ -175,7 +175,7 @@ async function setupCoreProtocol(config) {
console.log("Strategy and vault added to Controller.");
}

return [controller, vault, strategy, rewardPool];
return [controller, vault, strategy, rewardPool, feeRewardForwarder];
Copy link
Contributor

Choose a reason for hiding this comment

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

Not needed, see other comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

resolved it

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.

2 participants