proposeRetrieval

proposeRetrieval(amount):retrievaldIdproposeRetrieval(amount): retrievaldId

  • Callable by minterminter approved by TTG

  • Allows minterminter to retrieve t-bills from the SPV

    • Calculates current activeOwedMactiveOwedM

    • Checks that the retrieval proposal does not put minterminter into under collateralization activeOwedMminter<=(CVmintertotalPendingRetrievalsminteramount)MRactiveOwedM_{minter} <=( CV_{minter}- totalPendingRetrievals_{minter} - amount)* MR

    • Checks that the retrieval proposal and current retrieval proposal will not exceed collateral totalPendingRetrievalsminter+amount<CVtotalPendingRetrievals_{minter} + amount < CV

    • Adds amountamount to totalPendingRetrievalsmintertotalPendingRetrievals_{minter} totalPendingRetrievalsmintertotalPendingRetrievals_{minter}totalPendingRetrievalsminter+=amounttotalPendingRetrievals_{minter}+= amount

    • Saves pendingRetrievalsminterpendingRetrievals_{minter} pendingRetrievalsminter,retrievalId=amountpendingRetrievals_{minter, retrievalId}= amount

    • Returns unique retrievalIdretrievalId to be processed in updateCollateral()updateCollateral().

Last updated

Copyright 2024 M^0 Foundation