Skip to content

Addressing HAL audit#11

Open
mfornet wants to merge 7 commits into
referencedev:masterfrom
mfornet:hal-audit
Open

Addressing HAL audit#11
mfornet wants to merge 7 commits into
referencedev:masterfrom
mfornet:hal-audit

Conversation

@mfornet
Copy link
Copy Markdown

@mfornet mfornet commented Apr 12, 2022

No description provided.

mfornet added 7 commits April 12, 2022 14:44
Staking and unstaking is paused when `paused` flag is true.
Validate Burn Fee Fraction. Make sure Staking Contract is always
initialized with a proper burn_fee_fraction.
Make sure we only multiply with a valid ratio. Overflow is not possible
this way.
Remove redundant state check on init
Use near-sdk #[private] macro instead
Use PanicOnDefault from near-sdk
Add a Pauser Role different from Owner Role
@evgenykuzyakov
Copy link
Copy Markdown
Contributor

This needs migrate implementation for paused_users

@mfornet
Copy link
Copy Markdown
Author

mfornet commented May 3, 2022

This needs migrate implementation for paused_users

Do you mean this because this contract is already live?

}

pub(crate) fn inner_unstake(&mut self, account_id: &AccountId, amount: u128) {
if self.paused {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this dangerous - because it effectively means that owner can block people from unstaking from their pool.

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.

3 participants