-
Notifications
You must be signed in to change notification settings - Fork 39
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
Borrow and stake support pcape #413
Conversation
0, | ||
stakingInfo.cashAmount | ||
); | ||
IPToken(PCAPE).burn( |
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.
shall we check if we need to turn off collateral?
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.
yeah. We should.
0, | ||
stakingInfo.cashAmount | ||
); | ||
IPToken(PCAPE).burn( |
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.
since we already read cApeReserveCache, why not we just use xTokenAddress from that?
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.
yes,we can.
helpers/contracts-deployments.ts
Outdated
@@ -553,12 +553,21 @@ export const deployPoolApeStaking = async ( | |||
|
|||
const config = getParaSpaceConfig(); | |||
const treasuryAddress = config.Treasury; | |||
|
|||
const cApe = await getAutoCompoundApe(); | |||
let pcApeAddress = "0x5F56386F21766237707a447FB37C717dC221bb13"; //for test env |
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.
this breaks other deployment
DataTypes.ReserveCache memory cApeReserveCache = cApeReserve | ||
.cache(); | ||
address PCAPE = cApeReserveCache.xTokenAddress; | ||
require( |
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.
suggest require user's pcApe balance >= cashAmount
stakingInfo.cashAsset == PCAPE, | ||
Errors.INVALID_ASSET_TYPE | ||
); | ||
cApeReserve.updateState(cApeReserveCache); |
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.
suggest check cAPE status is not Paused and is Active
Security Checklist
Make sure to think about each of these exploits in this PR.