Skip to content

steem-monsters/sps-dao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 

Repository files navigation

SPS BEP-20 Contract

Start with a copy of the Compound Finance (COMP) token ERC-20 contract (since we want to use the Compound governance model for SPS) and make the following changes:

  1. Add admin to COMP token (address that is stored in storage, should be included in constructor at deploy time, has special privs aka onlyAdmin or something). Should be able to:
    • update the admin ✔️
    • update minter ✔️
    • update stake modifier ✔️
  2. Add minter (privileged address, include in constructor). Should be able to:
    • call mint function ✔️
  3. Mint function should be added. Takes address and amount, and adds amount to address's balance, updating total supply. Only able to be called by the address specified as the "minter". ✔️
  4. Add "stake modifier" - define an interface with a function call that takes address of token holder, amount held, and number of votes, and returns voting power amount. On BEP-20 contract, define address that conforms to stake modifier interface. Find part of code where voting power is determined, and instead of just returning token balance, call out to stake modifier and return that value. Initially could call dummy contract, or could conditionally return fake value if stake modifier address is 0x0.✔️
  5. Add "bridgeTransfer" method (basically the same as "transfer" but includes a parameter for "externalAddress" which could be the Hive username). This is similar to the "convertTokenWithTransfer" method on the DEC contract. ✔️
    • Emit a custom event that can be checked by bridges ✔️

About

Smart contracts for the SPS token and DAO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •