Main Contract
  • Introduction
  • Money on Chain platform
    • Main concepts
    • System states
    • Public actions
      • User actions
      • Process actions
    • Contracts architecture
      • MoC
      • CommissionSplitter
      • MoCState
      • MoCBucketContainer
      • MoCSettlement
      • MoCHelperLib
      • MoCLibConnection
      • MoCConverter
      • MoCExchange
      • MoCConnector
      • MoCBProxManager
      • MoCInrate
      • MoCVendors
      • MoCWhitelist
      • MoCBase
      • OwnerBurnableToken
      • BProToken
      • DocToken
      • MoCToken
      • PriceProvider
    • Contract mocks
    • Relevant patterns and choices
    • Data dictionary
    • Getting started
  • Integration with MoC platform
    • Introduction to MoC
      • The MoC Contract
      • MoC Precisions
      • MoC State Contracts
    • Getting BPros
      • Minting BitPros
      • Redeeming BitPros
    • Getting DoCs
      • Minting DoCs
      • Redeeming DoCs
        • On Settlement: redeemDocRequest
        • On Settlement: alterRedeemRequestAmount
        • Outside Settlement: redeemFreeDocVendors
        • On Liquidation State: redeemAllDoc
        • How-to
    • Commission fees values
    • Vendors
    • Fees calculation
    • From outside the blockchain
      • Using RSK nodes
      • Using web3
      • Official Money on Chain ABIs
      • Events
      • Example code minting BPros
      • Example code minting BPros without Truffle
      • Example code redeeming BPros
      • Example code redeeming BPros without Truffle
      • Example code minting DOC
      • Example code redeeming free DOC
      • Example code redeeming DOC Request
      • Example code redeeming all DOC
  • Smart contracts
    • Contracts verification
    • ABIs documentation
      • BProToken
      • BtcPriceProviderMock
      • DocToken
      • ERC20Mintable
      • Governed
      • Initializable
      • MakeStoppable
      • MakeUnstoppable
      • MoC
      • MoCBProxManager
      • MoCBucketContainer
      • MoCConnector
      • MoCConverter
      • MoCEMACalculator
      • MoCExchange
      • MoCHelperLib
      • MoCHelperLibMock
      • MoCInrate
      • MoCLibConnection
      • MoCPriceProviderMock
      • MoCSettlement
      • MoCSettlementMock
      • MoCState
      • MoCStateMock
      • MoCToken
      • MoCVendors
      • MoCWhitelist
      • MockMakeStoppable
      • MockMakeUnstoppable
      • MockStopper
      • MockUpgradeDelegator
      • MockUpgraderTemplate
      • OwnerBurnableToken
      • Pausable
      • PriceFeed
      • PriceFeederAdder
      • PriceFeederRemover
      • PriceProvider
      • RevertingOnSend
      • Stoppable
      • Stopper
      • UpgradeDelegator
      • UpgraderTemplate
Powered by GitBook
On this page
  1. Integration with MoC platform
  2. Getting DoCs

Redeeming DoCs

PreviousMinting DoCsNextOn Settlement: redeemDocRequest

Last updated 1 year ago

The function that interests us is: function redeemFreeDocVendors(uint256 docAmount, address vendorAccount) public.

Since the in the protocol, the following functions have been deprecated but must be described since these functions are still in the code.

Settlements is a time based recurring process that allows or rejects the processing of DOC redeem requests.

The function described above (function redeemFreeDocVendors) was intended to be used outside of settlement. Only free DoCs can be redeemed outside of the settlement. Free DoCs are those that were not transferred to another to provide leverage.

There are two more other ways to redeem DOCs:

  • On settlement: A DoC redeem request can be created to redeem any amount of DoCs, but this will be processed on the next settlement. The amount can be greater than the user's balance at request time, allowing to, for example, redeem all future user's DoCs regardless of whether their balance increases. The functions that interests us are: function redeemDocRequest(uint256 docAmount) public and function alterRedeemRequestAmount(bool isAddition, uint256 delta) public

NOTE: there is a retrocompatibility function called redeemFreeDoc(uint256 docAmount) which is suitable for those who are already integrated to MoC platform and are not ready to use vendor functionality. In the future we are planning to deprecate this method.

  • On Liquidation State: The user can redeem all his DoCs with the method: function redeemAllDoc() public

Removal of leveraged positions