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

BFP config, wstETH and sUSDe as collaterals on L1 #468

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

0xMithrandir
Copy link
Contributor

@0xMithrandir 0xMithrandir commented Oct 7, 2024

  • Configures wstETH and sUSDe as collaterals
  • Updates BFP package to 3.8.0

@0xMithrandir 0xMithrandir changed the title Updates bfp package to 3.8.0 Configure wstETH and sUSDe as collaterals Oct 8, 2024
@0xMithrandir 0xMithrandir changed the title Configure wstETH and sUSDe as collaterals Configure wstETH and sUSDe as collaterals on mainnet Oct 8, 2024
@0xMithrandir 0xMithrandir changed the title Configure wstETH and sUSDe as collaterals on mainnet Configure wstETH and sUSDe as collaterals on L1 Oct 8, 2024
@0xMithrandir 0xMithrandir changed the title Configure wstETH and sUSDe as collaterals on L1 BFP config, wstETH and sUSDe as collaterals on L1 Oct 9, 2024
assert.equal(newPosition.positionSize, 0);
});

it('should mint and withdraw 1000 sUSD', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need any of these tests (borrow/withdraw) for CoreProxy. Why would we need them (given we have separate Liquidity_Provider test)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's mostly to test calculation and payback of debt in the next test

@@ -0,0 +1,387 @@
const crypto = require('crypto');
Copy link
Contributor

Choose a reason for hiding this comment

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

file can be named sUSD instead of snxUSD

"<%= settings.weth_rewards_distributor %>",
]

#[invoke.CoreProxy_registerRewardsDistributor_wsteth]
Copy link
Contributor

Choose a reason for hiding this comment

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

we need these

issuanceRatioD18 = "<%= parseEther('5') %>"
liquidationRatioD18 = "<%= parseEther('1.05') %>"
liquidationRewardD18 = "<%= settings.snx_liquidation_reward %>"
minDelegationD18 = "<%= 2 * settings.snx_liquidation_reward %>"
Copy link
Contributor

Choose a reason for hiding this comment

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

we probably want smth like 100 here at least

Copy link
Contributor

Choose a reason for hiding this comment

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

and use snx_min_delegation setting

issuanceRatioD18 = "<%= parseEther('2') %>"
liquidationRatioD18 = "<%= parseEther('1.10') %>"
liquidationRewardD18 = "<%= parseEther('0.005') %>"
minDelegationD18 = "<%= parseEther('0.01') %>"
Copy link
Contributor

Choose a reason for hiding this comment

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

can we normalise all configs and have settings for susde? I can see 3 new collaterals and each has somewhat different implementation. Would be easier if they all follow exact structure

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