package tezos-protocol-020-PsParisC

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module is responsible for maintaining the Storage.Contract.Frozen_deposits_pseudotokens and Storage.Contract.Staking_pseudotokens tables.

stake ctxt ~contract ~delegate amount credits the contract's staking pseudotokens and the delegate's frozen deposits pseudotokens by an amount of pseudotokens corresponding to amount using delegate's staked frozen deposits pseudotokens/tez rate.

This function must be called on "stake" **before** transferring tez to delegate's frozen deposits.

delegate must be contract's delegate.

request_unstake ctxt ~contract ~delegate amount debits the contract's staking pseudotokens and the delegate's frozen deposits pseudotokens by an amount of pseudotokens corresponding to amount using delegate's staked frozen deposits pseudotokens/tez rate capped by contract's staking pseudotokens balance.

It returns the tez amount corresponding to the debited pseudotokens.

Resulting context do not make sense if delegate is not contract's delegate.

module For_RPC : sig ... end
OCaml

Innovation. Community. Security.