pos-controller
v1.0.3
Published
> Generate token interest like Proof-of-Stake system.
Downloads
5
Readme
POS Controller
Generate token interest like Proof-of-Stake system.
- Modified MiniMeToken
BalanceUpdatableMiniMeToken
assumes token controller may update token balance insideonTransfer
function of token controller.POSController
cannot use Giveth'sMiniMeToken
becuase it doesn't make token controller to generate or destroy tokens inonTransfer
function.- We use
BalanceUpdatableMiniMeToken
forPOSMiniMeToken
- POSController
POSController
generates pos-style interests forPOSMintableToken
andPOSMiniMeToken
.POSController
providesclaimTokens()
function to claim pos-style interests.- Also tokens are claimed when token
transfer()
orapprove()
is executed. - Above 2 functions invoke
onTransfer()
,onApprove()
ofPOSController
.- Becuase plain
MintableToken
cannot call function ofowner
, we need to add the functionality. - Inherits
POSMintableTokenAPI
- Becuase plain
- Also tokens are claimed when token
- POSTokenAPI
TokenControllerBridge
providesMiniMeToken
's onTransfer, onApprove, proxyPayment functionality forMintableToken
.POSMintableTokenAPI
providesPOSController
-compatibility forMintableToken
.POSMiniMeTokenAPI
providesPOSController
-compatibility forBalanceUpdatableMiniMeToken
.
- POSMintableToken
POSMintableToken
inheritsMintableToken
andPOSMintableTokenAPI
.- Cheaper gas fee than
POSMiniMeToken
- Cheaper gas fee than
- POSMiniMeToken
POSMiniMeToken
inheritsBalanceUpdatableMiniMeToken
andPOSMintableTokenAPI
.- Can clone other
MiniMeToken
as a parent token
- Can clone other