Skip to content

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.

Auto-incrementing token ID counter (starts at 1).

uint256 public nextTokenId

Maps token ID to its vault address.

mapping(uint256 => address) public tokenIdToVault

Maps vault address to its token ID.

mapping(address => uint256) public vaultToTokenId

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 approvedRecipient
constructor() ERC721("Venus Institution Position", "vINST");

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

NameTypeDescription
toaddressThe initial institution operator address.
vaultaddressThe vault address this token represents.

Returns

NameTypeDescription
tokenIduint256The minted token ID.

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

NameTypeDescription
tokenIduint256The token ID to approve for transfer.
recipientaddressThe address that must be the destination of the next transfer.

Revokes a previously granted transfer approval.

Note: event: PositionTransferRevoked

function revokeTransferApproval(uint256 tokenId) external onlyOwner;

Parameters

NameTypeDescription
tokenIduint256The token ID to revoke approval for.
event PositionTokenMinted(address indexed vault, uint256 indexed tokenId, address indexed institution);
event PositionTransferApproved(uint256 indexed tokenId, address indexed recipient);
event PositionTransferRevoked(uint256 indexed tokenId);
error TransferNotApproved(uint256 tokenId);
error OwnershipCannotBeRenounced();
error ZeroAddress();