Skip to content

Instantly share code, notes, and snippets.

@afmsavage
Last active June 29, 2020 03:04
Show Gist options
  • Save afmsavage/dfda760496f776dca5c28467d0c7317b to your computer and use it in GitHub Desktop.
Save afmsavage/dfda760496f776dca5c28467d0c7317b to your computer and use it in GitHub Desktop.
Report of all the functions per contract in the tBTC system

Sūrya's Description Report

Files Description Table

File Name SHA-1 Hash
contracts\DepositLog.sol 17a98b501ab61693eeceed046da20dd67eb3e97c
contracts\deposit\Deposit.sol 6c256db7867985a92d6cf339b1fb55beec0ee9fe
contracts\deposit\DepositFunding.sol 69e72dec9f4ced5a4e4ca4b5f3e249aa772b67b3
contracts\deposit\DepositLiquidation.sol b1738927130a99360d71abde39a818272b1770b4
contracts\deposit\DepositRedemption.sol 103642cd1dc13401a457c5ebcd47fa896ab482ef
contracts\deposit\DepositStates.sol b40553ce3b2846435db3ffff074f9ae5967d1f3d
contracts\deposit\DepositUtils.sol af3edfa2e7cb13e717bed90b1806607dd1142f18
contracts\deposit\OutsourceDepositLogging.sol 86e52772ec744e390187ccf96a7709dac799a11e
contracts\external\IMedianizer.sol a32db742139df2544e1ab6001dbb9f015d7801dc
contracts\interfaces\ISatWeiPriceFeed.sol cbfd7ab3b02a3016fdff6ef9c1dc211b71b39f56
contracts\interfaces\ITBTCSystem.sol 7679cf75d56a7948e79a8c7eb5d1a97248bcd663
contracts\interfaces\ITokenRecipient.sol b7d2ff0e35a7a9c80ed8763fc89f51e3264d7e8c
contracts\price-feed\SatWeiPriceFeed.sol bf555b45fe5736d9745b72095b0227054ce9241d
contracts\proxy\CloneFactory.sol a899a1c24188dad47d6489d3bd1faa2cdc77573b
contracts\proxy\DepositFactory.sol 18a27ce0015b880765be0c66c45dbdf330f42a78
contracts\scripts\FundingScript.sol ba5eae52f6de3fe16e14b929baeeeac31b4d3814
contracts\scripts\RedemptionScript.sol b91098be443bdc4022d36b600cd45d6dc09330c8
contracts\system\DepositFactoryAuthority.sol e15089bdb7395d492e8dfe99403026645de056f2
contracts\system\FeeRebateToken.sol 8fa36ba7556ab94b45b94c8e348545985775f7fb
contracts\system\KeepFactorySelection.sol 87bc77333b3b61a7962e637155cb0f0d5f9f5553
contracts\system\TBTCConstants.sol 91be214c622aee804f3d421cbf793f924b01ff50
contracts\system\TBTCDepositToken.sol 10392355070ee75118ea73e4baa2ed712a37d33d
contracts\system\TBTCDevelopmentConstants.sol 471fe3bd995ac6e53d6f4c8524b08f1ca3eb2470
contracts\system\TBTCSystem.sol 3a8803ff5c933aa0708e07e94d560197f6ace58f
contracts\system\TBTCSystemAuthority.sol 90073383b3a376d5abe9a7cae221e29283250e2e
contracts\system\TBTCToken.sol 9bc32aece55bb922e80bb1eca2f9ce1f17725795
contracts\system\VendingMachine.sol 79be1b1366a43455d62922389df028f426eb71a5
contracts\system\VendingMachineAuthority.sol 5fc80a97542272ef038d99a0664874d1eb0fa60c

Contracts Description Table

