Skip to content

Multi validator LST updates #13

@kyriediculous

Description

@kyriediculous

MultiValidatorLST entities

Create multi validator LST entities to track their data per LST

MultiValidatorLST {
id: ID // Address
}

Validator set

Using call handlers for addValidator, removeValidator and updateWeight (check exact function signatures on the contract ), track the current validator set id's on the mulitivalidator LST entities.

validators: Int[]

Then in the application we can use multicall on the LST contract with these Ids to fetch the data for each validator LST.stakingPools(id)

    struct StakingPool {
        address payable tToken; // Address of validator share token
        uint256 target; // Target STAKE
        uint256 balance; // Current balance of tTokens (OR CURRENT STAKE FOR THIS VALIDATOR)
    }

Unstake List

On the multi validator LST entity, using call handlers on the unstakeNFT contract mint, burn and transfer calls update the ids owned by a user for the multi validator LSTs.

MultiValidatorUnstake {
    id: ID
    user: User
    lst: MultiValidatorLST
    claimed: Boolean
}


User {
multiValidatorUnstakes: [MultiValidatorUnstake!] @derivedFrom(field: "user")
}

query {
multiValidatorUnstakes(where: {user: $user, claimed: false}) {
id
user {id}
lst {id}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions