8000 GitHub - vrde/ad
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vrde/ad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ad

readme currently outdated

How does it work?

This contract will give you access to set an ad on https://kiwinews.xyz. The ad will be, for example, permanently available as the top third link here:

image

At the time of writing, we reach roughly 150-400 individuals in the crypto space. But we have no idea how much it'd be worth to advertise to these people, hence the smart contract. It'll help us do price discovery. So how does it work?

Basically, you can stake an amount of ETH for the contract to be yours. Say you stake 1 ETH, then you'll get to set the title and the link. But over 1 month, we'll charge you 1 ETH in fees. Here's how your staked collateral is taxed over the year:

  • Day 0: You have 1 ETH in collateral and you can set the title and link. For someone else to buy the ad space from you, they have to pay more than 1 ETH (and you'll get your 1 ETH back).
  • Day 15 (half a month): Your ad is still being displayed, but now your collateral is only worth 0.5 ETH (we tax 1 ETH/month). For someone else to buy your ad space, they'll just have to pay a little more than 0.5 ETH (and you'll get 0.5 ETH back).
  • Day 30 (month): Your ad is about to be taken off the website. In case noone has bought yet, your collateral now is very low 0.0000.. ETH, and so for someone else to buy the ad space from you is extremely cheap.

You may ask: What happened with my collateral? The answer: It went to the Kiwi News treasury. We charge the entire collateral's value as a fee and it is being deducted from your collateral every second that you run the ad. So if your collateral is worth 1 ETH, we'll charge you 1 ETH/month to run the ad.

How to buy the ad?

Go to https://news.kiwistand.com/submit and check "Submit as an ad."

Deployment

CREATE2 is used to deploy the contract to a deterministic address independent of chainId.

  • DEPLOYER: 0x0000000000ffe8b47b3e2130213b802212439497
  • SALT: 0x0000000000000000000000000000000000000000f00df00df00df00df00df00d
  • INITCODE: 0x608060405234801561001057600080fd5b506001600055610887806100256000396000f3fe60806040526004361061007b5760003560e01c8063b80777ea1161004e578063b80777ea14610101578063d8dfeb4514610125578063e942b5161461013b578063f77c47911461014e57600080fd5b806336eeaa6a146100805780634a79d50c146100ab578063824ca7e9146100c0578063a035b1fe146100d7575b600080fd5b34801561008c57600080fd5b50610095610186565b6040516100a29190610582565b60405180910390f35b3480156100b757600080fd5b50610095610214565b3480156100cc57600080fd5b506100d5610221565b005b3480156100e357600080fd5b506100ec6102b3565b604080519283526020830191909152016100a2565b34801561010d57600080fd5b5061011760055481565b6040519081526020016100a2565b34801561013157600080fd5b5061011760045481565b6100d5610149366004610619565b6102f0565b34801561015a57600080fd5b5060035461016e906001600160a01b031681565b6040516001600160a01b0390911681526020016100a2565b6002805461019390610685565b80601f01602080910402602001604051908101604052809291908181526020018280546101bf90610685565b801561020c5780601f106101e15761010080835404028352916020019161020c565b820191906000526020600020905b8154815290600101906020018083116101ef57829003601f168201915b505050505081565b6001805461019390610685565b3373ee324c588cef1bf1c1360883e4318834af66366d1461025557604051636609677b60e11b815260040160405180910390fd5b60405173ee324c588cef1bf1c1360883e4318834af66366d904790600081818185875af1925050503d80600081146102a9576040519150601f19603f3d011682016040523d82523d6000602084013e505050565b606091505b505050565b6000806102e860405180604001604052806001815260200162282072815250600554426102e091906106d5565b600454610475565b915091509091565b6102f86104b8565b6003546001600160a01b0316610343576001610315848683610752565b506002610323828483610752565b50600380546001600160a01b031916331790553460045542600555610465565b60008061034e6102b3565b91509150813411610372576040516349798bf960e11b815260040160405180910390fd5b6003546001600160a01b0316600161038b878983610752565b506002610399858783610752565b50600380546001600160a01b031916331790553460045542600555604051731337e2624ffec537087c6774e9a18031cfeaf0a9908390600081818185875af1925050503d8060008114610408576040519150601f19603f3d011682016040523d82523d6000602084013e61040d565b606091505b50506040516001600160a01b03831691508490600081818185875af1925050503d8060008114610459576040519150601f19603f3d011682016040523d82523d6000602084013e61045e565b606091505b5050505050505b61046f6001600055565b50505050565b6000806000610485868686610515565b905060006104938286610813565b9050600081136104ab576000859350935050506104b0565b925090505b935093915050565b60026000540361050e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640160405180910390fd5b6002600055565b825160009061055890610528858561083a565b610532919061083a565b670de0b6b3a7640000866020015161054a919061083a565b670de0b6b3a7640000610560565b949350505050565b82810282151584158583048414171661057857600080fd5b9190910492915050565b600060208083528351808285015260005b818110156105af57858101830151858201604001528201610593565b506000604082860101526040601f19601f8301168501019250505092915050565b60008083601f8401126105e257600080fd5b50813567ffffffffffffffff8111156105fa57600080fd5b60208301915083602082850101111561061257600080fd5b9250929050565b6000806000806040858703121561062f57600080fd5b843567ffffffffffffffff8082111561064757600080fd5b610653888389016105d0565b9096509450602087013591508082111561066c57600080fd5b50610679878288016105d0565b95989497509550505050565b600181811c9082168061069957607f821691505b6020821081036106b957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156106e8576106e86106bf565b92915050565b634e487b7160e01b600052604160045260246000fd5b601f8211156102ae57600081815260208120601f850160051c8101602086101561072b5750805b601f850160051c820191505b8181101561074a57828155600101610737565b505050505050565b67ffffffffffffffff83111561076a5761076a6106ee565b61077e836107788354610685565b83610704565b6000601f8411600181146107b2576000851561079a5750838201355b600019600387901b1c1916600186901b17835561080c565b600083815260209020601f19861690835b828110156107e357868501358255602094850194600190920191016107c3565b50868210156108005760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b8181036000831280158383131683831282161715610833576108336106bf565b5092915050565b80820281158282048414176106e8576106e86106bf56fea264697066735822122004019bcc6e4486fbfecb618621c613e038b01584dcc3000c80418e8251ce7f7a64736f6c63430008110033
  • ADDRESS: 0x2e78Fad843177343Feb2f1d5cb9699A061C59c06
  • Deployed to:
    • Optimism

Updates and verifying on Etherscan

ETHERSCAN_API_KEY=abc forge verify-contract address Ad --watch --chain 10

License

SPDX-License-Identifier: AGPL-3.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 100.0%
0