Contract Type Bases
Function Name Visibility Mutability Modifiers
DepositLog Implementation
approvedToLog Public ❗️ NO❗️
logCreated Public ❗️ 🛑 NO❗️
logRedemptionRequested Public ❗️ 🛑 NO❗️
logGotRedemptionSignature Public ❗️ 🛑 NO❗️
logRegisteredPubkey Public ❗️ 🛑 NO❗️
logSetupFailed Public ❗️ 🛑 NO❗️
logFunderRequestedAbort Public ❗️ 🛑 NO❗️
logFraudDuringSetup Public ❗️ 🛑 NO❗️
logFunded Public ❗️ 🛑 NO❗️
logCourtesyCalled Public ❗️ 🛑 NO❗️
logStartedLiquidation Public ❗️ 🛑 NO❗️
logRedeemed Public ❗️ 🛑 NO❗️
logLiquidated Public ❗️ 🛑 NO❗️
logExitedCourtesyCall Public ❗️ 🛑 NO❗️
setTbtcDepositToken Internal 🔒 🛑
Deposit Implementation DepositFactoryAuthority
Public ❗️ 🛑 NO❗️
External ❗️ 💵 NO❗️
getKeepAddress Public ❗️ NO❗️
getCurrentState Public ❗️ NO❗️
inActive Public ❗️ NO❗️
remainingTerm Public ❗️ NO❗️
signerFee Public ❗️ NO❗️
lotSizeSatoshis Public ❗️ NO❗️
lotSizeTbtc Public ❗️ NO❗️
utxoSize Public ❗️ NO❗️
createNewDeposit Public ❗️ 💵 onlyFactory
requestRedemption Public ❗️ 🛑 NO❗️
transferAndRequestRedemption Public ❗️ 🛑 NO❗️
getRedemptionTbtcRequirement Public ❗️ NO❗️
getOwnerRedemptionTbtcRequirement Public ❗️ NO❗️
provideRedemptionSignature Public ❗️ 🛑 NO❗️
increaseRedemptionFee Public ❗️ 🛑 NO❗️
provideRedemptionProof Public ❗️ 🛑 NO❗️
notifySignatureTimeout Public ❗️ 🛑 NO❗️
notifyRedemptionProofTimeout Public ❗️ 🛑 NO❗️
notifySignerSetupFailure Public ❗️ 🛑 NO❗️
retrieveSignerPubkey Public ❗️ 🛑 NO❗️
notifyFundingTimeout Public ❗️ 🛑 NO❗️
requestFunderAbort Public ❗️ 🛑 NO❗️
provideFundingECDSAFraudProof Public ❗️ 🛑 NO❗️
provideBTCFundingProof Public ❗️ 🛑 NO❗️
provideECDSAFraudProof Public ❗️ 🛑 NO❗️
getCollateralizationPercentage Public ❗️ NO❗️
getInitialCollateralizedPercent Public ❗️ NO❗️
getUndercollateralizedThresholdPercent Public ❗️ NO❗️
getSeverelyUndercollateralizedThresholdPercent Public ❗️ NO❗️
auctionValue Public ❗️ NO❗️
purchaseSignerBondsAtAuction Public ❗️ 🛑 NO❗️
notifyCourtesyCall Public ❗️ 🛑 NO❗️
exitCourtesyCall Public ❗️ 🛑 NO❗️
notifyUndercollateralizedLiquidation Public ❗️ 🛑 NO❗️
notifyCourtesyTimeout Public ❗️ 🛑 NO❗️
withdrawFunds Public ❗️ 🛑 NO❗️
getWithdrawAllowance Public ❗️ NO❗️
DepositFunding Library
fundingTeardown Internal 🔒 🛑
fundingFraudTeardown Internal 🔒 🛑
createNewDeposit Public ❗️ 🛑 NO❗️
notifySignerSetupFailure Public ❗️ 🛑 NO❗️
retrieveSignerPubkey Public ❗️ 🛑 NO❗️
notifyFundingTimeout Public ❗️ 🛑 NO❗️
requestFunderAbort Public ❗️ 🛑 NO❗️
provideFundingECDSAFraudProof Public ❗️ 🛑 NO❗️
provideBTCFundingProof Public ❗️ 🛑 NO❗️
DepositLiquidation Library
submitSignatureFraud Public ❗️ 🛑 NO❗️
getCollateralizationPercentage Public ❗️ NO❗️
startLiquidation Internal 🔒 🛑
provideECDSAFraudProof Public ❗️ 🛑 NO❗️
purchaseSignerBondsAtAuction Public ❗️ 🛑 NO❗️
notifyCourtesyCall Public ❗️ 🛑 NO❗️
exitCourtesyCall Public ❗️ 🛑 NO❗️
notifyUndercollateralizedLiquidation Public ❗️ 🛑 NO❗️
notifyCourtesyTimeout Public ❗️ 🛑 NO❗️
DepositRedemption Library
distributeSignerFee Internal 🔒 🛑
approveDigest Internal 🔒 🛑
performRedemptionTBTCTransfers Internal 🔒 🛑
_requestRedemption Internal 🔒 🛑
transferAndRequestRedemption Public ❗️ 🛑 NO❗️
requestRedemption Public ❗️ 🛑 NO❗️
provideRedemptionSignature Public ❗️ 🛑 NO❗️
increaseRedemptionFee Public ❗️ 🛑 NO❗️
checkRelationshipToPrevious Public ❗️ NO❗️
provideRedemptionProof Public ❗️ 🛑 NO❗️
redemptionTransactionChecks Public ❗️ NO❗️
notifySignatureTimeout Public ❗️ 🛑 NO❗️
notifyRedemptionProofTimeout Public ❗️ 🛑 NO❗️
DepositStates Library
inFunding Public ❗️ NO❗️
inSignerLiquidation Public ❗️ NO❗️
inRedemption Public ❗️ NO❗️
inEndState Public ❗️ NO❗️
inRedeemableState Public ❗️ NO❗️
inStart Public ❗️ NO❗️
inAwaitingSignerSetup External ❗️ NO❗️
inAwaitingBTCFundingProof External ❗️ NO❗️
inFailedSetup External ❗️ NO❗️
inActive External ❗️ NO❗️
inAwaitingWithdrawalSignature External ❗️ NO❗️
inAwaitingWithdrawalProof External ❗️ NO❗️
inRedeemed External ❗️ NO❗️
inCourtesyCall External ❗️ NO❗️
inFraudLiquidationInProgress External ❗️ NO❗️
inLiquidationInProgress External ❗️ NO❗️
inLiquidated External ❗️ NO❗️
setAwaitingSignerSetup External ❗️ 🛑 NO❗️
setAwaitingBTCFundingProof External ❗️ 🛑 NO❗️
setFailedSetup External ❗️ 🛑 NO❗️
setActive External ❗️ 🛑 NO❗️
setAwaitingWithdrawalSignature External ❗️ 🛑 NO❗️
setAwaitingWithdrawalProof External ❗️ 🛑 NO❗️
setRedeemed External ❗️ 🛑 NO❗️
setCourtesyCall External ❗️ 🛑 NO❗️
setFraudLiquidationInProgress External ❗️ 🛑 NO❗️
setLiquidationInProgress External ❗️ 🛑 NO❗️
setLiquidated External ❗️ 🛑 NO❗️
DepositUtils Library
closeKeep Internal 🔒 🛑
currentBlockDifficulty Public ❗️ NO❗️
previousBlockDifficulty Public ❗️ NO❗️
evaluateProofDifficulty Public ❗️ NO❗️
checkProofFromTxId Public ❗️ NO❗️
findAndParseFundingOutput Public ❗️ NO❗️
validateAndParseFundingSPVProof Public ❗️ NO❗️
remainingTerm Public ❗️ NO❗️
auctionValue Public ❗️ NO❗️
lotSizeTbtc Public ❗️ NO❗️
signerFee Public ❗️ NO❗️
determineCompressionPrefix Public ❗️ NO❗️
compressPubkey Public ❗️ NO❗️
signerPubkey Public ❗️ NO❗️
signerPKH Public ❗️ NO❗️
utxoSize Public ❗️ NO❗️
fetchBitcoinPrice Public ❗️ NO❗️
fetchBondAmount Public ❗️ NO❗️
bytes8LEToUint Public ❗️ NO❗️
wasDigestApprovedForSigning Public ❗️ NO❗️
feeRebateTokenHolder Public ❗️ NO❗️
depositOwner Public ❗️ NO❗️
redemptionTeardown Public ❗️ 🛑 NO❗️
getAuctionBasePercentage Internal 🔒
seizeSignerBonds Internal 🔒 🛑
enableWithdrawal Internal 🔒 🛑
withdrawFunds Internal 🔒 🛑
getWithdrawAllowance Internal 🔒
distributeFeeRebate Internal 🔒 🛑
pushFundsToKeepGroup Internal 🔒 🛑
getOwnerRedemptionTbtcRequirement Internal 🔒
getRedemptionTbtcRequirement Internal 🔒
OutsourceDepositLogging Library
logCreated External ❗️ 🛑 NO❗️
logRedemptionRequested Public ❗️ 🛑 NO❗️
logGotRedemptionSignature External ❗️ 🛑 NO❗️
logRegisteredPubkey External ❗️ 🛑 NO❗️
logSetupFailed External ❗️ 🛑 NO❗️
logFunderRequestedAbort Public ❗️ 🛑 NO❗️
logFraudDuringSetup External ❗️ 🛑 NO❗️
logFunded External ❗️ 🛑 NO❗️
logCourtesyCalled External ❗️ 🛑 NO❗️
logStartedLiquidation External ❗️ 🛑 NO❗️
logRedeemed External ❗️ 🛑 NO❗️
logLiquidated External ❗️ 🛑 NO❗️
logExitedCourtesyCall External ❗️ 🛑 NO❗️
IMedianizer Interface
read External ❗️ NO❗️
peek External ❗️ NO❗️
ISatWeiPriceFeed Interface
getPrice External ❗️ NO❗️
addEthBtcFeed External ❗️ 🛑 NO❗️
ITBTCSystem Interface
fetchBitcoinPrice External ❗️ NO❗️
fetchRelayCurrentDifficulty External ❗️ NO❗️
fetchRelayPreviousDifficulty External ❗️ NO❗️
getNewDepositFeeEstimate External ❗️ NO❗️
getAllowNewDeposits External ❗️ NO❗️
isAllowedLotSize External ❗️ NO❗️
requestNewKeep External ❗️ 💵 NO❗️
getSignerFeeDivisor External ❗️ NO❗️
getInitialCollateralizedPercent External ❗️ NO❗️
getUndercollateralizedThresholdPercent External ❗️ NO❗️
getSeverelyUndercollateralizedThresholdPercent External ❗️ NO❗️
ITokenRecipient Interface
receiveApproval External ❗️ 🛑 NO❗️
SatWeiPriceFeed Implementation Ownable, ISatWeiPriceFeed
Public ❗️ 🛑 NO❗️
initialize External ❗️ 🛑 onlyOwner
getPrice External ❗️ onlyTbtcSystem
getWorkingEthBtcFeed External ❗️ NO❗️
addEthBtcFeed External ❗️ 🛑 onlyTbtcSystem
CloneFactory Implementation
createClone Internal 🔒 🛑
isClone Internal 🔒
DepositFactory Implementation CloneFactory, TBTCSystemAuthority
Public ❗️ 🛑 TBTCSystemAuthority
setExternalDependencies Public ❗️ 🛑 onlyTbtcSystem
createDeposit Public ❗️ 💵 NO❗️
FundingScript Implementation
Public ❗️ 🛑 NO❗️
receiveApproval Public ❗️ 🛑 NO❗️
RedemptionScript Implementation
Public ❗️ 🛑 NO❗️
receiveApproval Public ❗️ 🛑 NO❗️
DepositFactoryAuthority Implementation
initialize Public ❗️ 🛑 NO❗️
FeeRebateToken Implementation ERC721Metadata, VendingMachineAuthority
Public ❗️ 🛑 ERC721Metadata VendingMachineAuthority
mint Public ❗️ 🛑 onlyVendingMachine
exists Public ❗️ NO❗️
KeepFactorySelector Interface
selectFactory External ❗️ NO❗️
KeepFactorySelection Library
initialize Internal 🔒 🛑
selectFactory Public ❗️ NO❗️
selectFactoryAndRefresh Public ❗️ 🛑 NO❗️
refreshFactory Internal 🔒 🛑
setFullyBackedKeepFactory Internal 🔒 🛑
setKeepFactorySelector Internal 🔒 🛑
TBTCConstants Library
getBeneficiaryRewardDivisor Public ❗️ NO❗️
getSatoshiMultiplier Public ❗️ NO❗️
getDepositTerm Public ❗️ NO❗️
getTxProofDifficultyFactor Public ❗️ NO❗️
getSignatureTimeout Public ❗️ NO❗️
getIncreaseFeeTimer Public ❗️ NO❗️
getRedemptionProofTimeout Public ❗️ NO❗️
getMinimumRedemptionFee Public ❗️ NO❗️
getFundingTimeout Public ❗️ NO❗️
getSigningGroupFormationTimeout Public ❗️ NO❗️
getCourtesyCallTimeout Public ❗️ NO❗️
getAuctionDuration Public ❗️ NO❗️
TBTCDepositToken Implementation ERC721Metadata, DepositFactoryAuthority
Public ❗️ 🛑 ERC721Metadata
mint Public ❗️ 🛑 onlyFactory
exists Public ❗️ NO❗️
approveAndCall Public ❗️ 🛑 NO❗️
TBTCDevelopmentConstants Library
getBeneficiaryRewardDivisor Public ❗️ NO❗️
getSatoshiMultiplier Public ❗️ NO❗️
getDepositTerm Public ❗️ NO❗️
getTxProofDifficultyFactor Public ❗️ NO❗️
getSignatureTimeout Public ❗️ NO❗️
getIncreaseFeeTimer Public ❗️ NO❗️
getRedemptionProofTimeout Public ❗️ NO❗️
getMinimumRedemptionFee Public ❗️ NO❗️
getFundingTimeout Public ❗️ NO❗️
getSigningGroupFormationTimeout Public ❗️ NO❗️
getCourtesyCallTimeout Public ❗️ NO❗️
getAuctionDuration Public ❗️ NO❗️
TBTCSystem Implementation Ownable, ITBTCSystem, DepositLog
Public ❗️ 🛑 NO❗️
initialize External ❗️ 🛑 onlyOwner
getAllowNewDeposits External ❗️ NO❗️
getMaxLotSize Public ❗️ NO❗️
emergencyPauseNewDeposits External ❗️ 🛑 onlyOwner
resumeNewDeposits Public ❗️ 🛑 NO❗️
getRemainingPauseTerm Public ❗️ NO❗️
beginSignerFeeDivisorUpdate External ❗️ 🛑 onlyOwner
beginLotSizesUpdate External ❗️ 🛑 onlyOwner
beginCollateralizationThresholdsUpdate External ❗️ 🛑 onlyOwner
beginKeepFactorySingleShotUpdate External ❗️ 🛑 onlyOwner
beginEthBtcPriceFeedAddition External ❗️ 🛑 onlyOwner
finalizeSignerFeeDivisorUpdate External ❗️ 🛑 onlyOwner onlyAfterGovernanceDelay
finalizeLotSizesUpdate External ❗️ 🛑 onlyOwner onlyAfterGovernanceDelay
finalizeCollateralizationThresholdsUpdate External ❗️ 🛑 onlyOwner onlyAfterGovernanceDelay
finalizeKeepFactorySingleShotUpdate External ❗️ 🛑 onlyOwner onlyAfterGovernanceDelay
finalizeEthBtcPriceFeedAddition External ❗️ 🛑 onlyOwner onlyAfterGovernanceDelay
getSignerFeeDivisor External ❗️ NO❗️
getAllowedLotSizes External ❗️ NO❗️
isAllowedLotSize External ❗️ NO❗️
getUndercollateralizedThresholdPercent External ❗️ NO❗️
getSeverelyUndercollateralizedThresholdPercent External ❗️ NO❗️
getInitialCollateralizedPercent External ❗️ NO❗️
fetchBitcoinPrice External ❗️ NO❗️
fetchRelayCurrentDifficulty External ❗️ NO❗️
fetchRelayPreviousDifficulty External ❗️ NO❗️
getRemainingSignerFeeDivisorUpdateTime External ❗️ NO❗️
getRemainingLotSizesUpdateTime External ❗️ NO❗️
getRemainingCollateralizationThresholdsUpdateTime External ❗️ NO❗️
getRemainingKeepFactorySingleShotUpdateTime External ❗️ NO❗️
getRemainingEthBtcPriceFeedAdditionTime External ❗️ NO❗️
getGovernanceTimeDelay Public ❗️ NO❗️
getPriceFeedGovernanceTimeDelay Public ❗️ NO❗️
getNewDepositFeeEstimate External ❗️ NO❗️
requestNewKeep External ❗️ 💵 NO❗️
getRemainingChangeTime Internal 🔒
TBTCSystemAuthority Implementation
Public ❗️ 🛑 NO❗️
TBTCToken Implementation ERC20Detailed, ERC20, VendingMachineAuthority
Public ❗️ 🛑 ERC20Detailed VendingMachineAuthority
mint Public ❗️ 🛑 onlyVendingMachine
burnFrom Public ❗️ 🛑 NO❗️
burn Public ❗️ 🛑 NO❗️
approveAndCall Public ❗️ 🛑 NO❗️
VendingMachine Implementation TBTCSystemAuthority
Public ❗️ 🛑 TBTCSystemAuthority
getMintedSupply Public ❗️ NO❗️
getMaxSupply Public ❗️ NO❗️
setExternalAddresses Public ❗️ 🛑 onlyTbtcSystem
isQualified Public ❗️ NO❗️
tbtcToTdt Public ❗️ 🛑 NO❗️
tdtToTbtc Public ❗️ 🛑 NO❗️
canMint Public ❗️ NO❗️
unqualifiedDepositToTbtc Public ❗️ 🛑 NO❗️
tbtcToBtc Public ❗️ 🛑 NO❗️
VendingMachineAuthority Implementation
Public ❗️ 🛑 NO❗️

Legend

Symbol Meaning
🛑 Function can modify state
💵 Function is payable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment