Block Points Airdrop Token

This is an idea to create a competing token to badgers.cash, but to skip the waiting period where some principal is time-locked by a vault.

Instead, a user that holds some aged unspent output may claim tokens from a contract thread, as long as their utxo is older than that thread. Users with more coins can release more tokens from the vault.

This contract could be deployed as a super multi-threaded airdrop contract rewarding users for coindays on utxos they already have.

Hundreds of Utxos can be seeded with a coinday airdrop token thread, any user with a utxo exceeding the age of a thread can claim tokens proportional to the value of their utxo and the age of the thread.

May be combined with a cauldron swap to bring back coinday paid “free” “zero-fee” transactions.

contract BlockPointAirDrop() {

    function release(int age) {

        // Force a block based relative timelock
        // 0065cd1d OP_OVER OP_GREATERTHANOREQUAL OP_VERIFY
        require(500000000 >= age);

        // Ensure the first input exceeds the age claimed
        // OP_0 OP_INPUTSEQUENCENUMBER OP_OVER OP_GREATERTHANOREQUAL OP_VERIFY
        require(tx.inputs[0].sequenceNumber >= age);
        
        // Require the token vault thread to exceed the age claimed
        // OP_DUP OP_CHECKSEQUENCEVERIFY OP_DROP
        require(this.age >= age);

        // Allow anyone to withdraw a token amount proportional to the value of their aged utxo.
        // Note: to convert block satoshis to coindays: 144 * 100_000_000 
        // 
        // OP_INPUTINDEX OP_OUTPUTTOKENAMOUNT 
        // OP_INPUTINDEX OP_UTXOTOKENAMOUNT 
        // OP_ROT OP_0 OP_UTXOVALUE OP_MUL 00e1f505 OP_DIV OP_SUB OP_GREATERTHANOREQUAL
        require(
            tx.outputs[this.activeInputIndex].tokenAmount >= 
            tx.inputs[this.activeInputIndex].tokenAmount - 
            (age * tx.inputs[0].value/100000000)
        );

        // This thread must be in the last input position
        // to prevent users building transactions with multiple airdrop threads. 
        //
        // OP_INPUTINDEX OP_1ADD OP_TXINPUTCOUNT OP_NUMEQUAL
        require(this.activeInputIndex+1 == tx.inputs.length);
    }
}

Updates

image

Ticker is: BPT
Category/Token Id: 7fe0cd5197494e47ade81eb164dcdbd51859ffbe581fe4a818085d56b2f3062c
Total Supply: 9223372036854775807
Thread Supply: 72624976668147841
Threads: 127

  • The dapp name was changed from Coindays to Block Points.
  • The reward was changed from one token per day to one per block per coin.
  • The emission rate has parity with BADGERS.
  • The tokens were deployed in 127 threads here

User @2507 alerted me to a flaw in the contract above, in that it does not require covenant threads be returned. They were gracious enough to sweep all the contract threads so that it could be upgraded.

The following improvements were made:

  • Enforce a version 2 transaction.
  • Check the output returns to the covenant.
  • Check the token returned is the same category
  • Move the location of the thread in the transaction from the last thread to the second.

The new AuthenticationTemplate is linked below:

Upgraded Block Point Authentication Template

The 127 token threads have been redeployed here

1 Like