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

Update account terminology in contracts #87

Closed
0x-r4bbit opened this issue Dec 3, 2024 · 0 comments · Fixed by #97
Closed

Update account terminology in contracts #87

0x-r4bbit opened this issue Dec 3, 2024 · 0 comments · Fixed by #97

Comments

@0x-r4bbit
Copy link
Collaborator

Throughout the development of this protocol we've used User and Account whenever we referred to a vault.
Now that we're introducing the notion of "owners" of vaults with #71 we should rethink the wording here.

I'd propose that:

  • The StakeManager only knows about vaults. We know that the contracts interacting with the protocol have to be whitelisted vaults, so there's no need to think of "smart accounts".
  • Whenever we refer to "owners" of vaults, we should probably just name those accounts (this covers both, EOAs and smart accounts)

As a result of that, we should probably do the following changes:

should be VaultData

mapping(address vault => Account data) public accounts;

should be vaults

function getUserTotalMP(address user) external view returns (uint256) {

should be getAccountTotalMP

function getUserTotalMaxMP(address user) external view returns (uint256) {

should be getAccountTotalMaxMP

function getUserTotalStakedBalance(address user) external view returns (uint256) {

should be getAccountTotalStakedBalance

function updateAccountMP(address accountAddress) external onlyNotEmergencyMode {

should be updateVaultMP

function getAccount(address accountAddress) external view returns (Account memory) {

should be getVaultData

and so on and so forth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment