InstitutionPositionToken
Inherits: ERC721, Ownable2Step
Title: InstitutionPositionToken
Singleton ERC-721 representing institution positions in Institutional Vaults. One token per vault. Holder = institution operator. Governance-gated transfers.
Owner is VaultController (sole minter, transfer governance gateway). Not upgradeable — logic is minimal and immutable. Deployed with msg.sender as owner, then ownership transferred to VaultController.
Solidity API
Section titled “Solidity API”State Variables
Section titled “State Variables”nextTokenId
Section titled “nextTokenId”Auto-incrementing token ID counter (starts at 1).
uint256 public nextTokenIdtokenIdToVault
Section titled “tokenIdToVault”Maps token ID to its vault address.
mapping(uint256 => address) public tokenIdToVaultvaultToTokenId
Section titled “vaultToTokenId”Maps vault address to its token ID.
mapping(address => uint256) public vaultToTokenIdapprovedRecipient
Section titled “approvedRecipient”Recipient governance has approved to receive a specific token (one-shot). Cleared back to address(0) once the matching transfer is consumed.
mapping(uint256 => address) public approvedRecipientFunctions
Section titled “Functions”constructor
Section titled “constructor”constructor() ERC721("Venus Institution Position", "vINST");renounceOwnership
Section titled “renounceOwnership”Disabled — renouncing ownership would permanently brick minting and transfer governance.
Note: error: OwnershipCannotBeRenounced Always reverts.
function renounceOwnership() public pure override;Mints a new token to to for the given vault.
Note: event: PositionTokenMinted
function mint(address to, address vault) external onlyOwner returns (uint256 tokenId);Parameters
| Name | Type | Description |
|---|---|---|
to | address | The initial institution operator address. |
vault | address | The vault address this token represents. |
Returns
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The minted token ID. |
approveTransfer
Section titled “approveTransfer”Approves recipient to receive tokenId on the next transfer. One-shot — cleared after use.
Notes:
- error: ZeroAddress If recipient is address(0).
- event: PositionTransferApproved
function approveTransfer(uint256 tokenId, address recipient) external onlyOwner;Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The token ID to approve for transfer. |
recipient | address | The address that must be the destination of the next transfer. |
revokeTransferApproval
Section titled “revokeTransferApproval”Revokes a previously granted transfer approval.
Note: event: PositionTransferRevoked
function revokeTransferApproval(uint256 tokenId) external onlyOwner;Parameters
| Name | Type | Description |
|---|---|---|
tokenId | uint256 | The token ID to revoke approval for. |
Events
Section titled “Events”PositionTokenMinted
Section titled “PositionTokenMinted”event PositionTokenMinted(address indexed vault, uint256 indexed tokenId, address indexed institution);PositionTransferApproved
Section titled “PositionTransferApproved”event PositionTransferApproved(uint256 indexed tokenId, address indexed recipient);PositionTransferRevoked
Section titled “PositionTransferRevoked”event PositionTransferRevoked(uint256 indexed tokenId);Errors
Section titled “Errors”TransferNotApproved
Section titled “TransferNotApproved”error TransferNotApproved(uint256 tokenId);OwnershipCannotBeRenounced
Section titled “OwnershipCannotBeRenounced”error OwnershipCannotBeRenounced();ZeroAddress
Section titled “ZeroAddress”error ZeroAddress();