Vertex
A vertex encapsulates the rehypothecation earnings of a token. Every token in the protocol (because the earnings for the protocol itself) are kept in a Vertex which then fowards those token deposits into either one or two vaults through a Vault Proxy.
Each vertex is identified by a VertexId which is a product type on an array index and the one-hot encoding of that array index. The bottom 8 bits are the array index which is used extensively throughout the protocol. The top 16 bits is the one hot encoding which we use to interact with the ClosureId. The ClosureId is simply the bitwise union of the one-hot of all the vertices for all the tokens in its subset.
Last updated